Skip to content

feat(chat): Escape stops the running turn from the composer - #22410

Closed
RohanK6 wants to merge 2 commits into
kirodotdev:mainfrom
RohanK6:fix/22315-escape-stops-turn
Closed

RohanK6 wants to merge 2 commits into
kirodotdev:mainfrom
RohanK6:fix/22315-escape-stops-turn

Conversation

@RohanK6

@RohanK6 RohanK6 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Not a page-wide shortcut: the binding lives on the composer textarea, so a dialog, the command bar, a terminal or the transcript holding focus never see it.
  • Not the double-tap "require a second Escape" Settings toggle (issue item 3) — deferred as a follow-up; this delivers the default single-press path.
  • Not promoting the key to a rebindable DEFAULT_SHORTCUTS registry entry with a Stop-button tooltip (issue item 5) — a larger, separable change; this uses the default Escape binding.

What changed (motivation → approach → change)

  • Goal: a keyboard way to stop the turn, scoped and precedence-safe.
  • Approach: bind a bare Escape in the composer's own keydown (not a global shortcut), behind a precedence gate that yields to everything that already owns Escape in the composer.
  • Change: a new useComposerStopKey gate returns true only when a turn is running on this slot and no picker, dictation, approval, dialog, or IME composition owns Escape; useComposerKeyDown calls it on a bare Escape and runs the same onStop protocol the Stop button runs (first press soft-cancels, a second after the arm window force-kills).
  • Escape-owner precedence: a new shared probe anotherEscapeOwnerIsOpen() (chat-input/escapeOwners.ts) is the single precedence rule both the stop-key gate and voice.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-modal SessionControlHost, which lets Escape propagate unstopped by design and relies on this probe), except one carrying a new data-escape-passthrough attribute. 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 without role="dialog" and without preventDefault, so neither the dialog probe nor a defaultPrevented check would see it. The surfaces that carry it while open: the embedded file preview (MarkdownPanel via DetailPanel's new opt-in escapeOwner prop), the in-session message-search bar (SearchBar), the notification-banner region while a card is pending (NotificationBanner), and the paste-preview tooltip (PastePreviewTooltip via an opt-in escapeOwner, set by PasteHoverLayer and PastedChip). Without the marker one Escape would both dismiss them AND stop the turn.
  • IME ratchet left untouched: rather than loosen ImeEnterClaimRatchet.test.ts (which a-ratchet-may-only-tighten forbids), stopKey.ts folds 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, no onStop, IME composing, picker open, recording, draining, approval, nudge, open role="dialog", and an open data-escape-owner surface; stops the turn when the open dialog opts out with data-escape-passthrough; swallows a held (auto-repeat) Escape without escalating.
  • ComputerUseLiveView.test.tsx: asserts the rendered dialog carries data-escape-passthrough (27 cases).
  • ImeEnterClaimRatchet.test.ts: all 22 cases pass against the original (unmodified) ratchet, with stopKey.ts restructured to stay clear of it.
  • MarkdownPanel / dock-search / voice suites (MarkdownPanelCoverage, MarkdownPanel.editFocus, ChatPage.dockSearchClose, ChatInput.dictation, ChatInput.drainKeyboardExit, ChatInput.drainCancelAffordance): all green. tsc -p tsconfig.app.json and eslint clean.

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 composerStopKey matrix tests.

Related Issues

Refs #22315

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable) — N/A
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@RohanK6
RohanK6 requested review from a team and KiroCrewCaptain as code owners October 20, 2026 05:05
@RohanK6
RohanK6 requested a review from CrysisDeu October 20, 2026 05:05
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS

UX-level review of ea1004ddbffd31cabf9fe71cd876dd0571d617e2 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • The new Escape binding is invisible: no tooltip, hint or label tells users about it, so only CLI users will find it. When the deferred registry follow-up lands, put the key on the Stop button's tooltip (e.g. "Stop (Esc)").
  • People press Escape out of habit to dismiss things. Two presses more than 400ms apart reach the Stop protocol's force-kill path (stopKey.ts comment: it "discards the in-flight turn AND any queued messages"). Pressed from the keyboard, a hard kill should leave a visible notice in the transcript, or wait for the deferred "require a second Escape" setting.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of ea1004ddbffd31cabf9fe71cd876dd0571d617e2 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Precedence depends on each surface opting in. Any future surface that closes on Escape from a document-level listener without preventDefault and without data-escape-owner will both close and stop the turn with that one press. Say this rule in the doc of each such owner (or in useMessageSearch, next to its handler), not only in escapeOwners.ts.
  • voice.ts now also yields to data-escape-owner surfaces (search bar, notification banner, paste preview), and it no longer yields to ComputerUseLiveView. This changes dictation-discard behaviour, and none of the listed voice suites test it.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of ea1004ddbffd31cabf9fe71cd876dd0571d617e2 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 ships

