Repository navigation
fix(sidebar): say compacting on a session row while its chat compacts - #35685
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The row now reads the run-state seam that the footer and the member pill already use, and the one unfixed sibling ( What this change shipsInventory (4 items) — 2 justifiedIntent: while a chat compacts, the session's sidebar row says "Compacting…" like the footer does, not "Thinking…". FIX (#34313).
[FIRST-PRINCIPLES-REVIEWED] 83e9fe8 Description read[DESCRIPTION-READ] 205ce0de6aeda1dfed410a59b2231f259a8eafe37be638e98dfc78e8dd708c96 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the row now reads the same run-state selector the footer and member pill use, and the fix can be reverted cleanly. Notes
[DESIGN-REVIEWED] 83e9fe8 Description read[DESCRIPTION-READ] 27b75b6dfcd18862d7883c474f22b9e39772185c4ff1601a02a9331c0458d57d 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 |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The row's status word now matches the footer, and the blind reader saw that in the after shots ("the left list now matches what the open conversation is doing"). Notes
[UX-REVIEWED] 83e9fe8 Description read[DESCRIPTION-READ] c89b5026de1b1816b29c5464db269ed21c2c5ce16f9cabca6c1814e11088cdc3 That sha256 names everything this verdict read: the PR description, plus the 7 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: ApproveWhy: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. I'm approving this PR. With it, a running session row in the sidebar says "Compacting…" while its chat compacts. It works this out from the slot's run state. For the open slot that is The store sets The new test sends a real The First Principles lane blocked because the change copies An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
The row's running line was built from the slot's status detail only, which keeps the thinking phase from before a compaction, so the row said "Thinking..." while the chat footer and the crew member pill said "Compacting...". The row reads the slot's run state through selectSlotStreamState in its one store subscription and, while it is compacting, shows the footer's word on its running line, goal-loop detail and tooltip. A session the tab does not watch gets no chunk after a compaction, so its background run state takes the compaction result notice as the end of the compaction. selectSlotStreamState reads the per-slot run map with optional chaining, as the pending-turn selector beside it does. Closes #34313
f3615b5 to
83e9fe8
Compare
|
self-added: yes
[operator: bolichen97] |
|
Rebased: main moved in website/src/pages/chat-sidebar/SessionRow.tsx and nine files beside it in website/src/pages/chat-sidebar/ since this head was built, and main now carries the fix for the two Windows backend reds this head saw on its old base (test_wait_discipline_ratchet and test_updates_handlers_facade, fixed in #35625) (ee7a026 -> 169429f); CI re-running. [operator: bolichen97] |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
This review checked head 83e9fe8. The row reads the existing selectSlotStreamState inside its one shallowEqual subscription, so it adds no re-render. The new background exit from compacting runs only after the redelivery guard, only from the compacting state, and only on a real result notice, not on a notice-tagged frame. It writes through setRunState and syncOriginRun. Every busy check still reads busy. The catalog key exists in every locale. The new test fails if either production hunk is reverted, and it uses no sleeps or timers.
Done well: the row shows the footer's own catalog key through the same run-state seam, so the two cannot drift apart.
Optional:
- The member pill and the split-pane footer for a background slot also leave Compacting at the notice. That is intended and matches the backend contract. A short PR comment saying so would help, since the body says those surfaces do not change.
- Add a case with activeSlot set to 'k', and a case where a notice-tagged frame (for example notice 'stuck_turn') leaves the row on Compacting. This pins both guards on the new exit.
- The goal-loop detail and the status tooltip call sites are not covered by a test.
The palette's recent-session row built its running label from the slot's status detail only, which keeps the thinking phase from before a compaction, so it said "Thinking..." while the chat footer said "Compacting...". The recents provider now reads each live slot's run state through selectSlotStreamState and, while it is compacting, shows the footer's word, as the sessions sidebar row does since #35685. Closes #35592
…cts (#36316) * fix(palette): say compacting on a recent session while its chat compacts The palette's recent-session row built its running label from the slot's status detail only, which keeps the thinking phase from before a compaction, so it said "Thinking..." while the chat footer said "Compacting...". The recents provider now reads each live slot's run state through selectSlotStreamState and, while it is compacting, shows the footer's word, as the sessions sidebar row does since #35685. Closes #35592 * fix(palette): re-run recents search when a slot starts compacting The palette re-runs the recents search only when its live fingerprint changes, and a compaction moves only the slot's run state, so an open palette kept the pre-compaction label. The fingerprint now carries the keys of compacting slots, read through selectSlotStreamState. --------- Co-authored-by: Jacob Largent <largjaco@dev-dsk-largjaco-kiroc-2a-dc066d04.us-west-2.amazon.com>
Problem / Motivation
Goal: While a chat compacts, its row in the sessions sidebar says "Compacting…", the same word the chat footer and the crew member pill show.
During a manual
/compact, or an automatic compaction inside a turn, the chat footer says "Compacting…" but the session's row in the sessions sidebar keeps saying "Thinking…".Why it matters
The sidebar is where people watch sessions they are not looking at. "Thinking…" tells them the model is working on an answer, when the chat is compacting its context and will not answer until that ends. Two surfaces name the same moment with two different words.
Not a goal
compactingslot flag): the row is not in its running state then, and the chat footer does not show it either.What changed (motivation → approach → change)
The row's running line (
slotStatusTextinpages/chat-sidebar/SessionRow.tsx) was built from the slot's status detail only. That detail keeps the thinking phase from before the compaction, so the row said "Thinking…". The footer and the member pill read the slot's run state throughselectSlotStreamState, which the store sets tocompactingwhen the compaction frame arrives.The row calls that same selector in its one existing store subscription (
selectRowLive). While the run state iscompacting, the row's running line, its goal-loop detail and its tooltip say the footer's own word (pages.chat.chatFooter.compacting). Once the run state moves on, the line shows the tool or thinking text again.A session this tab does not watch gets no chunk after its compaction, so in
store/chatSlice.tsits background run state leavescompactingwhen the compaction result notice arrives, the frame every tab receives. Without that, its row would say "Compacting…" until the turn ended.selectSlotStreamStateinstore/chat/selectors.tsreads the per-slot run map asslotRun?.[slot], the way the pending-turn selector beside it does. The real store always starts that map empty; the sidebar's test stores are built without it, and there the selector reads such a slot as idle instead of throwing.Backwards compatibility
Compatible: the row shows one more state word; no API, store shape, setting or catalog key changes. A background session's run state leaves
compactingat the compaction result notice rather than at its next chunk, tool row or turn end.selectSlotStreamStatereturns the same value for every store that has its run map.Removes nothing: the change adds a reading to the row's status line and takes nothing away.
Tests
ChatSidebar.toolStatusSetting.test.tsxgains one case: a running row whose status detail is thinking reads "Thinking…", reads "Compacting…" and not "Thinking…" after acompactingframe for its slot, and reads "Thinking…" again after the compaction result notice.Proof: not provable -- frontend test (prove.py runs Python only)
With
SessionRow.tsxput back to its base, the new case fails at its "Compacting…" check and the file's six other cases pass; with onlystore/chatSlice.tsput back, it fails at the "Thinking…" check after the notice; with the fix, all seven pass. Determinism: the file passed 10 repeated runs, and a shuffled run (--sequence.shuffle --sequence.seed=4242) withChatSidebar.statusMarker,ChatSidebar.liveDotandChatSidebar.goalLooppassed.Manual verification
The built dashboard was opened in Playwright with the API stubbed and the websocket mocked: two running sessions get a turn start, then the open one gets the
compactingframe/compactsends. Before the fix its row says "Thinking…" under the chat's "Compacting…"; with the fix it says "Compacting…", and the other running row still says "Thinking…". Checked in dark and light.Screenshots / video
Dark, before (base) and after (this PR): the open chat is compacting.
Light theme
Related Issues
Closes #34313
Sibling sweep
Swept: git grep -n "toolStatusLabel(" -- website/src ':!.test.'
Sibling: website/src/components/commandPalette/providers/recentsProvider.ts:231 -- tracked in #35592
Sibling: website/src/pages/members/useSlotActivity.ts:52 -- not affected -- resolvePillActivity reads the run state and says Compacting first
Pattern harvest
Not generalizable: one surface built its status word from the status detail alone; the run-state seam it skipped is already the one the footer and the pill read.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)