Repository navigation
Conversation
UX Review (Opus 5.5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks: the diff adds no rendered control or string. It binds Escape in the focused prompt box to the existing Stop action, so there is nothing for a screenshot to show. Notes
[UX-REVIEWED] ea1004d Description read[DESCRIPTION-READ] c1a8618d0afd07ce394fd58fd3232c62f143b3f8b87e0c24b536453bf5496421 That sha256 names everything this verdict read: the PR description, plus the 3 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 Nothing blocks: the gate is scoped to the composer, is checked last after every existing Escape owner, and goes through the Stop button's own protocol, so a revert undoes it cleanly. Notes
[DESIGN-REVIEWED] ea1004d Description read[DESCRIPTION-READ] 2bff8e5328a2135f594f5b535bf17beae6fbdaa59c3363ef087193d1d5bf71d5 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, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. Escape-to-stop is added next to the Stop button, which stays. Each Escape-owner marker sits on a surface that would otherwise lose the key to the new binding. What this change shipsInventory (8 items) — 8 justifiedIntent: let a keyboard user stop a running turn by pressing Escape in the focused prompt box, the same way the CLI does. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] ea1004d Description read[DESCRIPTION-READ] a940a3dd6e74623e428a97e8a01fbc0912f2c7aea2f9ab271cb4c01abbb76b1c That sha256 names the PR description this verdict read. 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/chat-input/keyboard.ts:155 -- Escape-to-stop never reaches the rich-text composer
[BLOCK-MERGE] ea1004d Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 stays blocking. The harm is MEDIUM: the new Escape-to-stop shortcut is broken for everyone who has turned on the "Style Markdown While Typing" setting. I confirmed in the base tree that The real fix is cheap: pass the existing |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
e983786 to
c15a272
Compare
|
Update for the HOLD, now on head 4. The
|
bfcd793 to
3b49b3d
Compare
3b49b3d to
cd83aae
Compare
|
Addressed the two blocking findings from the Opus 5.5 and GPT 6.1 reviews on A. The ratchet narrowing loosened a blocking ratchet (
|
The CLI binds Esc to cancel the streaming turn; the dashboard had only the Stop button. Bind a bare Escape in the focused prompt box to the same onStop protocol: the first press soft-cancels, a second deliberate press after the arm window force-kills, exactly as the Stop button does. Scoped to the composer textarea, so a dialog, the command bar, a terminal or the transcript holding focus never see it. A new useComposerStopKey gate enforces precedence: Escape still closes a picker, discards a recording or draining dictation, and dismisses a pending approval or its mode nudge before it is read as stop; it declines during IME composition (via the composer's ime guard, which also catches the post-compositionend WebKit keydown) and yields to any other Escape owner through the shared anotherEscapeOwnerIsOpen() probe (escapeOwners.ts): role=dialog surfaces minus the read-only live-desktop opt-out (data-escape-passthrough), plus non-dialog document-level owners that mark themselves data-escape-owner (the embedded file preview and the message-search bar), so one Escape never both dismisses one of those and also stops the turn. A held Escape never escalates: an auto-repeat keydown is swallowed without calling onStop, so a force kill (which discards the in-flight turn and queued messages) requires a deliberate release-and-press. The IME precedence check is folded into useComposerStopKey's opening compound condition so it does not present the bare composition-decline shape the ImeEnterClaimRatchet flags on a textarea-typed handler; the ratchet itself is left unmodified. Adds useComposerStopKey unit tests covering the precedence matrix (now including the data-escape-owner case) and the held-key no-escalation guard. Refs kirodotdev#22315
cd83aae to
d87965f
Compare
|
Addressed the Opus block and the two CI gate failures on Opus: two more non-dialog Escape owners double-acted — both markedConfirmed. Applied the
So one Escape dismisses the card or preview without also stopping the running turn. CI:
|
|
HOLD at d87965f. My earlier hold items are answered. Items 1 and 2 cite #22315 items 2, 3 and 5; I checked them, and #22315 is still open. The ratchet is back to main's rule, and the dialog probe has a targeted opt-out instead of a scope change. The gate itself is sound. It runs on the textarea's own keydown and yields to pickers, dictation, approvals, IME and other Escape owners through one shared probe. It also swallows auto-repeat, so a held key cannot force-kill. Checks are green. Two current-head review items have no reply yet:
What clears it: a fix or a reasoned disposition for each item on the current head. The work deferred to #22315 is tracked, so it does not block. — crew-pr-reviewer (r117) |
…s-turn # Conflicts: # website/src/components/PasteHoverLayer.tsx # website/src/components/PastePreviewTooltip.tsx
|
Superseded by #23463, the same change reopened as a same-repo PR. It also wires Escape-to-stop into the rich-text composer (the GPT 6.1 finding on ea1004d) and drops the notification-banner Escape-owner marker (HOLD r117 item 2): the banner already skips an Escape the composer has handled, so a pending card no longer disables the binding. The deferred items 3 and 5 from #22315 are tracked in #23462. |
Problem / Motivation
Goal: Pressing Escape in the focused prompt box stops the running turn, matching the CLI's cancel-streaming binding.
Enhancement: the dashboard had only the Stop button and no keyboard way to stop a turn; the CLI binds Esc to cancel the streaming turn.
Why it matters
Stopping a runaway or mis-aimed turn is a frequent, time-sensitive action. Reaching for the mouse to hit Stop is slower than the Escape every CLI user already has muscle memory for, and keyboard users had no equivalent at all.
Not a goal
DEFAULT_SHORTCUTSregistry entry with a Stop-button tooltip (issue item 5) — a larger, separable change; this uses the default Escape binding.What changed (motivation → approach → change)
useComposerStopKeygate returns true only when a turn is running on this slot and no picker, dictation, approval, dialog, or IME composition owns Escape;useComposerKeyDowncalls it on a bare Escape and runs the sameonStopprotocol the Stop button runs (first press soft-cancels, a second after the arm window force-kills).anotherEscapeOwnerIsOpen()(chat-input/escapeOwners.ts) is the single precedence rule both the stop-key gate andvoice.ts's dictation-discard consult, so the two cannot drift. It yields to two kinds of surface:[role="dialog"]surfaces (command bar, snip overlay, confirms, and the non-modalSessionControlHost, which lets Escape propagate unstopped by design and relies on this probe), except one carrying a newdata-escape-passthroughattribute.ComputerUseLiveView— a read-only live-desktop panel open alongside a focused composer that never steals focus or claims Escape — carries that attribute, so Escape stops the turn while it is up instead of being silently swallowed.[data-escape-owner]— a NON-dialog surface that answers Escape from its own document-level handler withoutrole="dialog"and withoutpreventDefault, so neither the dialog probe nor adefaultPreventedcheck would see it. The surfaces that carry it while open: the embedded file preview (MarkdownPanelviaDetailPanel's new opt-inescapeOwnerprop), the in-session message-search bar (SearchBar), the notification-banner region while a card is pending (NotificationBanner), and the paste-preview tooltip (PastePreviewTooltipvia an opt-inescapeOwner, set byPasteHoverLayerandPastedChip). Without the marker one Escape would both dismiss them AND stop the turn.ImeEnterClaimRatchet.test.ts(whicha-ratchet-may-only-tightenforbids),stopKey.tsfolds its IME check into the opening compound condition (if (ime.isComposing(e) || !isRunning || !onStop) return false) so it never presents the bare composition-decline-return shape the ratchet flags on a textarea-typed handler. The ratchet keeps its original, stricter predicate; this hook's Escape decline inserts nothing, so it was never the Enter/newline defect the rule pins.Backwards compatibility
Compatible: Escape still does all of its existing composer jobs first (closes a picker, discards a recording/draining dictation, dismisses a pending approval or its nudge, cancels IME composition, closes a dialog); it only falls through to stop when none of those apply and a turn is running.
Tests
composerStopKey.test.ts(new): 12 cases pinning the full precedence matrix — fires when running + clear; yields for not-running, noonStop, IME composing, picker open, recording, draining, approval, nudge, openrole="dialog", and an opendata-escape-ownersurface; stops the turn when the open dialog opts out withdata-escape-passthrough; swallows a held (auto-repeat) Escape without escalating.ComputerUseLiveView.test.tsx: asserts the rendered dialog carriesdata-escape-passthrough(27 cases).ImeEnterClaimRatchet.test.ts: all 22 cases pass against the original (unmodified) ratchet, withstopKey.tsrestructured to stay clear of it.MarkdownPanelCoverage,MarkdownPanel.editFocus,ChatPage.dockSearchClose,ChatInput.dictation,ChatInput.drainKeyboardExit,ChatInput.drainCancelAffordance): all green.tsc -p tsconfig.app.jsonandeslintclean.Manual verification
Behavior is unit-covered at the gate boundary. A full live check (press Escape mid-turn in the dashboard and confirm the turn stops while a picker/dictation/approval still consumes Escape instead) needs a running gateway with an active turn, which the sandbox cannot provision.
Screenshots / video
Why no screenshot: no rendered surface changes — the change binds a key to the existing Stop protocol; the composer, Stop button and all pickers look identical, and the stop/precedence behavior is covered by the
composerStopKeymatrix tests.Related Issues
Refs #22315
Checklist
Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.