Skip to content

Comments

🤖 fix: prevent immersive Escape from interrupting streams#2551

Merged
ibetitsmike merged 1 commit intomainfrom
mike/immersive-review-escape-no-interrupt
Feb 24, 2026
Merged

🤖 fix: prevent immersive Escape from interrupting streams#2551
ibetitsmike merged 1 commit intomainfrom
mike/immersive-review-escape-no-interrupt

Conversation

@ibetitsmike
Copy link
Contributor

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

  • Updated ImmersiveReviewView keydown listener to run in capture phase.
  • Added stopKeyboardPropagation(e) to immersive Escape handling in both panels:
    • notes panel Escape (return to diff)
    • diff panel Escape (exit immersive)
  • Added regression coverage in useAIViewKeybinds.test.tsx proving capture-phase Escape handlers prevent global stream interrupts.

Validation

  • bun test src/browser/hooks/useAIViewKeybinds.test.tsx
  • make typecheck
  • make static-check

Risks

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

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 -->
@ibetitsmike
Copy link
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@ibetitsmike ibetitsmike added this pull request to the merge queue Feb 24, 2026
Merged via the queue into main with commit d377826 Feb 24, 2026
23 checks passed
@ibetitsmike ibetitsmike deleted the mike/immersive-review-escape-no-interrupt branch February 24, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant