Skip to content

perf(web): keep the slot list still while sessions stream - #23877

Merged
bolichen97 merged 1 commit into
kirodotdev:mainfrom
Pearcekieser:perf/perf-quiet-subscriptions
Oct 25, 2026
Merged

bolichen97 merged 1 commit into
kirodotdev:mainfrom
Pearcekieser:perf/perf-quiet-subscriptions

Conversation

@Pearcekieser

@Pearcekieser Pearcekieser commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The chat page and the sidebar stop re-rendering for every assistant or tool row while sessions stream in the background.

Each streamed assistant or tool row runs touchSlotActivity, which writes last_ts onto the slot row and replaces the dashboard.slots array. Everything that subscribes to the list re-renders: ChatPage, the sidebar shell, the tab strips and every sidebar row with its Radix menu wrappers. None of them shows last_ts for a row that has last_turn_ts, because the sidebar orders, groups and tints by last_turn_ts || last_ts || created.

The sidebar's sub-agent count selectors take the whole chat.slotActivity map as input. That map changes on every background tool row, so they recount every slot even though no subagents map changed.

Why it matters

On the render benchmark's S1 scenario (222 sessions, 5 streaming in the background, 30 s), the slot list changed 7 times and the page did 21,305 component renders, 1,026 of them WindowedSessionRow. The remaining sidebar render work (row menus, selector fan-out) is planned on top of this change, so it has to land first.

Not a goal

  • Mounting row menus lazily, or cutting the per-dispatch selector count. Both are separate follow-ups.
  • Quieting server slots pushes that differ only in last_ts.
  • Changing what any surface shows or how the sidebar sorts.

What changed (motivation → approach → change)

Mid-turn last_ts bumps move off the row, so the slot list keeps its identity while a turn streams.

  • touchSlotActivity writes an unsettled bump on a row that has last_turn_ts into a new dashboard.slotLastTs map and leaves the row and the array alone. It still stamps the write, as a row write does. A settled bump, or a bump on a row with no last_turn_ts (which sorts by last_ts), writes the row as before.
  • New store/slotLastTs.ts returns the newer of the map entry and the row value. The unread watermarks in markSlotUnread, markSlotRead, attention.ts, slotSwitch.ts, useSessionActions.ts and MembersPageThread.tsx read through it.
  • The surfaces that sort or label by message recency subscribe to selectSlotsWithLiveLastTs, which merges the map into the rows. These are the command palette, the recents provider, the command bar, Worlds (useAgentSync), the artifact send-to-session picker and the broadcast picker. They still update on every bump while mounted.
  • An entry is dropped once a slots list carries a last_ts at or past it, and when an authoritative list drops the key. An older list keeps the entry, so recency never moves back.
  • slotLastTs.readers.test.ts fails on any .last_ts read outside the helper that lacks a // last-ts: <why> marker. Six reads carry one, for rows already merged or reached only without last_turn_ts.
  • selectSubagentsBySlot maps slotActivity to its per-slot subagents maps and returns the previous object while those maps keep their identity. The three sidebar count selectors and selectSubagentActivityCount read it.

Backwards compatibility

Compatible: slotLastTs is new client-only store state, and last_ts keeps its type and its server value on the row.

Reader: website/src/store/dashboardSlice.ts:markSlotUnread -- chat -- fallback watermark reads slotLastTsOf; "markSlotUnread falls back to the live last_ts as its watermark"
Reader: website/src/store/dashboardSlice.ts:markSlotRead -- chat -- shared-clear watermark reads slotLastTsOf
Reader: website/src/hooks/websocket/attention.ts:emitSlotRead -- chat -- read relay watermark reads slotLastTsOf
Reader: website/src/store/chat/slotSwitch.ts:_newestSlotTs -- chat -- reads slotLastTsOf
Reader: website/src/hooks/useSessionActions.ts:toggleRead -- chat -- reads slotLastTsOf
Reader: website/src/pages/members/MembersPageThread.tsx:activeSlotLastTs -- crew page -- reads selectSlotLastTs
Reader: website/src/components/commandPalette/slotRecency.ts:slotRecency -- app -- callers pass selectSlotsWithLiveLastTs rows; recentsProvider.test.ts and CommandPalette.test.tsx pass
Reader: website/src/components/ArtifactSendToSession.tsx:useArtifactSendToSession -- app -- subscribes to selectSlotsWithLiveLastTs; ArtifactSendToSession.test.tsx "orders a session that is mid-turn by its newest message"
Reader: website/src/hooks/useAgentSync.ts:useAgentSync -- app -- subscribes to selectSlotsWithLiveLastTs; useAgentSync.recencyOrder.test.tsx passes
Reader: website/src/lib/broadcastTargets.ts:broadcastTargets -- chat -- BroadcastPanel passes withLiveLastTs rows; BroadcastPanel.test.tsx passes
Reader: website/src/pages/chat/sessionOrder.ts:slotActivityTs -- chat -- reads last_ts only without last_turn_ts, and those rows still take every bump
Reader: website/src/utils/recencyTint.ts:computeRecentRank -- chat -- same ladder as slotActivityTs; recencyTint.test.ts passes

Tests

  • website/src/test/dashboardSlice.slotLastTs.test.ts (new, 9 cases). A streaming bump keeps the slots array and row and moves the live value. A row without last_turn_ts still gets the row write. Bumps never move backwards, and an equal time is no write. A settled bump writes the row and drops the entry. A caught-up list drops the entry, an older list keeps it, and a list without the key drops it. markSlotUnread falls back to the live value. withLiveLastTs keeps identity when nothing moved.
  • website/src/store/subagentsBySlot.test.ts (new): a tool row that replaces slotActivity but not its subagents map leaves the count selector result unchanged. It sits in src/store because only store code may import store/chat/subagents directly.
  • website/src/test/dashboardSlice.fetchSlotsClobber.test.ts: a mid-turn bump held off the row is stamped like a row write, so a fetchSlots reply serialized before it cannot restore the older last_ts after a slots frame drops the entry. It fails with the stamp removed. The touched files passed 3 runs under --sequence.shuffle, seeds 1 to 3.
  • website/src/test/ArtifactSendToSession.test.tsx: the send-to-session picker ranks a session that is mid-turn by its overlay last_ts. It fails with the raw slot list. Passed 3 shuffled runs.
  • website/src/test/slotLastTs.readers.test.ts (new): the direct-read ban described above, plus a check that its pattern still matches.
  • BroadcastPanel.test.tsx renders inside the store Provider, since the panel now reads the map. CommandBarOverlay.owners.test.tsx follows the renamed subscription line.
  • The 41 files run_scoped_tests.py --surface frontend selects pass (883 tests). tsc -p tsconfig.app.json and eslint on the changed files are clean.
  • Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

Render benchmark from #23431 (scripts/bench-render.mjs), applied on origin/main c24c7bc without and with this change, desktop, 30 s window, 3 runs per cell. A local counter added to the script counted dashboard.slots identity changes. The table shows the median run; runs 2 and 3 matched exactly on both sides.

S1 (s1x5) main this PR
dashboard.slots changes 7 (0.23/s) 1 (0.03/s)
ChatPage renders 9 3
ChatSidebar renders 9 3
WindowedSessionRow renders 1026 342
MenuProvider renders 1250 662
component renders 21,305 9,809
React commits 207 189
dispatches 3179 3173
selector calls 454,576 453,628

The idle scenario is unchanged: 4 commits, 1059 renders. Selector calls stay flat, because the dispatch count is the same and every mounted selector still runs per dispatch.

Screenshots / video

Why no screenshot: the change keeps the slot list's identity while sessions stream, and every surface shows the same values as before.

Related Issues

Fixes #23876

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@Pearcekieser
Pearcekieser requested review from a team and KiroCrewCaptain as code owners October 24, 2026 23:47
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention labels Oct 24, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head cad8b06. The change looks good to me, and I have no findings to raise.

What I checked:

  • touchSlotActivity sends an unsettled bump to the overlay only when the row already has last_turn_ts, so nothing the sidebar orders or tints by stops moving. Rows without last_turn_ts still take the row write.
  • Overlay bumps skip stampSlotWrite. That is safe here: an older fetchSlots reply can now replace the row, but dropCaughtUpLastTs keeps the newer entry, so recency still never moves back.
  • The overlay key uses the same k: prefix that slotKeyOfStamp strips, so the prune in reconcileSlots matches live keys, and a key such as __proto__ cannot reach the prototype.
  • selectSubagentsBySlot returns the previous object while every per-slot subagents map keeps its identity, and the three count selectors still skip the aliased active slot.
  • Unread watermarks (markSlotUnread, markSlotRead, the focus and arrival relays, switchSlot, the toggle action) all read the live value through slotLastTsOf.

