Repository navigation
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. |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that only one of [DESIGN-REVIEWED] ccae712 Description read[DESCRIPTION-READ] dd6dd34d3951f1a1ef54269b2f64e1ef6c5abc7eb5e65676408104ec5053b366 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, fork) — 🔴 BLOCKUX-level review of UX-Verdict: BLOCK cannot evaluate: missing the cause clause that every pin, move and colour notice now carries; the screenshots show older copy that this head no longer renders. Evidence gaps
Watch
[UX-REVIEWED] ccae712 Description read[DESCRIPTION-READ] 231fd50fd2c429d4e2b4580ffbf61b6271afdf15df886a579273b237751493ed That sha256 names everything this verdict read: the PR description, plus the 12 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) — 🔴 changes requested (blocking)Reviewed Adjudication upheld 1 of 1 blocking finding(s); those must be resolved before merging. BLOCKING -- website/src/components/SendToInstanceSubmenu.tsx:213 -- Send failures disappear when the menu closes before the response [BLOCK-MERGE] ccae712 Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1: Medium harm, and silent. The send fails with nothing on screen, so the user may believe a copy reached the peer when it did not. |
First Principles Review (Opus 5.5, fork) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The new app-wide failure store is a second page-level error sink next to ChatPage's Not justified as shipped
What this change shipsInventory (8 items) — 7 justifiedIntent: a refused session write (pin, colour, folder, send, reload) tells the user it failed and offers "Ask the agent", instead of silently reverting. This is a FIX, framed as
[FIRST-PRINCIPLES-REVIEWED] ccae712 Description read[DESCRIPTION-READ] 21f49394c1424051f4f428baa1fc94170e41d62f382eb32b6b5bb4b48bd937cb That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings that block the merge. FINDING — website/src/components/SendToInstanceSubmenu.tsx:588 — the failure is only reported if it is already in FINDING — website/src/components/SendToInstanceSubmenu.tsx:570 — choosing the row's [OPUS-REVIEWED] ccae712 |
19df22d to
1389806
Compare
1389806 to
f2d2359
Compare
f2d2359 to
ef171fd
Compare
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PR triage (automated, evidence-based) — REBASE + merge-order discussion Classification: OVERLAPPING (not duplicate, not superseded). No breaking change or P0 bug found in the diff. Rebase needed. The branch is 918 commits behind
Still needed on main. Overlap to coordinate (merge discussion):
Recommendation: rebase onto current main (dropping the mode adopter), then continue review. Keep this PR open. |
iamwhatever
left a comment
There was a problem hiding this comment.
Requesting changes on 63b58a1.
The store and sink look correct: one bounded module store, a sink in each always-mounted shell, and the leave guard on the hand-off. The only change to errorReport.ts exports the existing redactThenCap, so redaction is unchanged. All checks are green.
Before approval:
- Nothing answers the UX and First Principles CONCERNS on this head. The last disposition is for 939275d. Please reply to each item. For UX: the send screenshot predates the rebase. It still shows 'Switch to Autopilot' and an unquoted peer sentence, while SendToInstanceSubmenu.tsx#L199 now quotes it, so please re-capture it from this head. The duplicated peer sentence and the two 'Ask the agent' buttons on a failed send, and the pin/move/color messages that give no next step, need a fix or a reasoned reply.
- Two deferred items have no issue. The first is folding
showActionError(turnActions.ts#L81) into the store; this is the First Principles 'Clears when'. The second is moving main's fork-failure messages ontoreportActionFailure, which the description names as a follow-up. #14892 covers onlyagentSwitchNotice. Please do these now or open one issue per item and link them in the description.
— crew-pr-reviewer (r114)
Seven write actions dropped a rejected PATCH silently, so a failed pin, mode, colour or move looked applied. Split from a larger sweep. Rebased onto current main; conflict resolution kept main's removal of the no-op chat-slots invalidateQueries (kirodotdev#10204) and carried only reportRevertedPins. Corrected a comment that misattributed an onPick guard to FolderMoveSubmenu. A second rejection that lands before the first is dismissed now stacks on top instead of overwriting it; dismissing the newer notice brings the earlier one back (bounded at ten, oldest dropped), and the banner says how many earlier failures are waiting. A refused reload leads with "Couldn’t reload" rather than claiming an update. The neutral heading uses the curly apostrophe its siblings use. Co-authored-by: Kiro Crew <noreply@kirodotdev.github.io>
|
[operator: bolichen97] Maintainer ruling: #10910 and #10911 cover the same rejected/offline session-write problem and only one should land. Keeping #10911 (readiness passed, review addressed) and closing this one. If part of the rejected-write notice is still needed after #10911 merges, please open a small follow-up on top of it. Thank you. |
Problem / Motivation
Goal: A rejected session write (pin, colour, move, send, reload) is reported to the user in one always-mounted notice with an "Ask the agent" hand-off, instead of silently reverting.
Five session-write actions dropped a rejected write silently or behind a native
alert(). Pin, colour, move to folder, send to instance and reload all applied their change optimistically and then reverted it when the server refused — with no error, no notice and no retry affordance.The user sees a pin flip and flip back. Nothing tells them the write was rejected, and the UI they are looking at is the correct post-revert state, so there is nothing to inspect.
Why it matters
These are the actions a user repeats fastest. A silent revert reads as the app losing input at random, and the natural response is to try again — which is exactly the wrong move if the server refused for a reason that will refuse again.
Several of these surfaces are menus that unmount on select, so the failure arrives after the component that issued it is gone. That is why a local
useStateerror cannot work here and why the notice has to live somewhere that outlives the click.Not a goal
What changed (motivation → approach → change)
One store, one sink, five reporters.
utils/actionFailure.tsuseSyncExternalStore) holding rejected-write reports, newest shown:{ message, subject?, report?, heading? }components/ActionFailureNotice.tsxErrorNoticebanner with the "Ask the agent" hand-off and a dismiss controlApp.tsx×2,pages/PopoutFrame.tsxwebsite/AGENTS.mdErrorNoticerule: a new always-mounted shell mountsActionFailureNoticetoodocs/feature-map/README.mdAny action reports with
reportActionFailure(message, subject?, report?, heading?). The sink is deliberately not inChatPage— a session write issued from the command palette on a non-chat route must still land, and a page-level sink would double-render on/chat.hooks/useSessionActions.ts(pin, reload),hooks/useMoveSlotToFolder.ts,components/SessionColorSwatches.tsx(both call sites) andcomponents/SendToInstanceSubmenu.tsx.Couldn't update "<name>". A failed send readsCouldn't send a copy of "<name>"and a reloadCouldn't reload "<name>"— none changes a setting. Their messages state the resulting state ("The copy was not delivered — this session is unchanged." / "No new session was created."). A report with no subject gets the neutral headingCouldn’t complete that action. The peer's fix-it sentence rides in the send message, quoted, scrubbed and capped (redactThenCap,MAX_MESSAGE), so it survives the menu closing. A newer failure stacks on top, saying how many earlier ones wait, and dismissing it brings the previous back; messages are past tense, so none goes stale. A failure that lands while a remote instance tab fills the window waits in the hidden local pane and shows on the return to Local. Each report carries its journal entry, so "Ask the agent" hands over the endpoint and status. The hand-off asks first: it runs throughuseGuardedLeave(viaErrorNotice'saskAgentGate), so a page holding an unsaved draft gets the same discard prompt as any other navigation. A write whose session has left the list by the time the server refuses reports nothing, whichever direction it went. A bulk pin revert gets a plural heading (Couldn’t update 3 sessions, viapluralKeys.json) and names the sessions withIntl.ListFormat.SendToInstanceSubmenukeeps the menu open on failure and renders an inlineErrorNoticeon the row plus a sibling "Ask the agent" item, replacing the oldFailedbadge. The page notice takes the SAME failure over when the menu closes and the row stops existing, so the peer's sentence and the hand-off never appear twice at once. The failure is held per instance, so a retry that succeeds withdraws its own hold rather than banner-ing something the user already fixed. The inline notice is capped atmax-w-[240px]and wraps, so a long server sentence cannot stretch the flyout to the viewport edge.writeFailureCauseinutils/actionFailure.ts): an ANSWERED refusal quotes the server's own words, scrubbed and capped with the journal's budget (Kiro Crew said “…”. Ask the agent if it refuses again.), and a rejection nothing answered names the one thing that clears it (Kiro Crew is unreachable. Reconnect and try again.). It is duck-typed onstatus, notinstanceof ApiError, because several suites mockapi/clientwholesale and a class check would send a real refusal down the nothing-answered branch.reload_failed_rejectedloses "the gateway answered with an error" for the product name and a next step.codewithparseErrorCode:turn_in_flightsays the agent is mid-turn,session_reboundsays the session was replaced while the reload ran,slot_subagents_runningsays sub-agents are still working, and only an unrecognised 409 code keeps a hedged "not in a state that allows a reload". Any other answered status gets a definite rejection message; "gateway unreachable" wording is kept only for a genuine transport failure.This PR is one unit of a split. A single larger change carried this store plus a ~18-control offline sweep at 4224 added lines, which is not reviewable. This unit is the reporting mechanism and its adopters; the offline sweep lives entirely in the sibling unit, and this one depends on no sibling.
Rebase onto main (2026-10-20)
Rebased onto current
mainas one commit. Two adopters were dropped because main changed under them:modeMutation/toggleModeno longer exist. The mode adopter, itsmode_change_failedstrings and its tests are gone.duplicate_*copy, plus thefork_corpus_too_largenotice viaforkFailureNoticeOffsite). That handler is kept as is; this PR'sfork_failedstrings and fork tests are removed. Moving those messages ontoreportActionFailurecan be a follow-up.The two journal-report and transport-text tests that drove the mode write now drive the pin write.
Also on this head: clicking a failed send row's inline error no longer sends the copy again (the error now stops
pointeruptoo, since a Radix item that saw nopointerdownclicks itself onpointerup; pinned with the real Radix item intest/SendToInstanceSubmenu.inlineError.test.tsx).Sibling sinks, and what is deliberately NOT in this unit.
ChatPage'sshowActionErrorslot (pages/chat/page/turnActions.ts) still reports fork and steer failures inside/chat, andImportSessionOutcomeNoticereports imports. A new reporter for a write whose menu can unmount, or that can fire off/chat, usesreportActionFailure.Two merges are left out on purpose, and neither is small:
showActionErrorinto the store.showActionErrorhas 195 references across 34 files, andsetActionErroris threaded as aDispatch<SetStateAction<…>>through 10 more with apreserveOnSwitchflag the store does not model and a slot-switch clear (composerDrafts.ts) that reads it. The notice also renders above the composer rather than in the app shell, so folding it moves where every one of those 195 sites reports. That is a unit of its own, not a rider on this one.reportActionFailure. Main handles a failed duplicate itself with cause-specificduplicate_*copy plus thefork_corpus_too_largenotice; Move the agent, model and effort switch toast onto the shared action-failure notice #14892 covers onlyagentSwitchNotice.Issues for both are owed and not yet filed.
Backwards compatibility
Compatible in behaviour: additive UI reporting, no API or storage contract changes. The catalogs under
i18n/locales/*.json(sourcei18n/locales/en.manual.json) do change existing keys:components.sendToInstanceSubmenu.failedis deleted (itsFailedbadge is replaced by the inline notice) andhooks.useSessionActions.reload_failed's copy is rewritten, both across all 13 locales;hooks.useSessionActions.reload_failed_rejectedis reworded again on this head, to name the product and a next step instead of "the gateway answered with an error"; every other key is new (the per-action*_failedmessages and headings,pin_change_failed_named, thereload_failed_busy/_rebound/_conflict/_rejectedvariants, and the two shared cause clausesutils.actionFailure.unreachable/.refused). The Koreanrefusedvalue uses ‘ ’ around its operand and{{productName}}이(가), whichsrc/i18n/style/koStyle.test.tsrequires of an interpolated value and a placeholder 조사.Tests
Each adopter has a rejection test asserting the notice appears with the right heading and subject, and a success control asserting no notice appears when the write succeeds — so a test cannot pass by the notice being permanently mounted (
test/sessionWriteFailures.test.tsx,test/actionFailure.test.ts,test/ActionFailureNotice.test.tsx,test/App.actionFailureNotice.test.tsx,test/SessionColorSwatches.test.tsx, plus updated suites for the adopters). Pinned specifically: each reload 409 code gets its own copy (and an unknown code the hedged fallback), a rejected pin hands its journal report to the notice, a report with no subject gets the neutral heading, a peer's refusal text is scrubbed of credentials and capped before either notice shows it, a hand-off the leave guard vetoes navigates nowhere and stages nothing (test/errorToAgent.test.tsxpins the gate reaching every button placement), a bulk pin revert counts and names every session, an untitled one by its key, a second rejection stacks over the first, the banner says how many earlier ones wait, and dismissing it brings the first back (bounded, oldest dropped), a refused reload leads withCouldn’t reload, and a rejected pin, mode, move or colour write on a session that has left the list reports nothing.test/ChatPage.sessionTabs.test.tsxpins that the chat page renders no second sink, andtest/actionFailure.test.tspins that the store's test reset keeps a mounted notice subscribed, so the shell tests see the store's own notification.Added on this head: a failed send shows the peer sentence on the row with the banner ABSENT, and the banner appears carrying it only once the menu unmounts; and a pin rejected with an
ApiErrorquotes the server's reason instead of the reconnect step, with the plain-Errorcase beside it as the control. Three negative controls ran: restoring the immediate report reddens exactly the no-duplication test; suppressing the cause clause reddens all 8 message assertions; and collapsing the answered branch reddens only the quoting test, so the branch is load-bearing rather than decorative.tsc -p tsconfig.app.json,eslint src --max-warnings 0, the i18n gate (19 checks, diff-scoped included) and the phantom-classes / theme-colors / restyle-ratchet gates pass. The wholesrc/tree runs 52,248 passed; 77 failures across 23 suites are inherited from the base, proved by running those same suites on a pristine worktree at this PR's merge base with a byte-identical lockfile: 20 failing test names identical in the first 11 suites, and in the other 12 every failure at this head also fails at the base, which additionally fails one this head passes. This PR's diff touches none of those 23 files.Manual verification
Captured against the built SPA served on loopback with fixture APIs (no gateway): a rejected colour
PATCH(subject form, dashboard and embed shells) and a 502-refused send-to-instance with the per-action banner and capped inline notice. The no-subject, bulk, fork and reload frames and the stacking recording come from the shippedActionFailureNoticerendered alone with the real store, i18n and theme, fed the exact arguments each of those reporters passes; the capture asserted each heading and message before the shot, and the recording asserted the order the two banners appear in.Re-captured on this head:
website/scripts/capture-send-to-instance-error.mjsis repointed from theFailedbadge this PR removes to the inlineErrorNotice, and extended to photograph the handover. It drives the real built SPA against a fixture peer that answers 502transfer_peer_too_old, and asserts, before each shot, that the row's notice carries the peer's cause and remedy with no status code, that the row has an "Ask the agent" item, that no page banner is showing while the menu is open, and that on close the banner carries the quoted peer sentence under theCouldn’t send a copy of …lead with the menu shut. 4 frames, 0 harness errors.Screenshots / video
Banner — subject form, with the "Ask the agent" hand-off and dismiss control:
Banner — no-subject form: a write on an untitled session gets the neutral heading Couldn’t complete that action, with the same hand-off and dismiss control:
Banner — refused reload: its own lead, since a reload changes no setting, over one of the per-code messages (here the agent is mid-turn):
Two refusals before the reader looks: a folder move lands on top of a color change, and the banner says one earlier failure is waiting. Dismissing the move brings the color change back, and dismissing that clears the banner:
Before the dismiss — the move failure on top, with the waiting line:
After one dismiss — the earlier color failure, and no waiting line because nothing is left under it:
The same sequence as a recording:
Banner — bulk pin revert: one plural heading, and every reverted session named in the sentence:
Embed shell — the banner is its own row directly below
EmbedTabStrip; no overlap, the strip's tabs and controls stay clickable:Send failure. The frame below is from a pre-rebase build and is superseded: it predates both the quoting of the peer sentence and the handover above, and it still shows the Autopilot entry #15359 removed. Fresh frames for this head are captured and staged (the row with the peer sentence and one hand-off, the banner after the menu closes, and a light-theme pair); they are not attached yet, because minting a
user-attachmentsURL needs the web editor orgh >= 2.99and this host has 2.96.0. Judge the handover from the harness assertions above until they land.Related Issues
no linked issue: split unit of a larger internal sweep; no tracked issue exists for this surface.
Pattern harvest
When the component that issues a write can unmount before the reply, the error surface has to be owned by something that outlives it. A module store read with
useSyncExternalStoreis enough — no context provider, no reducer, and it keeps the reporting call a one-liner at each of the seven sites.Checklist
Contribution License Agreement
I confirm this contribution is made under the terms of the project's contribution licence.