Source: measured while building the Agents trend column (phase 3 of #24), 2026-09-09.
Reached by: open Agents on a machine running dozens of agents. The trend column reads one history window per visible lane. Each series took between 129 milliseconds and 5.3 seconds to arrive.
laneWindow in src/store/archive.ts and src/store/history.ts each cap their per-lane cache at two entries. That size is right for the agent detail, which reads one lane. The Agents list reads every visible lane — 43 on this machine — so every call past the second evicts the entry the next call needs, and each lane decompresses and re-parses its own window from scratch.
The reader sees a trend column that fills over several seconds instead of appearing with the row.
A second, smaller cost has the same root: the loaded set is cached inside the Agents component, so leaving the screen and coming back re-reads every visible series.
Done when
- A read of N lanes decompresses each window once, whatever N is, proved by a test that counts decompressions rather than measuring elapsed time.
- The loaded set survives leaving and re-entering the Agents screen.
- A test with forty lanes shows the number of store reads matching the number of visible rows, not a multiple of it.
Context
- Location:
src/store/archive.ts, src/store/history.ts, and the cache in src/ui/agents.tsx.
- Two defects found alongside this one are already fixed in phase 3 and are not part of it: a fetch cancelling itself from a React effect cleanup, and
Promise.all holding every row blank until the slowest read returned. Both were invisible to the test suite, because a fixture store answers in under a millisecond.
Source: measured while building the Agents trend column (phase 3 of #24), 2026-09-09.
Reached by: open Agents on a machine running dozens of agents. The trend column reads one history window per visible lane. Each series took between 129 milliseconds and 5.3 seconds to arrive.
laneWindowinsrc/store/archive.tsandsrc/store/history.tseach cap their per-lane cache at two entries. That size is right for the agent detail, which reads one lane. The Agents list reads every visible lane — 43 on this machine — so every call past the second evicts the entry the next call needs, and each lane decompresses and re-parses its own window from scratch.The reader sees a trend column that fills over several seconds instead of appearing with the row.
A second, smaller cost has the same root: the loaded set is cached inside the
Agentscomponent, so leaving the screen and coming back re-reads every visible series.Done when
Context
src/store/archive.ts,src/store/history.ts, and the cache insrc/ui/agents.tsx.Promise.allholding every row blank until the slowest read returned. Both were invisible to the test suite, because a fixture store answers in under a millisecond.