feat: add web voice input and optional auto-send #12893
main fromrefs/pull/12893/head·opened View on GitHubAdd voice input to supported web browsers and an optional immediate-send setting on web and iPhone. The default inserts recognized text into the composer for review. Enabling immediate sending submits the full composer message through the normal send path.
| Surface | Before | After |
|---|---|---|
| iPhone | Microphone inserts text for review | Same default, with optional immediate sending |
| Web | No built-in microphone | Start, finish, and cancel voice input; review by default or send immediately |
| Desktop app | No speech-recognition service | Explicit unsupported state; this PR does not add a desktop transcription service |
The settings are device-local and off by default:
- Web: Settings → General → Send voice input immediately.
- iPhone: Settings → Keyboard & voice → Voice input → Send immediately.
Both new tasks and existing threads use their existing send checks, attachments, and connection paths. Recognition replaces the selection captured when recording starts. Sending waits for the committed text to render. A blocked send stays in the composer and is not retried later automatically. Cancellation, errors, empty results, and stale drafts never send. Switching threads or hiding the browser page cancels web recognition.
Web uses the browser's SpeechRecognition API, requires HTTPS or localhost, and reports unsupported clients and permission/service errors. The browser may send audio to its speech service; the microphone tooltip, setting, and user guide explain this. No API key, new transcription backend, or provider-adapter changes are required.
Web comparison and demos

Default: insert into the composer · Opt-in: send immediately
The web videos visibly label simulated browser speech-result events. The actual composer and send paths run against an isolated backend. New-thread and existing-thread submissions received the expected agent replies. These captures do not verify microphone audio or the browser vendor's recognition service.
iPhone settings comparison and demos

| Find the setting | Default: off | Enabled |
|---|---|---|
![]() | ![]() | ![]() |

