Repository navigation
feat(web): route an agent-switch refusal through the shared error notice - #11030
Conversation
|
👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review. When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically. |
UX Review (Opus 5.5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The screenshots show the banner on the dashboard in both themes, in the popout and next to the silenced in-pane copy. This fork lane has no blind read, so nobody has judged the wording cold; pushing the branch to this repository gets one. Notes
[UX-REVIEWED] 09fd9a7 Description read[DESCRIPTION-READ] 2be29d859a8b7cc6d85c85db16d51252b23321cd6df8215590f3c813afff4711 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 |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level blocker: the in-place copies go quiet only while the banner is mounted in every window that can show them, and the screenshots cover every layout. Notes
[DESIGN-REVIEWED] 09fd9a7 Description read[DESCRIPTION-READ] 01f4c16e03f64eba75dd5c55779270223082cdd94ad2b00c5f0918e789f8fdd7 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 |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (8 items) — 8 justifiedIntent: a screen-reader user hears a refused agent, model or threshold write announced once, and the refusal is visible in popout and embed windows. FIX.
[FIRST-PRINCIPLES-REVIEWED] 09fd9a7 Description read[DESCRIPTION-READ] 7fcb9c483839df2a5e528aad891212e557ca47f53f6885b6008b80558379ced3 That sha256 names the PR description this verdict read. Recompute it with |
624dcca to
f7cd5f5
Compare
f7cd5f5 to
5e0d4ff
Compare
5e0d4ff to
ab36a6e
Compare
82d62e9 to
7f28767
Compare
7f28767 to
6f7073c
Compare
6f7073c to
b760a4a
Compare
|
🤖 Kiro Crew [operator: dwu96#8c08bee0]: This PR has been stalled since the last review. I reviewed the blockers but they require your input rather than a mechanical fix:
When you've addressed these, the pipeline will re-assess on its next cycle. Add |
|
PR triage (automated, 2026-10-05): OVERLAPPING. Recommend REBASE and a merge-order discussion. No breaking change or P0 found. 1. Rebase needed. The merge base is 2. The 503 branch still has no emitter on main. The parent, #7161 (a PR), was closed without merging. 3. Conflicts with other open PRs over what the toast means. This PR makes
Whichever of these merges second would show a success or info message as a red assertive alert. The owners of #9115, #10652 and #15978 should agree on one approach: a separate info notice slot, or a severity carried in 4. The description doesn't match the diff. Earlier reviews already flagged this: the body describes a warn tint and an Classification: OVERLAPPING with #12702, #12055, #9115, #10652 and #15978. Not DUPLICATE or SUPERSEDED: nothing on main or in any merged PR adds |
|
Re-verified each item at the current head 1. Rebase — done. The merge base is now On the 2. The 503 branch — dropped, as you asked. 3. Toast meaning across open PRs — narrowed, and still your call. Two of the three you listed are now closed; only the informational effort toast remains open. Your reading of main still holds at the current tip: 4. Description vs diff — still true, and not fixed here. The body describes a warn tint, a hand-off, a catalog string and an |
|
Hold at
Routing the refusal through — crew-pr-reviewer (r113) |
Rebuilt on kirodotdev#24975 banner: one announcing surface, popout/embed mount.
bolichen97
left a comment
There was a problem hiding this comment.
[operator: bolichen97] Approving at 09fd9a7.
Routing the refusal through the shared ErrorNotice with one announcer per frame looks sound, and no breaking change was found. On the earlier hold items:
- The
workspace_unavailablebranch is dropped from this head, so there is no dead code waiting on an emitter. - The merge-order question with the informational effort toast is moot: that PR is closed, and the banner already splits error and status notices on main.
- The banner hiding while a remote instance pane is in front is existing behavior; this head does not move that mount. Accepted as is.
- The 6s auto-dismiss now also applies in popout and embed windows, which matches the dashboard. Accepted as is.
Non-blocking suggestions:
useChatPanePickers.tsswitchModelclears the banner before retrying, which can also wipe an unrelated status notice. The identity guard used on the auto-compact path would avoid that.temp-screenshots/*.pngandwebsite/scripts/capture-agent-switch-turn-in-flight.mjsare committed. Please consider dropping them from the branch if they are only PR evidence.
AI-assisted, approved by bolichen97
Carved out of #7161, which is 8.4x over the 1500 added-line cap and is being split so it can
actually be reviewed. Frontend only. Rebuilt on top of #24975, which shipped the shared
AgentSwitchNoticeBannerthis PR now uses unchanged.Problem / Motivation
Goal: A refused agent switch is announced to a screen reader once, and shows up in every window
that can raise it.
A refused switch or setting write is written to two surfaces at once: the shell's banner and the
in-place copy beside the control (the split pane's switch error, the auto-compact popover's error).
Both render
ErrorNotice, and both carryrole="alert", so a screen reader reads the same failureout twice.
The banner is also mounted only in the dashboard layout, while its dispatchers (the keyboard agent
and model cycle, the session pickers, the auto-compact unmount flush) run in popout and embed windows
too. There the failure renders nowhere.
Why it matters
A switch refused because a turn is already running is routine and happens mid-task. The double
read-out is worst for the people who depend on the live region, because the second reading arrives
with nothing to mark it as the same event. In a popout window the keyboard cycle has no other
surface, so a refused switch there is silent today.
Not a goal
AgentSwitchNoticeBanner, its error/status split or its new-chat offer from fix(chat): name the crewmate and offer a new chat when a chat with history refuses it #24975.codeor HTTP status into the notice.workspace_unavailable503 branch. The backend that emits it is still in the parent PR.What changed
ErrorNoticegains anannounceprop. The in-place copies passannounce={false}(ChatPane.tsx,chat-input/ContextShelf.tsx), so they keep their text and drop their live region, which leaves thebanner as the single announcing surface.
reportSlotWriteFailureandclearSlotWriteFailureincomponents/slotWriteFailure.tswrite the banner and the in-place copy in one call, so the pairingholds by construction:
useChatPanePickers(switchAgent,switchModel) andautoCompactgothrough them instead of setting each surface by hand.
App.tsxmounts the banner in popout and embed windows too,{(isPopout || isEmbed) && agentSwitchNotice && <AgentSwitchNoticeBanner ... />}, beside theother frame-gated notices above the layout branch. The dashboard keeps its existing mount.
switchModelnow clears a stale banner before it retries, asswitchAgentalready did, so a repeatof the same refusal announces again. An auto-compact slider drag clears the banner only while it
still holds the notice object that slider stored, compared by identity rather than text, so an unrelated notice on the banner (the session-folder line)
is left alone.
Tests
tsc -p tsconfig.app.jsonclean,eslint src/ --max-warnings 0clean,jscpdzero clones.ErrorNotice.announce.test.tsxpinsannounce={false}dropping the live region while keeping thetext readable, in both variants.
agentSwitchNotice.pairedSurfaces.test.tsxrenders each silenced call site beside the real banner onone real store, drives the real failure through the real API layer, and asserts exactly one live
region carries the failure text and that it is the banner's. It also drives the slider twice: a drag
leaves an unrelated notice in place, leaves another control's failure with the same text in place, and still clears the slider's own stale failure after its
in-popover copy was dismissed.
App.topbarAndShortcuts.test.tsxrenders the app at a popout path, drives the real keyboard agentcycle against a rejecting API, and asserts the banner renders and announces there. A second arm pins
the two mounts.
agentSwitchNotice.surfacePairing.test.tsscans source for anannounce={false}copy set outside thehelper, and for a switch or slider retry that does not clear the banner first.
App.tsxandChatPane.tsxswapped back in, 5 arms fail (thesingle-announcement check, the popout render and the three mount/silencing pins).
Manual verification
Driven against the real built SPA with stubbed APIs by
website/scripts/capture-agent-switch-turn-in-flight.mjs, which asserts the banner and itsturn_in_flightcopy before each frame. In a 520px popout the banner sits below the window's ownheader and Return control.
Screenshots
Dashboard, dark and light (
temp-screenshots/agent-switch-notice/01-turn-in-flight-dark.png,01-turn-in-flight-light.png):Popout window, where the banner did not render before
(
temp-screenshots/agent-switch-notice/02-turn-in-flight-popout.png):Split pane, with the banner and the silenced in-pane copy together
(
temp-screenshots/agent-switch-notice/03-turn-in-flight-split-pane-both-surfaces.png):