Skip to content

Conversation

@ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Dec 16, 2025

When recording voice input while streaming, pressing Escape to cancel recording would also interrupt the active chat stream. This is the same issue fixed in PR #954 (workspace renaming) and PR #1010 (message editing).

Added stopPropagation() to the Escape handler in useVoiceInput.ts to prevent the event from reaching the global stream interrupt handler in useAIViewKeybinds.

I explored ways to unify this pattern (centralized Escape registry, checking defaultPrevented, single global handler with state checks) but none were better than the simple stopPropagation() approach—each adds coupling or complexity without meaningful benefit. The DOM's event propagation model is designed for exactly this case.

Closes #1170


Generated with mux

When recording voice input while streaming, pressing Escape to cancel
recording would also interrupt the active chat stream. This is the same
issue fixed in PR #954 (workspace renaming) and PR #1010 (message editing).

Added `stopPropagation()` to the Escape handler in `useVoiceInput.ts`
to prevent the event from reaching the global stream interrupt handler
in `useAIViewKeybinds`.

Closes #1170

---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking: `high`_
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@ethanndickson ethanndickson added this pull request to the merge queue Dec 16, 2025
Merged via the queue into main with commit b7e7f0d Dec 16, 2025
20 checks passed
@ethanndickson ethanndickson deleted the ethan/fix-voice-escape-interrupt branch December 16, 2025 03:58
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.

Voice dictation: pressing Esc to stop recording interrupts the active stream

1 participant