Skip to content

fix(mobile): show dictation mic starting, hold-mode and screen-reader state - #35441

Merged
AmoabaKelvin merged 1 commit into
mainfrom
mobile-dictation-mic-states
Oct 28, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
mobile-dictation-mic-states

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​24 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​24
Prod 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​84 $\color{#cf222e}{\Huge{\mathbf{−}}}$​17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​67

ELI5

When you tap the mic in a phone chat, there's a short moment while the mic opens. The chat mic looked untouched during that moment, so it seemed like nothing happened. In hold-to-talk mode the terminal said "Tap mic to stop" while you were holding it, and screen readers weren't told when the mic started, was listening or was transcribing.

What Changed

  • Chat mic while starting. Before: plain mic icon, label "Dictate". After: it shows the same live look it has while recording, the same way the terminal mic lights up while starting. The label is "Starting dictation" and it reports busy. It also stays pressable while the composer is locked, so a hold-to-talk release still cancels the start. MobileSessionActiveContent only passed isRecording/isProcessing to the chat mic. It now passes micActive = isStarting || isRecording (the terminal mic's dictationActive) plus micStarting, carried down the same way as micProcessing, queued-edit composer included.
  • Hold-mode copy. While you hold the mic in hold mode, the terminal live-input status row now says "Release mic to stop". Tap mode still says "Tap mic to stop". The row already had the mode one prop away.
  • Screen readers. Both mics now have accessibilityRole="button" and aria-busy while starting or transcribing. One hidden polite live region in MobileSessionContentRow (the parent of both the chat overlay and the terminal dock) announces "Starting mic", "Listening" and "Processing", the titles the terminal status row already uses, which now share one function. That matches desktop's DictationIndicator, which announces its lifecycle label through aria-live.

Why

The session screen ships as react-native-web inside a WebView. There accessibilityLiveRegion becomes aria-live and aria-busy passes through, so this works with VoiceOver and TalkBack on the shipped page. RN Pressable reads aria-busy natively too. One region at the shared parent, instead of one per mic, means a state change is announced once, whichever mic started it. The starting look reuses the existing recording look, with no new visuals, as the terminal mic already does. Replacing micActive/micProcessing with a single status prop was considered and left out to keep this diff small: it would rename props across every layer and test double.

Linked Issue

Fixes #35422

Visual Proof

N/A for a capture: no new visuals. While starting, the chat mic shows the stop look it already shows while recording, and the starting window is usually a fraction of a second. The other changes are a copy change ("Release mic to stop" in hold mode) and screen-reader attributes and announcements, which don't show on screen.

Testing

  • Focused: mobile/src/session (302 files, 2702 tests) passes, including the dependents of every changed module.

  • New test in MobileNativeChatComposerMic.test.ts: a starting mic is labelled "Starting dictation" and reports busy. It fails on main's mic.

  • check:code-quality:changed and check:react-doctor:changed are clean. The review round's Codex run also ran the mobile typecheck, which passed.

  • Not run on a device. The change was traced through the code paths for iOS and Android (react-native-web page) and for tap and hold modes.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

AI Disclosure

Review

One review-loop round, clean from both Codex and a Claude reviewer. In the simplify pass, a duplicated status struct now reuses UseMobileDictationResult. I skipped the single status prop (see Why) and a shared label helper (it would reword the terminal mic's existing labels). The suggestion that the live region needs AccessibilityInfo.announceForAccessibility on iOS doesn't apply: the screen renders through react-native-web, where the region is aria-live.

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

Mobile only. There are no wire or host changes, so mixed client and host versions behave as before. Hold-mode copy keys off the dictation mode the host already reports. Unknown modes fall back to the tap wording.

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)
  • 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)

…and screen-reader status

The chat mic only got isRecording/isProcessing, so it looked idle while starting; it now shows the live look the terminal mic does. The terminal status row says 'Release mic to stop' in hold mode, both mics expose role and busy state, and one live region announces Starting mic / Listening / Processing.

Fixes #35422
@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

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: e13a0b83-09a3-4a73-bb59-db2689df17e8
Commits

Reviewing files that changed from the base of the PR and between b378dd1 and 61f5687.

Files selected for processing: 20
  • mobile/src/session/MobileDictationStatusAnnouncement.tsx
  • mobile/src/session/MobileNativeChatOverlay.test.ts
  • mobile/src/session/MobileNativeChatOverlay.tsx
  • mobile/src/session/MobileNativeChatView.streaming-rows.test.ts
  • mobile/src/session/MobileNativeChatView.tsx
  • mobile/src/session/MobileQueuedMessageComposer.test.tsx
  • mobile/src/session/MobileQueuedMessageComposer.tsx
  • mobile/src/session/MobileSessionActiveContent.tsx
  • mobile/src/session/MobileSessionCommandDock.tsx
  • mobile/src/session/MobileSessionContentRow.tsx
  • mobile/src/session/MobileTerminalInputActions.tsx
  • mobile/src/session/MobileTerminalLiveInputStatus.tsx
  • mobile/src/session/__mocks__/mobile-prompt-controller.ts
  • mobile/src/session/mobile-native-chat-merged-snapshot-parity-hooks.test.tsx
  • mobile/src/session/mobile-queued-edit-composer.test.tsx
  • mobile/src/session/mobile-queued-edit-presentation.test.tsx
  • mobile/src/session/mobile-queued-message-composer-context.ts
  • mobile/src/session/native-chat/composer/MobileNativeChatComposer.tsx
  • mobile/src/session/native-chat/composer/MobileNativeChatComposerMic.test.ts
  • mobile/src/session/native-chat/composer/MobileNativeChatComposerMic.tsx
  • 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable defects were found.

Summary

The PR makes mobile dictation startup visible and adds shared screen-reader announcements.

  • The chat mic shows its starting state while dictation opens.
  • The terminal status row tells held users to release the mic.
  • Screen readers hear one shared update as dictation changes.

No actionable issues were found. Tests and device checks were not run during this review.

Reviews (1) · Last reviewed commit: "fix(mobile): show the dictation mic's st..." · Reviewed by Greptile

@AmoabaKelvin
AmoabaKelvin merged commit 9dd4dc5 into main Oct 28, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phone dictation mics don't show starting, hold-mode or screen-reader state

1 participant