You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(mobile): read dictation progress to VoiceOver and TalkBack - #40504
With VoiceOver or TalkBack on, the phone now tells you what dictation is doing: "Listening. Transcribing on Kelvin's MacBook Pro.", "Still listening." when you leave the chat or terminal, "Finishing." when the computer is slow, then where the words went ("Inserted.", "Typed into ") or "Dictation cancelled." A failure is read out too, including "Your recording is kept" when Retry can bring it back.
Files
Added
Deleted
Net
Test
2
$\color{#1a7f37}{\Huge{\mathbf{+}}}$8
0
$\color{#1a7f37}{\Huge{\mathbf{+}}}$8
Prod
28
$\color{#1a7f37}{\Huge{\mathbf{+}}}$435
$\color{#cf222e}{\Huge{\mathbf{−}}}$46
$\color{#1a7f37}{\Huge{\mathbf{+}}}$389
What Changed
The last part of the approved mobile dictation design (W4.7), after #40185, #40276 and #40421.
Before: the session page runs in a WebView, where react-native-web's announceForAccessibility does nothing. A screen reader heard only labels. Starting, the move to the computer, a slow finish, a cancel, a failure or the words landing were silent. The page's toasts aren't read either.
After:
New optional bridge verb native.a11y.announce. On iOS the shell queues the message with AccessibilityInfo.announceForAccessibilityWithOptions. On Android it answers announced: false, because TalkBack reads the WebView's live regions directly. The session route lists it as an optional grant, and the page feature-detects it, so older shells still work.
What gets said, and who says it:
The dictation host (MobileDictationHostProvider, above every screen of the host document) says the dictation's own moments through useMobileDictationAnnouncements:
"Listening", naming the engine;
"This phone stopped transcribing. Continuing on ." when Automatic moves to the computer;
"Still listening." when you leave the session while recording;
"Finishing." after 1 s of finishing;
"Dictation cancelled." after any ✕;
"Dictation stopped. . Your recording is kept." for a kept failure;
the pill's toasts ("Typed into …", "Inserted in …", failures while away).
The session screen says where the words went, because only it knows: "Inserted." for chat, and "Dictation inserted" or the clipboard fallback for the terminal.
The host's failure report says a failure while the session is in front, since its toast isn't read. A setup refusal opens the setup sheet instead, which is read on its own.
Where the shell can't speak (Android, older shells), the text goes into a hidden polite live region in the pill layer. Each message gets a fresh node, so the same words twice are read twice.
Every ✕ goes through the host's cancel. That covers in place, the pill and the terminal's long press, so a cancel is never read as a landing.
Strings: all in 11 locales.
Why
A bridge verb, not a page-only fix: VoiceOver doesn't read a WebView's ARIA live regions reliably, and react-native-web's announce is a no-op, so only the native shell can speak on iOS.
Feature detection: keeps mixed versions working without a store-release gate.
Outcomes come from whoever knows them: a status change can't tell whether the insert worked, so the screen and the host's failure report say those themselves.
Linked Issue
Part of the W4.7 mobile dictation work (no GitHub issue).
Visual Proof
Android emulator, dev client, against a headless serve from this branch with Parakeet TDT v2. The words come from a speech clip fed through a scratch page patch, which is not in this PR. What TalkBack reads was taken from the page's live region over CDP; the transcripts are under Testing.
Recording in place (phone engine)
Left the terminal: "Still listening."
Stop from the pill: "Typed into …"
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Android emulator, final code. The live region's text was read over CDP after each step:
Start in place on the phone engine: "Listening. Transcribing on this phone." Labels: "Cancel dictation", "Recording, 6 seconds, on this phone", "Stop and insert".
Leave while recording: "Still listening."
✕ on the pill: "Dictation cancelled."
Start again, then ✕ in place: "Dictation cancelled." again (the repeat is a new node).
Stop with nothing said: "No speech detected." once.
Start on the computer engine: "Listening. Transcribing on Kelvin's MacBook Pro."
Silence stop in place: "Stopped after a minute of silence", then "Dictation inserted".
Start, leave, Stop from the pill: "Still listening.", "Finishing.", "Typed into ..tmp/omdp-repo".
Model not ready: the setup sheet opens and nothing raw is read. The first build read "voice_model_not_ready:unavailable" here; that is fixed in the last commit.
iOS simulator, earlier commit. The shell's native.a11y.announce was checked on an earlier commit of this branch, with the announcer still on the session screen: the shell logged each queued announcement. The shell side hasn't changed since.
Automated: no new tests. What is said is copy, and when it is said is effect timing; both are on the repo's don't-test list, and the device runs above cover them. Two existing tests only gained mocks for the new imports (AccessibilityInfo, the host profile), and mobile-dictation-session-outcomes.test.tsx passes unchanged with the announcer in the host.
Suites and checks:
1046 tests across 209 files (session, dictation, hooks, platform, mobile-web-shell, terminal session), plus 445 across components.
Mobile tsc (app and tests), anti-slop oxlint, check:code-quality:changed, check:react-doctor:changed and verify:mobile-localization.
Not run: a real device with VoiceOver or TalkBack speaking aloud.
Risk
Bridge verb: optional, so older shells drop the grant and the page falls back to the live region.
Cancel path:cancel is now the host's wrapper (it notes the cancel, then cancels), so every ✕ path runs through one more function.
Failures: failure toasts in place are now also announced.
Worst case: something is read twice or not at all; nothing changes for sighted users.
Back out: plain revert.
Level: Low
AI Disclosure
Review
Two review rounds (Claude only; Codex is at its usage limit). Fixed:
A refused start was read as "Dictation cancelled." Now only a ✕ says cancelled, and the refusal's reason is spoken where it's reported.
A failure while away was read twice (the announcer and the host's toast). Now the failure report and the toast own it.
"Inserted." was said even when the insert failed and the words went to the clipboard. The screen now says what really happened.
On Android, a repeated message wasn't re-read by the live region. Each message is now a new node.
Discard on a kept recording said nothing. It now says "Dictation cancelled."
Found on the emulator: a setup refusal read the raw code voice_model_not_ready:unavailable. The setup sheet now speaks for it.
Left as is:
The generic kept-failure line repeats "Dictation stopped" (P3, under For Kelvin).
The simplify pass was done by hand on the final diff; nothing to change.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
For Kelvin
New strings (all 11 locales), heard only with a screen reader:
dictation.announce.listeningOnPhone "Listening. Transcribing on this phone." / .listeningOn "Listening. Transcribing on {{computer}}." / .listeningOnComputer "Listening. Transcribing on the computer."
.stillListening "Still listening."
.finishing "Finishing." (only after 1 s)
.inserted "Inserted." and .cancelled "Dictation cancelled."
.movedTo "This phone stopped transcribing. Continuing on {{computer}}." / .movedToComputer "…on the computer."
.stoppedKept "Dictation stopped. {{reason}}. Your recording is kept."
Behaviour to try with VoiceOver on (needs a shell build with this PR; the verb is native):
Dictate into a chat and Stop: "Listening…", then "Inserted."
Dictate, press Back, then Stop on the pill: "Still listening.", then "Inserted in Claude Chat".
Dictate and tap ✕: "Dictation cancelled."
Known: when the kept failure has no specific reason, it reads "Dictation stopped. Dictation stopped. Your recording is kept." Fixing that needs one more string; say if you want it.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
The mobile dictation flow adds translated announcements for status changes, host messages, and session insertion outcomes. The app can send announcements through native accessibility support or display undelivered messages in the dictation pill’s live region. The session route grants the optional announcement capability, and the announcement copy is added in 11 locales.
Merge Risk: Low · up to fabf4
Repeated identical insertion failures may not be read aloud the second time. This is a bounded accessibility gap that can be fixed before merge or accepted with owner awareness.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly summarizes the main change: adding dictation progress announcements for VoiceOver and TalkBack.
Description check
The description covers the required sections with detailed user-facing changes, rationale, visual proof, testing, and risk. It states that there is no linked GitHub issue; the template requires one fo…
Docstring Coverage
Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentati…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description covers the required sections with detailed user-facing changes, rationale, visual proof, testing, and risk. It states that there is no linked GitHub issue; the template requires one for outside contributors but advises maintainers to avoid creating needless issues.
Full details: Docstring Coverage
Explanation
Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 7 functions across 17 files. (12 skipped: 12 unsupported.)
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Test announcement delivery for insertion outcomes.
The outcome tests do not detect missing announcements. Extend them to check delivery after successful chat and terminal insertion and clipboard fallback. Assert delivery alongside the insertion or clipboard result, without pinning translated copy.
Additional comments: 1
mobile/src/platform/accessibility-announcer.ts: 1
5-10: Trivial · Maintainability & Code Quality · Low value
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Native announcer always resolves true, even when nothing is spoken.
announceForAccessibility is fire-and-forget. This hook returns true unconditionally, so the liveText fallback in useMobileDictationSpeech never runs on native builds. This is acceptable only if the pill's live region is not needed outside the web shell. If native iOS or Android builds render the pill, the unconditional true is the intended design. Add a short comment that states this, so a later change does not assume the fallback is reachable here.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: b7ffa562-800b-48ac-beec-0a33080f4a57
Commits
Reviewing files that changed from the base of the PR and between 62adb57 and fabf436.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
nl -ba mobile/src/session/use-mobile-session-dictation.ts | sed -n '1,320p'
nl -ba mobile/src/terminal/terminal-send-request.ts | sed -n '1,180p'
rg -n -F -e 'terminalInputSend' -- mobile/src/terminal/mobile-terminal-operations.ts
nl -ba mobile/src/dictation/mobile-session-native-chat-dictation-copy.ts | sed -n '1,150p'
Repository: stablyai/orca
Length of output: 15636
Announce each host toast event.
If two pending away insertions fail and produce the same toast before dismissal, the second toast is not announced. The effect receives only the message, so it does not run when the host replaces the toast with an identical message. Pass the toast object to the effect so each replacement triggers an announcement.
Suggested fix
In mobile/src/dictation/mobile-dictation-host.tsx:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
With VoiceOver or TalkBack on, the phone now tells you what dictation is doing: "Listening. Transcribing on Kelvin's MacBook Pro.", "Still listening." when you leave the chat or terminal, "Finishing." when the computer is slow, then where the words went ("Inserted.", "Typed into ") or "Dictation cancelled." A failure is read out too, including "Your recording is kept" when Retry can bring it back.
What Changed
The last part of the approved mobile dictation design (W4.7), after #40185, #40276 and #40421.
announceForAccessibilitydoes nothing. A screen reader heard only labels. Starting, the move to the computer, a slow finish, a cancel, a failure or the words landing were silent. The page's toasts aren't read either.native.a11y.announce. On iOS the shell queues the message withAccessibilityInfo.announceForAccessibilityWithOptions. On Android it answersannounced: false, because TalkBack reads the WebView's live regions directly. The session route lists it as an optional grant, and the page feature-detects it, so older shells still work.MobileDictationHostProvider, above every screen of the host document) says the dictation's own moments throughuseMobileDictationAnnouncements:cancel. That covers in place, the pill and the terminal's long press, so a cancel is never read as a landing.Why
Linked Issue
Part of the W4.7 mobile dictation work (no GitHub issue).
Visual Proof
Android emulator, dev client, against a headless serve from this branch with Parakeet TDT v2. The words come from a speech clip fed through a scratch page patch, which is not in this PR. What TalkBack reads was taken from the page's live region over CDP; the transcripts are under Testing.
Testing
Android emulator, final code. The live region's text was read over CDP after each step:
iOS simulator, earlier commit. The shell's
native.a11y.announcewas checked on an earlier commit of this branch, with the announcer still on the session screen: the shell logged each queued announcement. The shell side hasn't changed since.Automated: no new tests. What is said is copy, and when it is said is effect timing; both are on the repo's don't-test list, and the device runs above cover them. Two existing tests only gained mocks for the new imports (
AccessibilityInfo, the host profile), andmobile-dictation-session-outcomes.test.tsxpasses unchanged with the announcer in the host.Suites and checks:
tsc(app and tests), anti-slop oxlint,check:code-quality:changed,check:react-doctor:changedandverify:mobile-localization.Not run: a real device with VoiceOver or TalkBack speaking aloud.
Risk
cancelis now the host's wrapper (it notes the cancel, then cancels), so every ✕ path runs through one more function.Level: Low
AI Disclosure
Review
Two review rounds (Claude only; Codex is at its usage limit). Fixed:
voice_model_not_ready:unavailable. The setup sheet now speaks for it.Left as is:
The simplify pass was done by hand on the final diff; nothing to change.
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
For Kelvin
New strings (all 11 locales), heard only with a screen reader:
dictation.announce.listeningOnPhone"Listening. Transcribing on this phone." /.listeningOn"Listening. Transcribing on {{computer}}." /.listeningOnComputer"Listening. Transcribing on the computer.".stillListening"Still listening.".finishing"Finishing." (only after 1 s).inserted"Inserted." and.cancelled"Dictation cancelled.".movedTo"This phone stopped transcribing. Continuing on {{computer}}." /.movedToComputer"…on the computer.".stoppedKept"Dictation stopped. {{reason}}. Your recording is kept."Behaviour to try with VoiceOver on (needs a shell build with this PR; the verb is native):
Known: when the kept failure has no specific reason, it reads "Dictation stopped. Dictation stopped. Your recording is kept." Fixing that needs one more string; say if you want it.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)