Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

The previous implementation assumed space was held when the recording effect ran, but React effects are async. If the user released space during microphone permission request or other delays, spaceHeldRef would incorrectly be true, blocking the subsequent space press from sending the transcription.

Fix: Track global key state at module level (outside React lifecycle) and check actual state when effect runs. Also handles window blur to reset state when user switches away.

Generated with mux

The previous implementation assumed space was held when the recording
effect ran, but React effects are async. If the user released space
during microphone permission request or other delays, spaceHeldRef
would incorrectly be true, blocking the subsequent space press from
sending the transcription.

Fix: Track global key state at module level (outside React lifecycle)
and check actual state when effect runs. Also handles window blur to
reset state when user switches away.
@ammario ammario merged commit 07ea67d into main Dec 3, 2025
13 checks passed
@ammario ammario deleted the fix-spacebar-voice-input branch December 3, 2025 15:57
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.

2 participants