Repository navigation
fix(mobile): start dictation from agent chat tabs - #32105
Conversation
The mobile mic only started dictation when a terminal was active. An agent chat tab has no terminal handle, so a tap there returned without starting, opening setup, or showing an error. A chat transcript goes to the chat composer, not a terminal, so chat tabs now only need a connected desktop. Terminal tabs keep the terminal input gate. Fixes stablyai#26003
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to
|
ELI5
On the phone, tapping the microphone in an agent chat did nothing because the chat has no terminal handle. A connected agent chat can now start dictation and append the transcript to its draft. Terminal views continue to use their terminal input gate, and disabling desktop dictation still prevents capture.
Fixes #26003.
What changed
The dictation hook selects readiness for the visible composer: a connected host for native chat, or the existing
canSendgate for terminal mode. It uses the existing capture, transcript routing, cancellation, andspeech.dictation.*operations.The original fix and commit by Chris Born (@pelted) are preserved. The follow-up replaces the initial test harness with checked consumed scope fields, real chat resolution, explicit start/finish replies, transcript-delivery assertions, and renderer teardown.
Verification
8d94ed06570a: the connected no-terminal agent-chat case failed with nospeech.dictation.startrequest; disconnected/disabled/missing-handle/normal-terminal controls passed.04e1e5b1ca78after review. Format and changed-code quality checks pass with zero new findings.04e1e5b1ca78, including full mobile typecheck, test-typecheck ratchet, tests, lint, and formatting. The fresh general PR Checks run also passes, including static/typecheck, standalone React Doctor, the app bundle/render checks, and thePR checks passedaggregate. Test LoC passes.Merge risk
Low source risk, with mobile integration limits. The production diff is one derived readiness value and its use by the existing hook; there are no RPC, permission, audio-engine, storage, or platform-branch changes. The existing cancellation and terminal gates remain in force.
This verification did not exercise a physical iPhone/iPad/Android microphone or speech model. The local checkout lacks Expo/React Native dependencies, so full mobile typechecking was validated by the passing Mobile verify CI run.
Visual proof
N/A: no layout change. The behavioral regression is demonstrated by the start/finish RPC and transcript-delivery tests. Native hardware capture is not claimed as verified.
AI disclosure
AI coding agents helped reproduce, review, and strengthen verification of the original contributor's fix.
Agent skill upstream boundary