Repository navigation
feat: show a pending badge on the project chip after a mid-reply pick - #31080
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: a real touch-discoverability gap, closed by a small client-side hook on the existing chip, with rendered evidence attached. Notes
[DESIGN-REVIEWED] 28e39da Description read[DESCRIPTION-READ] 1cb9d00f61377bff8283e92d2cf2c216bc53ebf8c1d4596aeaf6e927bd4e1517 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) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the compact-shelf badge as HEAD renders it (clock plus truncated folder name). The description says the compact frames were "captured before the folder name was added and show the clock alone". Evidence gaps
Notes
[UX-REVIEWED] 28e39da Description read[DESCRIPTION-READ] 85be7872f234cf973057090acdb0bf3403e730e26f083281440ab252b7b3259e That sha256 names everything this verdict read: the PR description, plus the 11 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. Every item is needed to show the staged pick until it applies, and the one helper this PR moves, Not checked: whether issue #20350 matches this scope; the description is the only source. What this change shipsInventory (8 items) — 8 justifiedIntent: when someone picks a project while a reply is running, they can see without hovering that the switch has not applied yet. ADDITION, a follow-up to #17729.
[FIRST-PRINCIPLES-REVIEWED] 28e39da Description read[DESCRIPTION-READ] 2c529779f20d181632fa649661ee4482c40986ab0edd74487d3e9d9a2dcaa57d That sha256 names the PR description this verdict read. 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: |
|
UX Review BLOCK addressed in 40033fc:
GPT 6.1 Review posted no verdict comment on db09087 (treated as a rate-limit flake). Its lane re-runs on this push. |
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: |
40033fc to
de2c649
Compare
de2c649 to
afe29e4
Compare
afe29e4 to
edd0fc5
Compare
|
UX Review BLOCK on afe29e4 (compact-shelf clock glyph not understood) is addressed in edd0fc5, folded into the 2nd commit:
The two non-blocking notes (naming the subject in the "Starts next message" badge, and adding a picker cue on the chip) are not in this push. |
64681f5 to
9b117df
Compare
|
Review follow-up on 64681f5, folded into the 2nd commit as 9b117df:
|
9b117df to
28e39da
Compare
|
Review follow-up on 9b117df. I folded the fix into the 2nd commit as 28e39da.
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for this. The code and tests look solid on this head. One thing still blocks, and it is evidence, not code.
website/src/components/chat-input/stagedProject.tsx:104-115(compactProjectPendingBadge): nobody has seen this render as HEAD draws it. On a compact shelf (400px window), HEAD draws a clock followed by the truncated folder name. The two compact frames in the description were captured before the folder name was added, so they show the clock alone, and your last comment says they have not been re-captured. The UX review on this head says it "cannot evaluate" the compact badge for that reason. It reads as PASS only because of a format rule. Under the review rules, a verdict a lane cannot reach because evidence is missing is a block. The earlier clock-only badge also failed the UX read, so the folder name is the fix that most needs a look. The "Manual verification" text also still says each frame asserted "the clock on a compact shelf", butwebsite/scripts/capture-project-chip-pending.mjs:31now expects "OtherRepo", so that sentence describes an older run.
Smallest fix: runcapture-project-chip-pending.mjsat this head in dark and light. Swap the two compact images for the new frames and update the Manual verification sentence to describe this run. No code change is needed. The UX review will then run again on the new evidence.
Done well: the turn opener check is now one shared opensRunTurn in groupDisplayItems.ts instead of a second copy, and each review-round fix comes with a test that fails without it.
Optional:
docs/system-specs/modules/learn-cron-dashboard.md(section "Project switch during a response") does not yet describe the visible badge, the newproject_switch_pendingline, or howuseStagedProjectkeeps the start project for each slot. One or two sentences in this PR would cover it.- On a wide shelf just above the compact cutoff, the badge is
shrink-0with no truncate, so a long translation (pt, es) could push into the next segment. One frame at about 380px wide in a long locale would show whether it fits, and you can take it in the same capture run. ChatPane.tsxcomputes and passesprojectTurnKey, but ChatPane never renders the project chip, andStagedProject.turnStartProjectis never read. You could drop both.
|
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 the evidence block on 28e39da is addressed. No code changed, so the head is the same.
Optional notes, not in this round:
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
This head fixes the earlier change request. The compact frames were re-captured at 28e39da and show the clock followed by "OtherRepo", which matches what ProjectPendingBadge compact draws, and the Manual verification sentence now describes that run. The review checked the full diff and every ChatInput host: the per-slot start project, the run-turn re-key, the hold while sub-agents lock the chip, and the move of opensRunTurn with no logic change. It found no security change and no blocking rule hit. Every check run on this head passed. Done well: each review-round fix ships with a test that goes red without it, and the shared opensRunTurn replaces a private copy.
The design is signed off under the standing maintainer sign-off for changes by team members.
Optional:
docs/system-specs/modules/learn-cron-dashboard.md("Project switch during a response") still saysChatInputsnapshots the start project. If this PR merges before #31229, the spec stays stale until that one lands.stagedProjectTurnKeykeys on the opener row'sts, and the send echo rewrites it to the server time. Keying onmeta.clientTs ?? ts(asuseStableMessageKeydoes) and adding a test for it would remove that risk.ChatPane.tsxcomputesprojectTurnKeybut renders no project chip, andStagedProject.turnStartProjecthas no reader. Both can be dropped in a follow-up.
Problem / Motivation
Goal: A project picked while a reply runs shows a visible, accessible pending badge on the project chip until that project takes effect.
Since #17729 the project chip stays enabled mid-reply and a pick is staged for the next turn. The chip names the picked project at once, but the only sign that the running reply still works in its old directory is the chip's tooltip. Touch users cannot hover, so they see the new project name with no hint that it has not applied yet.
Why it matters
A user on a phone or tablet who picks a project mid-reply reads the chip as "already switched" and can misjudge where the running reply is writing files. The reviewer on #17729 asked for this follow-up so the pending state is discoverable without hover; #7263 stays open until it is.
Not a goal
What changed (motivation → approach → change)
The tooltip was the only carrier of the pending state, so the fix puts it on the chip as rendered text. The start-of-turn snapshot that the tooltip already used moves out of
ChatInput.tsxintowebsite/src/components/chat-input/stagedProject.tsx(useStagedProject), which also answers whether a pick is still pending: the composer is busy and the chip's project differs from the one the busy window started in. The composer's busy flag stays true while attached sub-agents run after the reply ends, which is exactly the window where the server's deferred reset stays armed. The badge clears as soon as the composer goes idle: from then on the chip names the project the next message will use, so nothing is pending.While pending, the chip shows a small "Starts next message" badge, which says on its own that the switch is still to come (on a compact shelf, where the chip drops its folder name, it is a clock followed by the picked folder's name, truncated at 88px), its accessible name and title gain "Switching to from your next message.", and the existing
role="status"line announces it. The locked-by-sub-agents tooltip keeps the pending line too. The start-of-turn project is kept per chat (a map keyed by slot, dropped once that chat is seen idle), so leaving a busy chat and coming back keeps its pick pending.ChatPane.tsxandComposerDockView.tsxpass aprojectTurnKey(stagedProjectTurnKey(messages): the last row that opens a run turn, per the sharedopensRunTurnpredicate ingroupDisplayItems.ts, whichcrewmateBrowserLive.tsxnow uses too); when a queued message opens the next turn without the composer going idle, the hook re-takes the start project and the badge clears. While the chip is locked by attached sub-agents the held start survives a turn-key change, because the server keeps the reset deferred, so a sub-agent completion turn does not clear the badge. Two new catalog keys (components.chatInput.project_switch_pending,project_pending_badge) go intowebsite/src/i18n/locales/en.manual.jsonand every shipped locale, with entries inwebsite/src/i18n/en.context.json, anden-XAis regenerated. A capture script,website/scripts/capture-project-chip-pending.mjs, renders the realChatInputand asserts the badge before writing each frame; the fixturewebsite/capture/project-chip-mid-turn.tsxgainsbare=1(product UI only, no printed accessible name),width=N(compact shelf) andlockAfterPick=1(sub-agents attach after the pick).Backwards compatibility
Compatible: purely additive UI on the existing chip; no route, payload or stored state changes.
Removes nothing: the tooltip and accessible name keep every line they had, with one line added.
Tests
website/src/test/ChatInput.stagedProject.test.tsx(new, 12 tests) pins:projectLockedto the hook);stagedProjectTurnKeynames the last run-turn opener and skips steers and parked sends;svg.lucide-clock) plus the picked folder name, aria-hidden, while the accessible name keeps the pending line.Six of the first seven fail with the
ChatInput.tsxchange reverted (the first is the negative case). The copy and compact-glyph assertions (2 tests) fail with the previous revision's badge.Proof: not provable -- frontend test (prove.py runs Python only)
Local gate at 40033fc: frontend related set green (126 files, 2167 tests); backend related batches green with the host reds below deselected. Backend related set: every red also fails at the merge-base on this host (sandbox/environment reds, not this diff):
file_explorer/tests/test_server.py,test_auto_improvement_members.py,test_design_tweak_backend.py,test_design_tweak_devproc.py,test_dashboard_gallery_approvals.py,test_docker_entrypoint.py,test_crew_image_build_plan.py,test_mcp_slim_entry.py,test_kas_bundle.py,test_find_ui_auto.py,test_living_ui_harness.py,test_native_skill_projection.py. One load-sensitive red intest_sandbox_argv_spawn.pypassed on two reruns at HEAD.Manual verification
Ran
website/scripts/capture-project-chip-pending.mjsat 28e39da against a local Vite server with every/apicall stubbed (no gateway, no dashboard token) in both themes, three after-pick states each: every frame asserted no badge before the pick, the fixture's printed label hidden, and after a tap-pick a visible badge with no hover ("Starts next message" on the full shelf and on the locked chip; on a compact shelf the clock glyph plus the visible text "OtherRepo"), plus the pending line and either "This reply finishes in KiroCrew." or the sub-agents lock line in the accessible name.Screenshots / video
Product UI only (no printed tooltip text). After a mid-reply pick, pointer away from the chip (dark, light):
Compact shelf (400px window): the chip drops its folder name, and the badge is a clock followed by the picked folder name, "OtherRepo". Captured at 28e39da (dark, light):
Sub-agents attached after the pick: the chip is disabled (asserted by the capture) and keeps the badge. The disabled chip has no separate disabled look, so this frame matches the unlocked one pixel for pixel (dark, light):
Before a pick (no badge)
Related Issues
Closes #20350
Follow-up to #17729; part of #7263 (stays open).
#20352 stacks on this PR; merge this first.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement