Skip to content

fix(web): let dictation be stopped while the mic is still being asked - #221

Merged
TheGreatAxios merged 2 commits into
mainfrom
fix/dictation-stop-during-mic-prompt
Nov 8, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
fix/dictation-stop-during-mic-prompt

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Click the mic, then click stop before answering the browser's permission prompt. Nothing is listening yet, so stop does nothing, and when the prompt is allowed the page starts listening anyway: the button reads "Stop dictating", a stream is held and recognition runs. Opening a second composer in that window gives two live sessions.

  • The dictation session now exists from the moment the mic is asked for, not from when it is granted.
  • Stop (or leaving the page) during the prompt marks that session cancelled.
  • When permission arrives on a cancelled session, the tracks are ended and recognition never starts.

This changes only what the page does. Safari keeps the device indicator on for a while after a recognizer ends, on main and here alike; that is the browser, not this code.

How it was verified

  • lint, format:check, typecheck, pins:verify pass; bun run test 328 pass. The new tests fail on main.
  • Ran main and this branch against a local hub with a fake model, driving the mic with a scripted permission prompt. On main the track stays live and the button reads "Stop dictating" after allowing; here the track is ended and the composer is idle. Same for navigating away mid-prompt and for a second composer.
  • Reproduced by hand in Safari on main; normal start and stop cycles on this branch traced clean (recognizer ended, tracks stopped, context closed).

Stopping (or leaving the page) while the permission prompt was open did nothing: once the user allowed, the mic went live with no way to stop it from the composer.
@corbits-triage

corbits-triage Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

Changed since the last verdict (Unsure at 180112f): 1 new commit.

@TheGreatAxios TheGreatAxios added the bug Something isn't working label Nov 8, 2026

@corbits-triage corbits-triage Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No defects reported.

@corbits-triage corbits-triage Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No defects reported.

@TheGreatAxios
TheGreatAxios added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit d233cdd Nov 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant