Repository navigation
fix(mobile): keep dictation controls in sync with host settings - #31349
Conversation
Refresh enabled state and hold/toggle mode on connection, route focus and foreground. Fence stale replies and preserve attachment actions when dictation is disabled. Co-authored-by: Wooseong Kim <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to
|
|
Adversarial pre-merge review of
A separate pre-existing hook limitation was reproduced only by directly replacing the RPC client while recording with enabled=true throughout. It behaves identically on baseline and this PR. Current native route identity keys and pinned hosted-page clients prevent the direct swap exercised; no normal user route was established. It is retained as a separate hardening concern, not presented as fixed here. The merged contribution must preserve |
ELI5
The phone should follow the computer’s voice settings. Turning dictation off now removes the microphone while leaving photo attachments available. Connecting again or returning to the app refreshes whether the mic uses hold or tap.
What changed
Fixes #30307. Fixes #30511.
Community contribution
Adapted and reviewed @innocarpe’s #30316 and #30513 together because they update the same settings response. Wooseong Kim is credited as co-author. This adds capture gating and combined stale-enabled/re-enable coverage on top of those contributions.
Verification
dda855e837d0; all five failed before the change.Visual proof
Real iPhone simulator (iOS26.1), source-built Release native shell with the production mobile page bundle over its encrypted E2EE v2 bridge. Both terminal screenshots use a host reporting dictation disabled. Screenshots were visually inspected: controls align correctly, the attachment stays available, and re-enabling restores the mic.
Native exercise also covered buffered input (attachment and Send remain), real disconnect/reconnect of the same pinned host, and foreground changes between enabled/disabled and hold/toggle. Server logs confirm a fresh settings read after reconnect and app resume. In toggle mode one tap reached native Listening and sent audio chunks; the next tap finished. After a foreground change to hold mode, pressing started and releasing finished.
The host is a deterministic RPC fixture serving the actual production page bundle. Native microphone capture, audio chunks and photo picker were exercised; the fixture supplies the final transcript, so this does not measure recognition quality. Automated tests exercise late RPC replies and focus cleanup deterministically.
Compatibility and review
Independent code review found no correctness blockers and independently passed 19 tests across four focused suites.
Mobile settings only; existing RPCs and reply schema are unchanged. The host can be local, SSH or relay, and client/server versions can differ. No repository/worktree assumptions were added. Attachments and other composer actions keep their existing behavior.
AI disclosure
Prepared with OpenAI Codex.