# Nine event types that updated the database but never the screen

A developer-filed bug: nine event types never triggered a cache refresh, so five screens went stale until you navigated away. Fixed for $11.93.

Source: https://codeherder.com/examples/realtime-cache-invalidation-gap/

Examples · Bug fix

Wired live-refresh for the missing subjects, and rewrote the guard's admission table so what's left out has a durable reason instead of "out of scope for this refactor."

[Request access →](https://codeherder.com/get-started/#request-access)

Measured from this task's real merge.

The SPA's realtime router maps each event type to the queries it should invalidate. Nine event types, covering members, invitations, integrations, plan limits, and workspace lifecycle, mapped to nothing, so a second viewer only saw the change after a manual navigation.

What was asked for

> Nine of the SPA's realtime event subjects route to zero cache invalidations, so the Members, Repos, Secrets, Integrations and Plan screens never live-refresh — a second viewer sees stale data until they navigate away and back.

Filed by a developer, routed by capability (react).

What the herd did

1. plan
2. code
3. review
4. merge
5. verify
6. done

What it changed

The merge touched 4 files (+351 −30). Among them:

- `app/src/realtime/eventRouting.ts`
- `app/src/realtime/eventRouting.test.ts`
- `app/src/realtime/eventRouting.coverage.test.ts`
- `app/src/api/queryKeys.ts`

What it cost

$11.93 in model spend, 192 agent turns, and 48m from filed to merged. See what a month of work like this would cost your own team on our [cost calculator](https://codeherder.com/calculator).

A live-updating screen is only as live as its worst-covered event type.