Not verified: I did not run the frontend tests locally. I relied on the test list in the description.

What still blocks approval (maintainer checks, not changes for you):

  • This PR changes 21 files and is a perf change, so it needs a maintainer approval rather than an automated one.
  • Two red checks do not come from this diff. Dependency License Gate fails because dependency review is not enabled on the repository. Sensitive Change Review could not read the PR from the API and needs a re-run.
  • The AI review lanes do not run on fork PRs, so no lane verdict exists for this head, and several required checks were still running when I looked.

Merge order note: once this lands, any open PR that adds a direct .last_ts read will fail slotLastTs.readers.test.ts until it reads through store/slotLastTs or adds a // last-ts: marker.

@Pearcekieser
Pearcekieser force-pushed the perf/perf-quiet-subscriptions branch from cad8b06 to 060c01c Compare October 25, 2026 00:14
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

chore (non-blocking): pushed 060c01c to fix the Frontend Lint & Type Check failure. dashboardSlice.ts came to 2,001 lines, one over the cap. dropCaughtUpLastTs moves unchanged into store/slotLastTs.ts, which brings the slice to 1,987 lines, and there is no behaviour change. Coverage Gate was red only because lint failed first. The GPT, Opus, Internal Content Scan, Security Scope, Screenshot Evidence and Sensitive Change Review runs on cad8b06 stopped on a GitHub API rate limit before they reviewed anything, and this push reruns them.

bolichen97
bolichen97 previously approved these changes Oct 25, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving at 060c01c. The only change since cad8b06 moves dropCaughtUpLastTs from dashboardSlice.ts into slotLastTs.ts with the same logic, so the earlier review still holds. Auto-merge waits for the CI runs that were just approved.

@bolichen97
bolichen97 enabled auto-merge (squash) October 25, 2026 00:24
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 4d8cdf4ea214287ed7327bcd6e97a5829952a808 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: mid-turn last_ts bumps move to a client-only overlay that disappears on its own, every untouched reader goes through one helper, and the reader-ban test catches any new direct read.

Notes

  • The reader ban only matches .last_ts and ['last_ts']. A destructured { last_ts } read gets past it. No such read exists in website/src today, so this is a gap in the guard, not a broken reader.
  • selectSlotsWithLiveLastTs caches its last result in a module-level variable. That is fine with one store, but tests that build several stores share the cache. A createSelector over the two inputs would avoid that at the same cost.

[DESIGN-REVIEWED] 4d8cdf4

Description read

[DESCRIPTION-READ] 852bf2dafaa0b81b40d424e9f3598c0dc93d21a4f6d21d8111c184624fef1df6

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS

UX-level review of 4d8cdf4ea214287ed7327bcd6e97a5829952a808 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing to check. The diff only changes store state and selector plumbing. It adds and changes no controls, strings or layout, so it needs no screenshots.

[UX-REVIEWED] 4d8cdf4

Description read

[DESCRIPTION-READ] 053f91043e3be0bd818d5bd619e23624cfdd125219d05827f3d02cee46693b49

That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of 4d8cdf4ea214287ed7327bcd6e97a5829952a808 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. All 16 base .last_ts reads outside tests are rerouted or marked, so no unfixed sibling is left. The only note is a hand-rolled memo that duplicates createSelector.

Notes

  • Item 7 — duplicate (rung c): the module-level let memo: { slots; overlay; out } cache in selectSlotsWithLiveLastTs re-implements two-input memoization, which createSelector already does in store/chat/subagents.ts. Subtraction: delete the memo variable and build the selector as createSelector([s => s.dashboard.slots, s => s.dashboard.slotLastTs], withLiveLastTs).

What this change ships

Inventory (7 items) — 6 justified

Intent: stop background streaming sessions from re-rendering the chat page and sidebar on every streamed row. This is a FIX (perf, #23876).

  1. While a session with a settled turn streams in the background, the slot list keeps its identity, so the chat page, sidebar and rows stop re-rendering per row — justified
  2. Unread and read watermarks (mark read/unread, focus relay, slot switch, members thread) still see the newest message time — justified
  3. The palette, recents, command bar, Worlds, send-to-session picker and broadcast picker still sort and label by live recency — justified
  4. A held bump clears once a slots list catches up or drops the key, and an older fetch reply cannot move it back — justified
  5. A new test fails on any unmarked direct .last_ts read in source — justified
  6. Sub-agent count badges no longer recount on every background tool row — justified
  7. The merged-list selector carries its own module-level memo cache — duplicate of createSelector usage in store/chat/subagents.ts

[FIRST-PRINCIPLES-REVIEWED] 4d8cdf4

Description read

[DESCRIPTION-READ] d3fccd97812530d1a0d9613602ac48f1f9274a817e2555f34e44da365779dc4b

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 4d8cdf4ea214287ed7327bcd6e97a5829952a808 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 4d8cdf4

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 4d8cdf4ea214287ed7327bcd6e97a5829952a808 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 4d8cdf4

auto-merge was automatically disabled October 25, 2026 00:43

Head branch was pushed to by a user without write access

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

issue (blocking): fixed in d64fab5. Overlay bumps lose protection against stale slot fetches.

fixed: the overlay branch of touchSlotActivity now calls stampSlotWrite(state, key) whenever it advances the entry, the same stamp patchSlotRow writes for a row bump.
localWritesOutranking therefore withholds a fetchSlots reply serialized before the bump, even after an sseSlots frame has caught up and dropped the entry.
The stamp lives in slotWrittenAt, so dashboard.slots keeps its identity while sessions stream.
Regression test: dashboardSlice.fetchSlotsClobber.test.ts "keeps a mid-turn last_ts bump held off the row from being undone by an older reply". It fails with the stamp removed and passes with it.
self-added: yes
mechanism: stamp the overlay write like a row write

@Pearcekieser
Pearcekieser force-pushed the perf/perf-quiet-subscriptions branch from 060c01c to d64fab5 Compare October 25, 2026 00:43
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 25, 2026
bolichen97
bolichen97 previously approved these changes Oct 25, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed at d64fab5. Compared with the previously approved head, the only change is that the mid-turn last_ts bump held in the slotLastTs overlay now also stamps the slot write sequence, so a fetchSlots reply serialized before the bump cannot restore an older last_ts once a slots frame drops the overlay entry. The new clobber test covers that race, and the early return on a non-finite or not-newer ts keeps the old no-write behavior. No new findings. Approving at this head; auto-merge waits for the required checks and readiness.

@bolichen97
bolichen97 enabled auto-merge (squash) October 25, 2026 01:06
auto-merge was automatically disabled October 25, 2026 01:16

Head branch was pushed to by a user without write access

@Pearcekieser
Pearcekieser force-pushed the perf/perf-quiet-subscriptions branch from d64fab5 to 431ad81 Compare October 25, 2026 01:16
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

issue (blocking): fixed in 431ad81. The artifact send-to-session picker read the raw slot list.

fixed: useArtifactSendToSession now subscribes to selectSlotsWithLiveLastTs, so prepareCurrentSlots ranks a session that is mid-turn by its overlay last_ts.
Sweep: every caller of slotRecency, recencyEpoch and prepareCurrentSlots now gets live rows. That covers the palette, the recents provider, the command bar (its liveSlots come from the overlay's selector), Worlds and this picker. The marker in slotRecency.ts names them.
Regression test: ArtifactSendToSession.test.tsx "orders a session that is mid-turn by its newest message, not the row value". It fails with the raw selector and passes with the live one.
self-added: yes
mechanism: route the last raw-list recency caller through the live selector

This push also replaces the d64fab5 CI run, whose Await Fast Gate step read a cancelled duplicate Fast Gate run and skipped the test shards.

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

note (non-blocking): CI run 40149993172 on 431ad81 is red only because Await Fast Gate read a cancelled Fast Gate run. That cancelled run, 40149993771, was created one second after 40149993194, which succeeded. The same thing happened on d64fab5, with run 40147800120 cancelled and 40147799957 succeeding. Coverage Gate then fails closed because the test shards were skipped. Every review lane, Screenshot Evidence and Sensitive Change Review pass on this head. Could a maintainer rerun the failed jobs of run 40149993172? The fork account cannot, and a third same-tree push looks likely to hit the same race.

@Pearcekieser
Pearcekieser force-pushed the perf/perf-quiet-subscriptions branch from 431ad81 to f7d327f Compare October 25, 2026 07:27
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

chore (non-blocking): pushed f7d327f, which fixes the two frontend shard failures the rerun of 431ad81 found. Thanks for the rerun.

  • chatSlice.ownership.test.ts failed because src/test/dashboardSlice.slotLastTs.test.ts imported store/chat/subagents from outside src/store. That case now lives in src/store/subagentsBySlot.test.ts, so the facade's exports stay unchanged.
  • i18n/moduleLevel.test.ts failed because the new arrow-function constant sameRecordValues made its scanner read a later i18nT call in subagents.ts as module scope. The helper is now a function declaration.

Locally, src/store and src/i18n pass (1,705 tests), as do the 43 related frontend files (895 tests). There is no behaviour change.

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 25, 2026
@Pearcekieser
Pearcekieser force-pushed the perf/perf-quiet-subscriptions branch from f7d327f to baae247 Compare October 25, 2026 08:02
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

chore (non-blocking): rebased on main as baae247 after #23712 landed. That PR moved the body of touchSlotActivity into a shared applySlotActivity, which the per-frame streamFlush action also calls. The overlay branch and its stampSlotWrite now live in applySlotActivity, so both recency paths keep the slot list still. Behaviour is otherwise unchanged. I dropped one duplicated comment paragraph to stay under the 2,000-line cap, leaving the file at 1,995 lines. src/store, src/i18n and the stream-flush tests pass (98 files, 1,904 tests), as do the 43 related frontend files.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 25, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed at baae247 (rebased on main). The change since the last review is small and looks good:

  • The sub-agent count test moved from src/test/dashboardSlice.slotLastTs.test.ts to src/store/subagentsBySlot.test.ts. Code outside src/store no longer imports store/chat/subagents directly, which is what the chat state ownership test asks for.
  • sameRecordValues in store/chat/subagents.ts is now a plain function instead of a generic arrow. The module level i18n test parses the file as TSX, where <V>(...) => reads as JSX, so the i18nT() call inside the reducer at line 670 looked like module scope. With the generic arrow gone that false hit goes away. No other generic arrows remain in the file.
  • The rebase moved the overlay branch from touchSlotActivity into the shared applySlotActivity helper on main, so the per frame stream flush now follows the same rule. The logic is unchanged.

Six question security check on this head: no auth, no new external input parsing, no trust boundary, no sandbox, no approval gate, no secret handling. All answers are no.

What I checked: the two commits compared with range diff, plus the two test rules read against the new source. I could not run the frontend suite locally. Approval waits for CI: the workflow runs on this head are still waiting for maintainer approval, and PR Readiness is not passed yet.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention labels Oct 25, 2026
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

praise: first-principles review PASS on baae247 noted. It names no item to change, so nothing changes.

accepted: no first-principles item to act on at this head.

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

praise: design review PASS on baae247 noted. It names no item to change, so nothing changes.

accepted: no design item to act on at this head.

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

praise: ux review PASS on baae247 noted. It names no item to change, so nothing changes.

accepted: no ux item to act on at this head.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 25, 2026
Each streamed assistant or tool row ran touchSlotActivity, which wrote
last_ts onto the row and replaced the dashboard.slots array. Everything
subscribed to the list re-rendered (the chat page, the sidebar shell,
tab strips, every row's menus) for a value the list does not order or
label by once a row has last_turn_ts.

Those mid-turn bumps now go to dashboard.slotLastTs. Every last_ts
reader goes through store/slotLastTs, which returns the newer of the
overlay and the row value; a source test fails on an unmarked direct
read. The sub-agent count selectors read per-slot subagents maps
instead of the whole slotActivity map, so a background tool row does
not recount them.
@Pearcekieser
Pearcekieser force-pushed the perf/perf-quiet-subscriptions branch from baae247 to 4d8cdf4 Compare October 25, 2026 12:31
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

chore (non-blocking): pushed 4d8cdf4, rebased on current main. CI on baae247 failed the file line cap because main had grown dashboardSlice.ts, so the merged file came to 2,005 lines. The overlay write and the prune of departed keys move unchanged into store/slotLastTs.ts as bumpLastTsOverlay and pruneLastTsOverlay, which brings the slice to 1,993 lines with no behaviour change. Coverage Gate was red only because the lint job failed first. Locally, tsc and 97 test files (1,863 tests) pass after the rebase.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 25, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving at 4d8cdf4. The send-to-session menu now orders sessions by their newest message during a turn, like the other session lists, and the new test covers that order. The store file is back under the 2000 line cap. No red check and no blocking review lane at this head. Auto-merge waits for the required checks.

@bolichen97
bolichen97 enabled auto-merge (squash) October 25, 2026 14:27
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 25, 2026
@bolichen97
bolichen97 merged commit 5631aab into kirodotdev:main Oct 25, 2026
103 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(web): keep the slot list still while sessions stream

2 participants