Inventory (8 items) — 8 justified

Intent: 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.

  1. Bare Escape in the focused composer stops the running turn, using the same soft-cancel and force-kill steps as the Stop button — justified
  2. Holding Escape down does not escalate to a force kill — justified
  3. Escape gives way to an open picker, dictation, a pending approval or its nudge, IME composition, or an open dialog — justified
  4. The dictation-discard Escape and the stop gate now ask one shared question, "does another surface own Escape?" (escapeOwners.ts replaces the only production [role="dialog"] probe, at voice.ts:187) — justified
  5. With the live-desktop view open, Escape now reaches the composer (stop, or discard dictation) — justified
  6. With the embedded file preview open, Escape closes only the preview and does not also stop the turn — justified
  7. With message search open, Escape closes only the search bar and does not also stop the turn — justified
  8. With a notification card or a paste preview showing, Escape dismisses only that and does not also stop the turn — justified

[FIRST-PRINCIPLES-REVIEWED] ea1004d

Description read

[DESCRIPTION-READ] a940a3dd6e74623e428a97e8a01fbc0912f2c7aea2f9ab271cb4c01abbb76b1c

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — 🔴 changes requested (blocking)

Reviewed ea1004ddbffd31cabf9fe71cd876dd0571d617e2 via the fork AI-review pipeline; updated in place on each push.

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

if (e.key === 'Escape' && !e.metaKey && !e.ctrlKey && !e.altKey && !e.shiftKey && stopTurnOnEscape?.(e)) return
Trigger: Enable “Style Markdown While Typing,” focus the composer during a running turn, and press bare Escape with no competing owner. ChatInput renders LexicalComposerInput instead of the textarea; that editor neither calls useComposerKeyDown nor registers an Escape-stop command.
Outcome: onStop is never invoked, so the running turn continues; the new shortcut does not work with this existing composer setting.
Anchor: defect
Fix: Wire the shared stop-precedence callback into the Lexical editor’s Escape handling, preserving its IME guard and composer-local scope.

[BLOCK-MERGE] ea1004d
[GPT-REVIEWED] 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 ChatInput.tsx:383 switches the composer to the rich-text editor when that setting is on (lexicalComposer = lexicalComposerProp || inlineMarkdown). The editor is rendered at ChatInput.tsx:1319-1344, and none of the props it receives there is a stop callback. LexicalComposerInput.tsx has no Escape handling at all. In the patch, stopTurnOnEscape is only passed into useComposerKeyDown, the plain textarea's key handler (patch lines 25 and 281). The turn keeps running and the user sees it, but the shortcut fails every time in that mode until they click Stop instead.

The real fix is cheap: pass the existing stopTurnOnEscape callback into the editor and register one Escape command there. That needs no new state and no new ordering rules between modules, so it costs less than the harm it prevents.

[ADJUDICATION] ea1004ddbffd31cabf9fe71cd876dd0571d617e2 total=1 uphold=1 downgrade=0
UPHOLD F1 website/src/components/chat-input/keyboard.ts:155 reason=harm-warrants-remedy
[GPT-ADJUDICATED] ea1004ddbffd31cabf9fe71cd876dd0571d617e2

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed ea1004ddbffd31cabf9fe71cd876dd0571d617e2 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] ea1004d

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Oct 20, 2026
@RohanK6
RohanK6 force-pushed the fix/22315-escape-stops-turn branch from e983786 to c15a272 Compare October 20, 2026 05:40
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 20, 2026
@RohanK6 RohanK6 changed the title [website] Escape stops the running turn from the composer (#22315) feat(chat): Escape stops the running turn from the composer Oct 20, 2026
@RohanK6 RohanK6 closed this Oct 20, 2026
@RohanK6 RohanK6 reopened this Oct 20, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 20, 2026
@RohanK6 RohanK6 closed this Oct 20, 2026
@RohanK6 RohanK6 reopened this Oct 20, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 20, 2026
@RohanK6 RohanK6 closed this Oct 20, 2026
@RohanK6 RohanK6 reopened this Oct 20, 2026
@RohanK6

RohanK6 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Update for the HOLD, now on head bfcd7939. Items 1, 2 and 3 stand exactly as dispositioned above (1 and 2 are the #22315 deferrals; 3's ratchet narrowing is unchanged and still on head). Item 4's fix has changed — the aria-modal="true" narrowing I posted earlier was subtly wrong, and this corrects both the code and the reasoning.

4. The role="dialog" probe matches the non-modal floating live-desktop view — re-fixed with a targeted opt-out, not the aria-modal narrowing

The earlier push narrowed the probe to [role="dialog"][aria-modal="true"], [role="alertdialog"] and claimed the non-modal pill popovers (including SessionControlHost) don't rely on the probe because each consumes Escape in its own handler. That claim is wrong for SessionControlHost, and re-reading its source is what caught it:

  • SessionControlHost renders a non-modal role="dialog" (no aria-modal) and does not steal focus (no autoFocus, no .focus()), so the composer textarea keeps focus and its keydown still fires while the popover is open.
  • Its onKeyDown is if (e.key !== 'Escape') e.stopPropagation() — it deliberately isolates every key except Escape, and lets Escape through on purpose (the comment there: "Escape, which must still reach the document listener above that closes the popover").
  • Its document Escape listener closes the popover (onClose()) without preventDefault/stopPropagation in the normal case, so the keystroke keeps propagating.

So Escape is not consumed by SessionControlHost; it reaches window/document unstopped by design. Under the aria-modal narrowing the composer probe would no longer match SessionControlHost, so a single Escape while it is open with a turn running would both close the control and stop the turn — a double-action regression the narrowing introduced. The probe is load-bearing for SessionControlHost, not belt-and-suspenders.

The fix now is a single opt-out attribute instead of a scope change:

  • ComputerUseLiveView's dialog carries data-escape-passthrough. It is the one surface that is strictly read-only, open alongside a focused composer rather than in front of it, never steals focus, and never claims Escape — so it is the only role="dialog" that should not block Escape-to-stop.
  • The probe is document.querySelector('[role="dialog"]:not([data-escape-passthrough])'). Every other role="dialog" (the command bar, snip overlay, confirms, and SessionControlHost) keeps deferring exactly as before, so no other surface's precedence changes.

Tests pin the narrowed contract: a generic role="dialog" still yields (the SessionControlHost shape), a dialog carrying data-escape-passthrough now lets the turn stop (the live-desktop case), and ComputerUseLiveView.test.tsx asserts the rendered dialog carries the attribute. tsc and eslint clean; composerStopKey (11), ComputerUseLiveView (27), ImeEnterClaimRatchet (22) and SessionControlHost (26) suites all green.

@RohanK6
RohanK6 force-pushed the fix/22315-escape-stops-turn branch from bfcd793 to 3b49b3d Compare October 21, 2026 11:42
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 21, 2026
@RohanK6
RohanK6 force-pushed the fix/22315-escape-stops-turn branch from 3b49b3d to cd83aae Compare October 21, 2026 12:03
@RohanK6

RohanK6 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the two blocking findings from the Opus 5.5 and GPT 6.1 reviews on 3b49b3d1, now on head cd83aaeaa8. Both were real and are fixed at the root rather than worked around.

A. The ratchet narrowing loosened a blocking ratchet (a-ratchet-may-only-tighten) — reverted; stopKey.ts restructured instead

Both reviews were right: narrowing scanUnconsumedTextareaDeclines to only flag declines with an Enter check nearby made the scanner catch fewer cases than before, which a-ratchet-may-only-tighten forbids, and it only existed so this PR's own stopKey.ts decline would pass.

ImeEnterClaimRatchet.test.ts is now reverted to origin/main — the ratchet keeps its original, stricter predicate, unmodified. Instead, stopKey.ts folds its IME check into the gate's opening compound condition:

if (ime.isComposing(e) || !isRunning || !onStop) return false

so it never presents the bare isComposing(...) return decline shape on a textarea-typed handler that the ratchet flags. This hook's decline is an Escape, which inserts nothing, so it was never the Enter/newline defect the rule pins — folding it in keeps the hook clear of the ratchet without the ratchet having to change. Ratchet suite: 22/22 against the unmodified rule.

B. The dialog probe missed non-dialog Escape owners — generalized to a shared data-escape-owner marker

Confirmed the Opus finding. The embedded file preview (MarkdownPanel) and the message-search bar both own Escape from their own document-level handlers, carry no role="dialog", and close without preventDefault — so neither the [role="dialog"] probe nor a defaultPrevented check could see them. With a turn running and the composer focused, one Escape both closed the panel/search and stopped the turn. That is a regression this PR introduced, and it is the same double-action the probe exists to prevent for SessionControlHost.

Fix, following the suggested marker approach but unified so it is not per-surface whack-a-mole:

  • New chat-input/escapeOwners.ts exposes one probe, anotherEscapeOwnerIsOpen(), selecting [role="dialog"]:not([data-escape-passthrough]), [data-escape-owner]. Both the stop-key gate (stopKey.ts) and the dictation-discard handler (voice.ts) now call it, so the two precedence checks share one definition and cannot drift (this also collapses the two probe copies the First Principles review flagged into one).
  • The embedded MarkdownPanel marks itself via a new opt-in escapeOwner prop on DetailPanel (defaults off, so no other DetailPanel consumer changes), set only while the panel is visible and its handler will answer Escape.
  • SearchBar marks its root data-escape-owner (it only renders while search is open).

SessionControlHost stays in the [role="dialog"] set and still relies on this probe; ComputerUseLiveView keeps its data-escape-passthrough opt-out.

Verification

tsc -p tsconfig.app.json and eslint clean. Suites green: composerStopKey (12, incl. a new data-escape-owner yield case), ComputerUseLiveView (27), ImeEnterClaimRatchet (22), SessionControlHost (+coverage, 26), DetailPanel, MarkdownPanelCoverage, MarkdownPanel.editFocus, ChatPage.dockSearchClose, and the dictation suites. The PR description's "What changed" and "Tests" sections are updated to match this diff.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 21, 2026
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
@RohanK6
RohanK6 force-pushed the fix/22315-escape-stops-turn branch from cd83aae to d87965f Compare October 21, 2026 12:33
@RohanK6

RohanK6 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the Opus block and the two CI gate failures on cd83aaeaa8, now on head d87965ff7d.

Opus: two more non-dialog Escape owners double-acted — both marked

Confirmed. Applied the data-escape-owner marker (the same mechanism already used for MarkdownPanel and SearchBar) to the two surfaces Opus named:

  • NotificationBanner — the banner region carries data-escape-owner while a card is pending (the condition under which its document handler dismisses the topmost card on Escape).
  • The paste-preview tooltip — PastePreviewTooltip gained an opt-in escapeOwner prop, set by PasteHoverLayer (composer) and PastedChip (sent bubbles), both of which dismiss the preview on Escape. The composer-inline PasteTokenNode is left unmarked: it closes its preview on scroll/resize but has no Escape handler, so it never owns Escape.

So one Escape dismisses the card or preview without also stopping the running turn.

CI: Frontend Lint & Type Check (i18n-strict) and Coverage Gate

The i18n-strict gate flagged the ALL-CAPS module constant ESCAPE_OWNER_SELECTOR — that gate inspects ALL-CAPS constants for user-visible copy, and read the CSS selector as an untranslated string. Inlined the selector into anotherEscapeOwnerIsOpen() so there is no ALL-CAPS constant. The Coverage Gate failure chained off the same lint/type-check job. eslint -c eslint.i18n.strict.config.js now passes on the changed files.

Verification

tsc -p tsconfig.app.json, eslint, and the i18n-strict config all clean. Suites green: composerStopKey (12), ComputerUseLiveView (27), ImeEnterClaimRatchet (22, unmodified rule), NotificationBanner (+exit lifecycle), PastedChip, PasteHoverLayer, ChatInput.paste/.dictation and the other paste suites (255 across 14 files). PR description updated to list all four data-escape-owner surfaces.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 21, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

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:

  1. GPT 6.1 (downgraded to LOW): Escape-to-stop does not reach the opt-in rich-text composer. The Lexical branch gets no stop callback (
    <LexicalComposerInput
    ), so with "Style Markdown While Typing" on, Escape does nothing. Wire it in, or post a disposition. If you defer it, add it to Escape in the composer should stop the running turn, like the CLI's cancel-streaming binding #22315 or open an issue, and link it from the description.
  2. Design note: the banner region is an Escape owner whenever any card is pending (
    {...(pending.length > 0 ? { 'data-escape-owner': '' } : {})}
    ). One Escape now dismisses a card before it stops the turn, and voice.ts no longer discards a dictation in that state (
    if (anotherEscapeOwnerIsOpen()) return
    ). Please confirm that this precedence is intended, or narrow the marker.

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)

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 21, 2026
…s-turn

# Conflicts:
#	website/src/components/PasteHoverLayer.tsx
#	website/src/components/PastePreviewTooltip.tsx
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 22, 2026
@RohanK6

RohanK6 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

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.

@RohanK6 RohanK6 closed this Oct 23, 2026
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants