Skip to content

fix(app): stop a running session with Escape from outside the composer - #67582

Draft
latekvo wants to merge 2 commits into
anomalyco:devfrom
latekvo:escape-interrupt
Draft

latekvo wants to merge 2 commits into
anomalyco:devfrom
latekvo:escape-interrupt

Conversation

@latekvo

@latekvo latekvo commented Dec 1, 2026

Copy link
Copy Markdown

Issue for this PR

No issue.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Escape and Ctrl+G stopped a running session only while the composer had focus. After a click in the timeline or on a button, Escape did nothing.

prompt.stop keeps its composer binding. Outside the composer, its keys now stop the session once they reach the window unhandled. A menu, dialog, popover or text field still gets Escape first.

Three Escape handlers closed something without claiming the key: the timeline quote toolbar, the review selection toolbar and the sidebar peek. They now call preventDefault, so one Escape doesn't both dismiss them and stop the session.

No flag: it's a fix.

How did you verify your code works?

  • New e2e test (session-queue.spec.ts). With the session running, Escape closes a menu and a quote toolbar without stopping it, then stops it from a focused button and from the page. It fails without the window fallback, and also fails without the quote fix.
  • The sidebar peek (test-browser) and review selection (component test) each get a test that fails without their preventDefault.
Checks
  • bun typecheck in app and session-ui; lint:changed clean.
  • app src + test-browser: 3334 pass. session-ui src: 744 pass.
  • I ran every e2e spec that presses Escape (27 files, built mode): 644 pass. Every failing test also fails on unmodified dev locally (macOS), except mobile-session.spec.ts:387 (touch tab reorder, no keys). That one is flaky at --workers=5: 1/10 runs fail on dev, 3/10 on this branch.

Screenshots / recordings

No visual change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • No issue referenced. Please add Closes #<number> linking to the relevant issue.

Please edit this PR description to address the above within 72 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:compliance This means the issue will auto-close after 2 hours. needs:issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant