Repository navigation
Conversation
90c2578 to
dd3fa19
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough
Merge Risk:
|
dd3fa19 to
e2e55ce
Compare
There was a problem hiding this comment.
Actionable comments posted: 1

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:
111382ca-bf47-48b2-91ca-03e3eeff16bd
Files selected for processing: 7-
mobile/src/session/MobileNativeChatOverlay.tsxmobile/src/session/MobileNativeChatView.tsxmobile/src/session/native-chat/composer/MobileNativeChatComposer.dictation-auto-send.test.tsmobile/src/session/native-chat/composer/MobileNativeChatComposer.tsxmobile/src/session/native-chat/composer/mobile-native-chat-composer-styles.tsmobile/src/session/use-mobile-session-native-chat-dictation.tssrc/renderer/src/i18n/locales/en.json
Files skipped from review as they are similar to previous changes: 1-
- src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
| // Typing and every menu pick edit through here; dictation writes the draft from above. | ||
| onChangeText: (next) => { | ||
| dictationAutoSend?.withdraw() | ||
| onChangeText(next) | ||
| }, |
There was a problem hiding this comment.
Cancel auto-send when the user opens attachment controls.
If the user opens the structured composer’s attachment menu during the countdown, attachPress only sets attachOpen. The timer can then call handleSend while the user is choosing an attachment, sending the dictated text before the attachment is added. Withdraw auto-send when attachment controls open, and cover that interaction in a test.
0c41bc9 to
64561b3
Compare
There was a problem hiding this comment.
Actionable comments posted: 1

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:
6b4e74eb-6c8d-43ef-bb93-ad9dbadce360
Files selected for processing: 2-
mobile/src/session/native-chat/composer/MobileNativeChatComposer.dictation-auto-send.test.tsmobile/src/session/native-chat/composer/MobileNativeChatComposer.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
-
| onFocus={autoSend.withdrawBefore(() => { | ||
| setFocused(true) | ||
| if (draftScopeKey) { | ||
| focusMobileNativeChatTextDestination(draftScopeKey) | ||
| } | ||
| }} | ||
| })} |
There was a problem hiding this comment.
Cancel the main countdown when inline queued-message editing takes focus.
This callback withdraws only the controller for the focused composer. The queued editor uses a queued-edit: surface, so its controller is null, while the main composer and its countdown remain mounted. If the user opens queued-message editing during a countdown, the timer can still call the main composer’s handleSend and send the chat draft. Withdraw the session controller when the queued editor gains focus, and add a regression test for this interaction. (raw.githubusercontent.com)
e45b772 to
9fae7f4
Compare
[Medium impact] The change affects chat dictation on desktop and mobile. Fix automatic sending after dictation errors before merging. Findings
SummaryAdds optional automatic sending after chat dictation on mobile, alongside the desktop setting and countdown.
|
| } else if (hostSetup.autoSendSettingRef.current.enabled) { | ||
| dictationAutoSend.startIfArmed(hostSetup.autoSendSettingRef.current.delayMs) |
There was a problem hiding this comment.
Failed dictation sends unfinished words
When dictation fails after receiving some words, failActiveDictation passes the saved partial text to onTranscript before calling onError. This branch starts the send countdown for that text, and onError never withdraws it. A slow connection or dropped audio can therefore send an unfinished message after showing a dictation error.
Only start the countdown after a successful finish, or withdraw it when dictation reports an error.
9fae7f4 to
bec3af4
Compare
Add an opt-in Voice setting, "Send when dictation ends", with a 1, 2, 3 or 5 second delay. When dictation into the native chat composer stops, the dictation pill counts down and then sends through the composer's normal send path, as if Enter were pressed. Typing in the composer, moving focus away, pressing Cancel in the pill, or starting dictation again cancels the send and keeps the draft. Terminal panes and other inputs never auto-send, and a session with no speech or an error does not start a countdown. Part of stablyai#12157 (desktop composer only).
The dictation submit hook wrote its latest send into a ref during render. useEffectEvent gives the listener the current send without a render-time ref write.
Two ways auto-send could still send after the user stepped in: - Switching to another app can keep the editor as the active element, so no focusout fired and the countdown sent anyway. The countdown now also stops on window blur and a hidden page, and checks that Orca has focus before it starts and before it sends. - Takeover was only watched after the recognizer's stopped event, so typing while the final transcript was still on its way went unseen. The watch now starts when stopping begins, and the session outcome decides afterward whether there is anything to send. The submit test now keeps its refs stable across renders, so it fails if the hook reads a stale send.
Stopping while the mic was still starting took a separate path that only began watching for takeover once startup finished, so typing or leaving Orca in that interval was forgotten. The watch now starts wherever Stop is first accepted, once per dictation, and the finish step reports the outcome to that same watch.
…ide act insertText now returns its delivery promise, which act would otherwise treat as an unawaited async callback.
The phone follows the desktop "Send when dictation ends" setting: a dictated chat draft sends after the desktop's delay unless the user takes over first. The host dictation setup read moves into useMobileDictationHostSetup, which also reads the auto-send setting, so the session hook stays under the line limit.
bec3af4 to
9e1a781
Compare
ELI5
On the phone, after you dictate into a chat, Orca can now send the message for you. A small "Sending in 2s · Cancel" row appears above the chat box, and if you do nothing the message goes out. Typing, tapping Cancel, or dictating again keeps it as a draft. It follows the "Send when dictation ends" setting on the desktop, which is off by default.
What Changed
Before: dictated text landed in the mobile chat composer and you still had to tap Send.
After: with "Send when dictation ends" on in the paired desktop's Voice settings, a dictated transcript in the chat composer starts a countdown (the desktop's 1, 2, 3 or 5 seconds) and then sends through the composer's own Send.
Mechanism:
RuntimeMobileSpeechCatalog.list()) now carriesautoSendAfterDictationandautoSendDelayMs. The phone reads both as optional, so a desktop that predates them reads as off.mobile-dictation-auto-send.ts). The session arms it when dictation starts and starts the countdown when that dictation's chat transcript lands, at most once per dictation.refreshDictationMode,closeDictationSetupand their focus and foreground refresh) moves unchanged fromuse-mobile-session-native-chat-dictation.tsintouse-mobile-dictation-host-setup.ts, where it also reads the two new fields. The session hook was already at its 300-line limit onmain.useSyncExternalStore, shows the countdown, and supplies its ownhandleSendas what the countdown fires. If no composer is mounted when it fires, nothing is sent.Why
Issue #12157 calls mobile the primary use case: tap the mic, tap again, wait, tap Send. Reading the desktop's setting through the existing setup reply keeps one switch for both, with no new RPC. Sending through the composer's own Send keeps one submit path, so attachments, slash commands and send fencing behave exactly as a tap on Send does.
Linked Issue
Part of #12157 (mobile chat composer). Built on top of #32103 which adds the desktop side of this. I believe Terminal panes require more discussion before enabling auth-send.
Visual Proof
Before:
https://github.com/user-attachments/assets/1072a113-f077-40b4-9945-8280febd85e2
After:
https://github.com/user-attachments/assets/da51794c-80e6-43f9-8222-d403562152c4
Testing
Manual: the countdown sends the dictated message on an iPhone with the App Store app (see the After video), paired with a dev desktop built from this branch, which serves the session screen bundle (
pnpm run build:mobile-web, thenpnpm dev). Not tested on Android.Automated:
Checks run locally on macOS, on top of upstream
def1565846:pnpm lint,pnpm typecheckandpnpm run check:code-quality:changedpass.rpc:diffpass, andvitestpasses forsrc/sessionandsrc/dictation. The full mobile run has one failing file,src/tasks/mobile-agent-launch-architecture.test.ts, which fails the same way on unmodified upstreammain.pnpm test: the dictation, native chat, settings and speech catalog suites pass. On the previous base (a6fdeda541), the full run failed in main-process, git, daemon and cross-version wire tests that need real processes or built artifacts. Those 68 files failed the same way on unmodified upstreammainon this machine, and the 3 others passed when rerun alone (one, a file-timestamp test, only on some runs).pnpm build: the desktop build andpnpm run build:mobile-webpass. The native macOS computer-use helper step fails on this machine because its code-signing identity matches two certificates in the keychain; this PR touches no native code.AI Disclosure
An AI coding agent helped write and review this change.
Review
Agent skill upstream boundary
Notes
Off by default. Nothing changes until the desktop setting is turned on.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)