🤖 fix: prevent immersive Escape from interrupting streams#2551
Merged
ibetitsmike merged 1 commit intomainfrom Feb 24, 2026
Merged
🤖 fix: prevent immersive Escape from interrupting streams#2551ibetitsmike merged 1 commit intomainfrom
ibetitsmike merged 1 commit intomainfrom
Conversation
Handle immersive review keydown in capture phase and stop Escape propagation in immersive handlers so the global bubble-phase interrupt listener does not fire. Also adds regression coverage for capture-phase Escape suppression. --- _Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.00`_ <!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh costs=0.00 -->
Contributor
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stop Escape in immersive review from bubbling into the global stream interrupt handler.
Background
In immersive review mode, pressing Escape should only control immersive UI state (return from notes to diff, or exit immersive mode). Instead, Escape could also interrupt an active model stream, which is surprising and destructive.
Implementation
ImmersiveReviewViewkeydown listener to run in capture phase.stopKeyboardPropagation(e)to immersive Escape handling in both panels:useAIViewKeybinds.test.tsxproving capture-phase Escape handlers prevent global stream interrupts.Validation
bun test src/browser/hooks/useAIViewKeybinds.test.tsxmake typecheckmake static-checkRisks
Low risk. The change is scoped to immersive review keyboard handling and specifically to Escape propagation semantics.
Generated with
mux• Model:openai:gpt-5.3-codex• Thinking:xhigh• Cost:$0.00