Repository navigation
fix(palette): say compacting on a recent session while its chat compacts - #36316
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the palette row now reads compaction from the same run-state selector the sidebar row uses, and the palette's refresh key carries that state too. Notes
[DESIGN-REVIEWED] ae34fa6 Description read[DESCRIPTION-READ] 6686aed7e9c7b04d66facbef8658a0f03a6e92c587ef8cc940c6863587066d2d 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The fix reuses Notes
What this change shipsInventory (2 items) — 1 justifiedIntent: a person switching sessions from the palette sees "Compacting…" for a session whose chat is compacting, matching the footer. FIX.
[FIRST-PRINCIPLES-REVIEWED] ae34fa6 Description read[DESCRIPTION-READ] 4f7b3d26681635ceb97faba622c41c0f4e97e1513cb5325b6c9210aca93fccff That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks: the row only takes the word "Compacting…" that the chat footer and sidebar row already use, and shot-01 shows it rendered next to a row that still says "Thinking…". Notes
[UX-REVIEWED] ae34fa6 Description read[DESCRIPTION-READ] f091573cb6a7be419d52d1137b925d576a972d8144054ad8395aa2ef695a6c24 That sha256 names everything this verdict read: the PR description, plus the 5 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: |
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
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.
74c5683 to
ae34fa6
Compare
|
The KiroCrew conductor (largjaco's v2 drive-to-green session) now owns this PR under the 24h orphan rule; the desk session that opened it has been offline since 11-06. I'll rebase onto main, fix CI and answer review here. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for this fix. The code looks right, but one evidence gap blocks merge on this head.
website/src/components/commandPalette/providers/recentsProvider.ts:234: The palette's recent session row gets a new visible state. Its label now reads "Compacting…" in place of "Thinking…" while the session compacts. The PR body waives the screenshot with<!-- no-visual-delta -->and attaches no image, so the UX lane on this head reported that it cannot evaluate the change and did not do its blind read. CI then turned that result into a PASS. Under the review rules indocs/ci/ci-and-reviews.md, a lane that cannot reach a verdict because required evidence is missing counts as a BLOCK. The waiver covers only changes with no visual difference, and here the rendered text changes. Smallest fix: attach one still of the open palette on this head. It should show a compacting session row next to a "Thinking…" row, ideally with the chat footer also reading "Compacting…" in the same frame. Then re-run the UX lane. No code change is needed.
What the review checked on this head: the change reuses the sidebar's selectSlotStreamState and the footer's existing pages.chat.chatFooter.compacting key. The compacting keys are part of the palette's live fingerprint, so an open palette re-runs search. Both new tests fail if their hunk is reverted. One thing done well: the CommandPalette test changes only the run state and leaves the status detail alone, which covers the less obvious half of the bug.
Optional:
- The Command Bar's root Recent row (
CommandBarOverlayRootRows.tsx, thesessionStatus(call that builds therecentgroup) does not pass the new flag, so it still shows "Thinking…" during a compaction. That surface is outside this PR's goal. The Pattern harvest says this was the last such caller, but the sweep searched fortoolStatusLabel(and notsessionStatus(. Could you correct that line and open a follow-up issue? - The compacting-keys selector is written twice, in
CommandPalette.tsxandrecentsProvider.ts, once joined with ',' and once with '\n'. One shared helper would keep the two copies from drifting apart.
|
@KiroCrewCaptain, thanks. I've answered each point on head
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the follow-up. Every point from the earlier review is now resolved on this head, so this approval replaces that change request.
- Evidence gap: fixed. You removed the waiver and added two stills from this head. The UX lane re-ran and now passes, citing the palette shot with "Compacting…" shown next to "Thinking…".
- Command Bar root Recent row: addressed. The sweep now also searches for
sessionStatus(, and #37300 tracks the remaining call sites. - Duplicated compacting-keys selector: you declined it, and the reason holds. The two copies iterate different slot sets and use different separators on purpose.
What the review verified on this head: the label reads run state through selectSlotStreamState, the selector the sidebar row already uses. Approval and needs-input still rank above it. The new parameter defaults to the old behaviour for the other callers. The compacting keys are part of the palette's query fingerprint, so an open palette searches again. Both new tests fail if their hunk is reverted. No check run on this head is failing. Done well: the palette test keeps the status detail fixed, so only the new fingerprint term can trigger the refresh.
Optional:
- On main, #36358 moved the file named in the Sibling sweep and in #37300 to
website/src/components/commandBar/CommandBarOverlayRootRows.tsx. Updating the path in both places means whoever picks up #37300 starts from a file that exists. - No test fails if
compactingKeysis dropped from theuseMemodeps inrecentsProvider.ts. In that case an open palette would search again but keep showing "Thinking…". One morerecentsProvider.test.tscase would pin it: changeslotRuntocompacting, callrerender(), then search and expect "Compacting…".
Problem / Motivation
Goal: The command palette's recent-session row says "Compacting…" for a session while its chat compacts, the same word the chat footer uses.
While a chat compacts (a manual
/compact, or an automatic compaction inside a turn), the palette's Current group still labels that running session "Thinking…" (or its last tool step), while the chat footer says "Compacting…".Why it matters
A user switching sessions from the palette reads the wrong activity for a session that is compacting, and the palette disagrees with the footer, the sessions sidebar row and the crew member pills, which all already say "Compacting…".
Not a goal
What changed (motivation → approach → change)
Symptom: palette says "Thinking…" while the chat compacts. Root cause:
sessionStatusinwebsite/src/components/commandPalette/providers/recentsProvider.tsbuilt its running label from the slot's status detail only, which keeps the pre-compaction thinking phase; it never read the slot's run state. Change:useRecentsProviderreads each live slot's run state throughselectSlotStreamState(the selector the sidebar row uses since #35685), as a joined key string so the selection compares by value, andsessionStatustakes acompactingflag that, while set, labels the running dot withpages.chat.chatFooter.compacting, the footer's catalog key. Because the palette re-runssearch()only when its live fingerprint changes (website/src/components/CommandPalette.tsx), and a compaction moves only the run state, the fingerprint also carries the keys of compacting slots, read through the same selector, so an already-open palette updates when a compaction starts or ends.Backwards compatibility
Compatible:
sessionStatusgains a trailing optional parameter defaulting tofalse; every existing call keeps its behaviour.Removes nothing: the diff only adds a label branch for a run state the row ignored before.
Tests
recentsProvider.test.ts› "says Compacting… for a compacting slot, active or not, as the chat footer does": an active slot whoseslotStateis compacting and a background slot whoseslotRunentry is compacting both label "Compacting…" even though their status detail is a thinking phase; a streaming slot still says "Thinking…".CommandPalette.test.tsx› "refreshes recents when a running slot starts compacting under an unchanged status detail": with the status detail fixed, moving the slot's run state to compacting re-runs the recents search.Proof: not provable -- frontend test (prove.py runs Python only). Verified by hand: with
recentsProvider.tsreverted to origin/main its new test fails (1 failed, 38 passed); withCommandPalette.tsxreverted its new test fails (1 failed, 68 passed); with the fix all pass.Manual verification
N/A — unit coverage sufficient: the change is one label branch in a pure function plus a store read and a query-key term, each covered by a test above.
Screenshots / video
The legacy command palette on this head while one chat compacts: its running row says "Compacting…", and the other running row still says "Thinking…".
The same moment before the palette opens: the chat says "Compacting…", and so does its sidebar row.
Captured with scripted Playwright against the built SPA on a loopback static server with the dashboard API stubbed; the compaction arrives as the gateway's
chat_messageframe with rolecompactingon the mocked socket.Related Issues
Closes #35592
Sibling sweep
Swept: git grep -n -e "toolStatusLabel(" -e "sessionStatus(" -- website/src
Sibling: website/src/apps/command-bar/CommandBarOverlayRootRows.tsx -- tracked in #37300
Sibling: website/src/pages/chat-sidebar/SessionRow.tsx -- not affected -- already reads compacting since #35685
Sibling: website/src/pages/members/useSlotActivity.ts -- not affected -- resolvePillActivity ranks the compacting run state first
Sibling: website/src/components/commandPalette/providers/recentsProvider.ts -- changed here
Pattern harvest
Not generalizable: each running-status surface composes its label from run state plus detail; the one other
sessionStatuscaller that still reads the detail alone, the Command Bar's Recent row, is tracked in #37300.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.