Captured on the iPhone 17 Pro simulator, iOS 26.5. The before capture uses the original settings/navigation source. These videos show the settings flow, not speech recognition. Recording pauses were shortened.
Validation: 258 focused tests passed across browser voice input, iPhone voice input, shared draft insertion, settings contracts, and settings search. Web and mobile typechecks passed. Targeted lint completed with warnings. The iOS development-client build passed. Browser UI checks covered default insertion, recording submission lock, immediate sending in new and existing threads, cancellation at a 390px viewport, and preference persistence after reload. iPhone UI checks covered default-off, toggling, and persistence after app restart. Native microphone recognition remains unverified on both surfaces.
Model: GPT-6. Harness: Codex.
Summary by CodeRabbit#
- New Features
- Added voice input to web and mobile composers.
- Added an optional “Send voice input immediately” setting, off by default.
- Voice transcripts can be inserted into drafts or submitted automatically when sending is allowed.
- Added controls for starting, stopping, canceling, and reviewing voice input.
- Renamed keyboard settings to “Keyboard & voice” on mobile.
- Documentation
- Added guidance covering browser requirements, cancellation behavior, and mobile voice-input settings.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Understand this PR’s impact
Explore downstream dependencies and potential security impact with Blast Radius.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
259de3b0-4012-4d3c-af8e-02c4a81b5dee📥 Commits
Reviewing files that changed from the base of the PR and between f222475685447a1987c34ed567d2a2877524b454 and a2e4b3b675826abbb7b6a05998792ccd88be8875.
📒 Files selected for processing (12)
apps/web/src/components/chat/ChatComposer.tsxapps/web/src/components/settings/SettingsPanels.tsxapps/web/src/components/settings/settingsSearch.tsapps/web/src/voice-input/ComposerVoiceInput.tsxapps/web/src/voice-input/browserVoiceInput.test.tsapps/web/src/voice-input/browserVoiceInput.tsapps/web/src/voice-input/useBrowserVoiceInput.test.tsxapps/web/src/voice-input/useBrowserVoiceInput.tsdocs/user/composer.mdpackages/client-runtime/src/voice-input/index.tspackages/contracts/src/settings.test.tspackages/contracts/src/settings.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
📝 Walkthrough
Walkthrough#
The pull request adds browser voice input and immediate-send settings for web and mobile composers. It adds settings contracts, recording lifecycle handling, composer integration, mobile submission guards, tests, and documentation.
Changes#
Voice input and immediate submission
Layer / File(s) Summary Immediate-send settings contract
packages/contracts/src/settings.ts,packages/contracts/src/settings.test.ts,apps/mobile/src/persistence/mobile-preferences.ts,packages/client-runtime/src/voice-input/index.tsAdds the voiceInputSendImmediatelysetting to client contracts and mobile preference sanitization. Re-exportsresolveTranscriptCommit.Mobile voice submission
apps/mobile/src/features/settings/*,apps/mobile/src/features/voice-input/useVoiceInputController.ts,apps/mobile/src/features/threads/*,apps/mobile/src/Stack.tsxAdds the mobile setting, captures it when recording starts, and submits only matching transcripts through existing send and task-start checks. Browser voice controller
apps/web/src/voice-input/browserVoiceInput.ts,apps/web/src/voice-input/browserVoiceInput.test.tsAdds browser support detection, speech-recognition lifecycle handling, transcript commits, cancellation, timeouts, single-controller enforcement, and error states. Browser composer integration
apps/web/src/voice-input/*,apps/web/src/components/chat/ChatComposer.tsx,apps/web/src/components/settings/*Adds the browser voice hook and controls. The composer handles immediate submission, disabled states, lifecycle cancellation, and voice errors. Settings expose and index the new option. Validation and documentation
apps/mobile/src/features/voice-input/useVoiceInputController.test.ts,apps/mobile/package.json,apps/web/src/voice-input/useBrowserVoiceInput.test.tsx,docs/user/composer.mdAdds mobile test dependencies and coverage for mobile and browser voice-input behavior. Documents web and iPhone settings and submission behavior. Priority: ➖ Normal
Estimated code review effort: 4 (Complex) | ~60 minutes
Change: Feature
Sequence Diagram(s)#
sequenceDiagram participant User participant Settings participant VoiceInput participant Composer participant Submit User->>Settings: Enable immediate sending Settings->>VoiceInput: Provide voiceInputSendImmediately User->>VoiceInput: Start and finish recording VoiceInput->>Composer: Commit transcript VoiceInput->>Composer: Request submission when eligible Composer->>Submit: Send the composed messageSuggested reviewers:
juliusmarmingeMerge Risk: ⚪ Minimal · up to
a2e4bThe voice-input setting and controls have no remaining actionable issue in the reviewed changes.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
Check name Status Explanation Resolution Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 19 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold. ✅ Passed checks (4 passed)
Check name Status Explanation Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request. Title check ✅ Passed The title clearly summarizes the main changes: browser voice input and optional immediate sending. It is concise and relevant to the changeset. Description check ✅ Passed The description clearly explains the feature, behavior, supported platforms, settings, UI changes, limitations, validation, and evidence. It does not use the template headings or checklist, but it pro… Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 19 files. (1 skipped: 1 unsupported.)
- Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
Comment `@coderabbitai help` to get the list of available commands.github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XL
Dwite(GitHub profile, opens in a new tab) changed the title
@macroscope-app review this PR
Please review the current head,
a2e4b3b675826abbb7b6a05998792ccd88be8875. The existing approval coversf222475; the subsequent commit adds browser voice input. Please report any current correctness findings and refresh the approvability assessment for the full change.Sorry, I'm unable to act on this request because you do not have permissions within this repository.
Note
This comment is posted by Julius' dot
Closing under the prior-approval rule. The current diff adds a new browser speech-recognition feature as well as the optional send setting. Configuring the existing iPhone voice input does not supply approval for that new web capability, and no maintainer approval of its direction and scope is present. The earlier Macroscope approval covered the iPhone-only commit. Please obtain explicit scope approval for the browser feature, link it here, and request reconsideration.
juliusmarminge closed this
Sign in to join this conversation.



Approvability#
Verdict: Approved at
f222475Macroscope's review found this PR approvable — The PR adds an explicitly opt-in, device-local voice auto-send option while preserving the existing review-first default and existing submission checks. The new controller behavior is narrowly scoped and covered by focused tests; the remaining changes are settings wiring, documentation, and test-only dependencies.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).