Skip to content

fix(web): dictation can be cancelled by touch again - #33897

Merged
shivamhwp merged 1 commit into
pingdotgg:maria/redesign/5-voicefrom
shivamhwp:t3/redesign-dictation-touch-cancel
Nov 12, 2026
Merged

shivamhwp merged 1 commit into
pingdotgg:maria/redesign/5-voicefrom
shivamhwp:t3/redesign-dictation-touch-cancel

Conversation

@shivamhwp

@shivamhwp shivamhwp commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Note

🤖 Claude Opus 5.5 on behalf of Shivam

On layer 5, dictation can only be cancelled with Esc. While it prepares, records, transcribes or post-processes, the in-place mic finishes a recording, skips post-processing, or shows a spinner, and the send slot turns into Stop only while recording. The only footer caller of speechInput.cancel() is the error pill's dismiss. On a phone there is no way to throw away a recording or abort a transcription without leaving the draft. Main's recording pill had an X for this in all four phases, and #33140 keeps it.

This brings back that X, the existing ComposerSpeechCancelButton (a ghost icon-sm-pill Button, tooltip "Cancel voice input (Esc)"), in the footer slot where the error pill's dismiss X already sits, for every phase other than idle and error. The in-place mic and the Stop slot are unchanged.

Stacks on maria/redesign/5-voice.

Dev server in a 412×915 (Pixel 7) Browser panel tab. The tab has no microphone, so getUserMedia returns a synthetic tone; everything from capture on is the real app with Canary 180M Flash on the server.

Before (layer 5), recording: finish and stop only.
Before: recording shows the level-bars mic and stop, no cancel

After, recording: the X sits left of the mic pill.
After: recording shows Cancel voice input beside the mic pill

After, transcribing: the X stays while the spinner runs (grey from the pointer resting on it).
After: transcribing shows the spinner and Cancel voice input

After: start, record, finish, then tap X while transcribing. It returns to idle with nothing inserted and no error.
https://github.com/user-attachments/assets/655318e7-328c-4f89-9da4-05420832ad7b

Also checked in that tab: the X shows while preparing, tapping it while recording returns to idle with an empty draft, and Esc still cancels. No test added: the change renders an existing control and wires it to cancel(), which controller.test.ts already covers.

vp run check:changed at c118687: format, lint, knip, typecheck (2 packages) and the React compiler check passed. Headless Chromium has no microphone, so its screenshots show only the idle composer, identical at base and head:
Phone-size screenshots, base left and head right: the idle composer is unchanged

Not shown: post-processing (transcript cleanup was off), which takes the same branch. A physical phone. Desktop, which renders the same composer.

Claude Opus 5.5, Claude Code via T3 Code.

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 10, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at c118687

Macroscope's review found this PR approvable — Restores a visible cancel button during active dictation, using the same cancellation action as Escape. The change is confined to UI access to existing behavior and leaves voice-input defaults and data handling unchanged.

No code changes detected at 34bb942. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

@maria-rcks
maria-rcks force-pushed the maria/redesign/5-voice branch from 038606c to 18e93b5 Compare November 11, 2026 07:29
@shivamhwp
shivamhwp force-pushed the t3/redesign-dictation-touch-cancel branch from c118687 to e675380 Compare November 11, 2026 07:41
@maria-rcks
maria-rcks force-pushed the maria/redesign/5-voice branch 2 times, most recently from 52d5014 to 4ed7da0 Compare November 11, 2026 08:38
@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by claude-opus-5-5 on behalf of Maria

Verified in a real dev environment

Head e675380840, web dev server at 412×915 with touch, headless Google Chrome via Playwright. The fake microphone played a real speech clip (JFK inaugural), and transcription ran on the dev server with Canary 180M Flash, chosen and downloaded in Settings > Voice. I added a local git repo as a project through Add project, and the thread has a real Claude Haiku 5.5 turn.

Before is the PR base maria/redesign/5-voice (18e93b50ac), set up the same way on its own worktree and server. main still has the old recording pill with its own X, so the gap is only on the stack base.

Before, recording: only Finish and Stop. There is no way to discard the recording by touch.
Before (base): recording shows the level-bars mic and stop, no cancel

Before, transcribing: only the spinner.
Before (base): transcribing shows only the spinner, no cancel

After, recording: "Cancel voice input" X sits left of the mic pill.
After (PR): recording shows the Cancel voice input X beside the mic pill

After, transcribing: the X stays while the spinner runs.
After (PR): transcribing shows the spinner and the Cancel voice input X

After tapping X while transcribing: back to idle, no text inserted, no error pill.
After (PR): idle composer with empty draft after cancelling a transcription

Before video (base): start, record, Finish, then transcription runs to completion. Nothing on screen can stop it.
Before video: base dictation flow with no touch cancel

After video (PR): start, X while recording returns to idle. Then start, Finish, X while transcribing returns to idle with nothing inserted.
After video: PR dictation cancelled by tapping X while recording and while transcribing

What the tapped controls did on the PR, read from the live DOM:

  • Preparing: Cancel voice input showed right after tapping the mic.
  • Recording: Cancel voice input | Finish voice input | Stop voice input. Tapping X returned to Start voice input with an empty draft and no status.
  • Transcribing: Cancel voice input only. Tapping X returned to idle with nothing inserted and no error.

Neighboring behavior I checked on the PR:

  • Esc while recording still cancels to idle.
  • The Stop slot still stops and transcribes. It inserted "And so my fellow Americans."
  • The error state shows exactly one X, the existing "Dismiss voice input error". The new button does not appear there, and dismissing returns to idle.
  • Typed draft text ("keep this draft") is kept after tapping X while recording.
  • I dictated "And so my fellow Americans ask not what your country can do." and sent it with the send button, and Haiku 5.5 replied in the thread.
    After (PR): dictated message sent and answered by Claude Haiku 5.5
    The error-state capture:
    After (PR): error state shows a single dismiss X

CI on e675380840: 21 passed, 11 skipped, none failing. I changed no code.

Not verified

  • Post-processing phase: transcript cleanup needs a cleanup model, so I left it off. The PR body says it takes the same branch.
  • A physical phone, plus the desktop (Electron) and native mobile clients. Touch was emulated in headless Chrome at phone size.
  • A real hardware microphone. The fake device played a speech file. Transcripts were sometimes empty ("No speech detected") with this fake mic on both base and PR. That is unrelated to this change.

@maria-rcks
maria-rcks force-pushed the maria/redesign/5-voice branch 2 times, most recently from 86afff3 to 51a9ef9 Compare November 11, 2026 20:02
@shivamhwp
shivamhwp force-pushed the t3/redesign-dictation-touch-cancel branch from d2cb8e6 to 4eaa109 Compare November 11, 2026 20:06
@maria-rcks
maria-rcks force-pushed the maria/redesign/5-voice branch from 51a9ef9 to 469acaf Compare November 12, 2026 01:52
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shivamhwp
shivamhwp force-pushed the t3/redesign-dictation-touch-cancel branch from 4eaa109 to 34bb942 Compare November 12, 2026 02:09
@shivamhwp
shivamhwp merged commit 2657f27 into pingdotgg:maria/redesign/5-voice Nov 12, 2026
35 checks passed
flamboh pushed a commit to flamboh/t3code that referenced this pull request Nov 12, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants