Repository navigation
Native chat: queue messages sent while the agent works (on by default, Settings toggle, Cmd/Ctrl+Enter to send one now) - #36588
Conversation
Released clients read the v1 name with an unfinished queue UI; they never see v2 and keep sending immediately. (cherry picked from commit f39382e)
The follow-up choice is now a Queue / Steer setting saved under nativeChatFollowUpBehavior, Steer by default; the old nativeChatQueueFollowUps switch, which every install saved as true while queueing was dark, is retired on load. Every reader goes through native-chat-follow-up-behavior. While the agent works, Enter follows the setting and Cmd/Ctrl+Enter sends the draft the other way; the alternate flips the setting before the queue's own rules (a waiting command still queues, prompts no one here can answer still send now) and never applies while Stopping. Cmd/Ctrl+Shift+Enter steers the head card only and leaves the draft. An idle agent's card reads Send, and the card menu no longer offers "Turn off queueing". (cherry picked from commit 55b4869)
While the agent works on a host that queues, holding Send opens a Queue / Steer sheet; a choice other than the host's setting sends the alternate, resolved against the chat as it is when it lands, by the desktop's rule. Release and dismiss send nothing. The phone reads the host's new follow-up setting (absent reads as Steer), and an idle agent's card reads Send. (cherry picked from commit db87cf5)
(cherry picked from commit 8e1438b)
(cherry picked from commit dc9215b)
(cherry picked from commit e4d038c)
(cherry picked from commit 254f751)
(cherry picked from commit ae2aa89)
(cherry picked from commit 70969d6)
(cherry picked from commit 3f50de9)
(cherry picked from commit b87b360)
|
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:
No actionable comments were generated in the recent review.
|
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:
398db22e-4081-4890-8451-efce368a7cb3
Files selected for processing: 125-
mobile/src/components/composer-input/ComposerSendButton.tsxmobile/src/i18n/locales/de.jsonmobile/src/i18n/locales/en.jsonmobile/src/i18n/locales/es.jsonmobile/src/i18n/locales/fr.jsonmobile/src/i18n/locales/ja.jsonmobile/src/i18n/locales/ko.jsonmobile/src/i18n/locales/pt.jsonmobile/src/i18n/locales/ru.jsonmobile/src/i18n/locales/tr.jsonmobile/src/i18n/locales/zh-Hant.jsonmobile/src/i18n/locales/zh.jsonmobile/src/session/MobileNativeChatOverlay.tsxmobile/src/session/MobileNativeChatView.prompt-presentation.test.tsmobile/src/session/MobileNativeChatView.tsxmobile/src/session/MobileQueuedMessageCardRow.tsxmobile/src/session/__mocks__/mobile-prompt-controller.tsmobile/src/session/__mocks__/mobile-prompt-render-mocks.tsmobile/src/session/mobile-closed-tab-dictation-lifetime.test.tsxmobile/src/session/mobile-file-search-owner-cleanup.test.tsxmobile/src/session/mobile-follow-up-preference.test.tsxmobile/src/session/mobile-native-chat-controller-contract.tsmobile/src/session/mobile-native-chat-follow-up-preference.tsmobile/src/session/mobile-queued-edit-hook.test-fixture.tsxmobile/src/session/mobile-structured-agent-session-contract.tsmobile/src/session/mobile-structured-agent-session-send.tsmobile/src/session/mobile-structured-agent-session-working.tsmobile/src/session/native-chat/composer/MobileNativeChatComposer.structured.test.tsmobile/src/session/native-chat/composer/MobileNativeChatComposer.test.tsmobile/src/session/native-chat/composer/MobileNativeChatComposer.tsxmobile/src/session/native-chat/composer/MobileNativeChatSendButton.tsxmobile/src/session/native-chat/composer/mobile-native-chat-draft-inputs.tsmobile/src/session/native-chat/composer/use-mobile-native-chat-composer-tray.tsmobile/src/session/native-chat/composer/use-mobile-native-chat-image-attachments.tsmobile/src/session/native-chat/input/MobileNativeChatQueuedMessages.test.tsxmobile/src/session/native-chat/input/MobileNativeChatQueuedMessages.tsxmobile/src/session/native-chat/mobile-native-chat-send.tsmobile/src/session/use-mobile-native-chat-controller.tsmobile/src/session/use-mobile-native-chat-queue-follow-ups.tsmobile/src/session/use-mobile-session-image-attachments.tsmobile/src/session/use-mobile-structured-agent-session-background-tasks.test.tsxmobile/src/session/use-mobile-structured-agent-session-newer-approval-send.test.tsxmobile/src/session/use-mobile-structured-agent-session-queued.test.tsxmobile/src/session/use-mobile-structured-agent-session-read-failure.test.tsxmobile/src/session/use-mobile-structured-agent-session-retry-rows.test.tsxmobile/src/session/use-mobile-structured-agent-session-send.test.tsxmobile/src/session/use-mobile-structured-agent-session.cut-turn-notice.test.tsxmobile/src/session/use-mobile-structured-agent-session.test.tsxmobile/src/session/use-mobile-structured-agent-session.tsmobile/src/session/use-mobile-structured-native-chat-send-bridge.tsmobile/src/session/use-mobile-structured-send-with-outcome.tsmobile/src/session/use-mobile-structured-sends.test.tsxmobile/src/session/use-mobile-structured-turn-indicator.test.tsxmobile/src/session/use-mobile-structured-turn-indicator.tsmobile/src/transport/settings-read-operations.test.tsmobile/src/transport/settings-read-operations.tssrc/main/persistence/applying-settings/persistence-settings-ui-defaults.test.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/remote-runtime-request-connection.integration.test.tssrc/main/runtime/rpc/methods/client-events.tssrc/main/runtime/rpc/methods/structured-agent-session-legacy-command-wait.test.tssrc/main/runtime/rpc/methods/structured-agent-session-queued-edit.test.tssrc/main/runtime/rpc/methods/structured-agent-session-queued-methods.tssrc/main/runtime/runtime-client-settings.tssrc/main/runtime/runtime-native-chat-follow-up-events.test.tssrc/main/runtime/runtime-native-chat-follow-up-events.tssrc/main/runtime/structured-agent-session-codex-turn-end-settlement.test.tssrc/renderer/src/components/native-chat/NativeChatAgentMessageRow.test.tsxsrc/renderer/src/components/native-chat/NativeChatComposerPane.tsxsrc/renderer/src/components/native-chat/NativeChatInterruptedContinue.test.tsxsrc/renderer/src/components/native-chat/NativeChatQueuedMessageCard.tsxsrc/renderer/src/components/native-chat/NativeChatQueuedMessageComposer.raw-task.test.tsxsrc/renderer/src/components/native-chat/NativeChatQueuedMessageList.arrival.test.tsxsrc/renderer/src/components/native-chat/NativeChatQueuedMessageList.inline-edit.test.tsxsrc/renderer/src/components/native-chat/NativeChatQueuedMessageList.test.tsxsrc/renderer/src/components/native-chat/NativeChatQueuedMessageList.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.stopping.test.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.test-harness.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.test.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.tsxsrc/renderer/src/components/native-chat/native-chat-composer-types.tssrc/renderer/src/components/native-chat/native-chat-structured-composer-dispatch.tssrc/renderer/src/components/native-chat/native-chat-structured-stop-controls.tssrc/renderer/src/components/native-chat/native-chat-submission-navigation.test.tsxsrc/renderer/src/components/native-chat/structured-agent-session-queue-request.test.tssrc/renderer/src/components/native-chat/structured-agent-session-queue-request.tssrc/renderer/src/components/native-chat/structured-agent-session-send-slot.tssrc/renderer/src/components/native-chat/structured-agent-session-view-contract.tssrc/renderer/src/components/native-chat/use-native-chat-composer-edit-session.tssrc/renderer/src/components/native-chat/use-native-chat-composer-keydown.steer.test.tsxsrc/renderer/src/components/native-chat/use-native-chat-composer-keydown.tssrc/renderer/src/components/native-chat/use-native-chat-composer-submit.tssrc/renderer/src/components/native-chat/use-native-chat-structured-composer-send.tssrc/renderer/src/components/native-chat/use-structured-agent-session-queued-messages.test.tsxsrc/renderer/src/components/native-chat/use-structured-agent-session-queued-messages.tssrc/renderer/src/components/native-chat/use-structured-agent-session-sends.test.tsxsrc/renderer/src/components/native-chat/use-structured-agent-session-sends.tssrc/renderer/src/components/native-chat/use-structured-agent-session.queued-gating.test.tsxsrc/renderer/src/components/native-chat/use-structured-agent-session.tssrc/renderer/src/components/native-chat/use-structured-native-chat-submit-reveal.test.tssrc/renderer/src/components/native-chat/use-structured-native-chat-submit-reveal.tssrc/renderer/src/components/settings/ChatBehaviorSetting.test.tsxsrc/renderer/src/components/settings/ChatBehaviorSetting.tsxsrc/renderer/src/components/settings/chat-behavior-search.tssrc/renderer/src/hooks/ipc-events/runtime-client-ipc-bridge.tssrc/renderer/src/i18n/locales/de.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/pt.jsonsrc/renderer/src/i18n/locales/ru.jsonsrc/renderer/src/i18n/locales/tr.jsonsrc/renderer/src/i18n/locales/zh-Hant.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/runtime/runtime-client-events.test.tssrc/shared/agent-session-runtime-capabilities.tssrc/shared/agent-session-wire.tssrc/shared/global-settings-types.tssrc/shared/native-chat-follow-up-behavior.tssrc/shared/rpc-contract/structured-agent-session-params.tssrc/shared/runtime-client-events.tssrc/shared/structured-agent-session-queued-cards.test.tssrc/shared/structured-agent-session-queued-cards.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
-
The Settings description said Cmd/Ctrl+Enter sends into the running turn, which is wrong while the switch is off. Describe it as doing the opposite for one message, in every language.
…en it differs While the agent works, the phone's Send button now shows Queue or Steer. Holding it lists that action first with a check and the other second, each with a one-line description, and appears only when both choices would actually lead to different sends. A waiting command or prompts nobody here can answer make a hold behave like a tap.
Holding Cmd/Ctrl+Shift+Enter auto-repeats the key, which steered each card that became the head in turn. Ignore the repeats.
While a turn runs and the draft has something to send, a send control now sits beside Stop. Its icon and label say whether Enter queues the message or steers it into the running turn, and its tooltip names Enter and, when it would send differently, Cmd/Ctrl+Enter. Clicking it sends as Enter does. Stop keeps its place and nothing changes while Stopping, with an empty draft, or before the host says it queues. The phone and desktop now read what a send does from one shared helper over the send's own resolver.
One desktop test drives Enter and Cmd+Enter through the real composer, transport and session to the outgoing send and checks its delivery with queueing on and off. Settings search is checked against the capability list this build's host advertises.
The pane had grown past the file length limit after the main merge.
While an image is still loading, another device holds the input, or a send is blocked for a stated reason, the button beside Stop is now disabled and says why, the same way the idle Send button does. Before, it stayed clickable and a click did nothing.
In goal mode Enter sets the goal, so a button promising to queue or steer the message was wrong. It is now hidden there, as it already is while editing a queued message.
It read as queueing until the end of this turn.
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:
576f2527-6f41-477e-ba3c-a727a74d6d34
Files selected for processing: 3-
src/renderer/src/components/native-chat/NativeChatComposerPane.tsxsrc/renderer/src/components/native-chat/native-chat-composer-types.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; 0 remain after this review.
-
…ing from the German Queue test
…on send the other way, like Cmd/Ctrl+Enter The button shows the other action while the modifier is held, and its tooltip names the click. Only when the other way would send differently; otherwise a modified click is a plain send.
…nd buttons a Button size instead of restyling them The focused code-quality check rejects importing one module twice, and the design-system check rejects rounded-full on a <Button>, which the new Queue/Steer button copied from Send. Both composer buttons now use a round icon size on the Button primitive and render as before.
… and count Cmd/Ctrl as held only from its own key press Each mounted chat with a mid-turn draft used to add its own window key listeners, so every keystroke did work per chat, hidden tabs included. One shared listener set now serves them all and wakes a button only when the held state really changes. Other keys can now only clear the held state, so a dictation paste that leaves the Cmd flag on later key events no longer flips the button with Cmd up. Also tests the Ctrl-click on Windows and Linux.
…nt works While the agent works, the desktop composer goes back to its usual controls: Stop, with Enter and the send shortcuts doing what they did. Enter still follows the queue setting, Cmd/Ctrl+Enter still sends one message the other way, and Cmd/Ctrl+Shift+Enter still steers the first queued card. This also removes what only that button used: its Cmd/Ctrl-click alternate, the shared Cmd/Ctrl key listener, the extra round Button size, the send-preview value the desktop session passed to the composer, and the button's text in every language. The phone is unchanged.
The separate send-hold helper only existed because the removed mid-turn Queue/Steer button pushed the pane over the file-length limit. Without the button the pane fits again, so it goes back to main's inline code.
Review statusThe problem. Native chat already had a full message queue (cards, edit, reorder, Paused · n with Resume, image cards, queued What users get. Queueing is on for every native-chat user. Enter mid-turn queues a card that sends when the turn ends; Cmd/Ctrl+Enter sends that one message straight in; Cmd/Ctrl+Shift+Enter steers the first card. Settings › Chat › Behavior has a "Queue follow-ups" toggle (on by default). On the phone, the Send button shows Queue or Steer mid-turn and holding it offers both. Idle cards read "Send". What review changed (3 review rounds, then post-limit fixes, each re-reviewed):
Deferred / for Brennan:
Verified. Electron QA on the M4Air (ticket 3727) at For Brennan's reviewJudgment spots:
|
…lyai#36588) (cherry picked from commit 0d94c0b)
… works (#38317) * fix(mobile): the chat Send button keeps desktop's arrow while the agent works #36588 swapped the phone's send icon and label for Queue or Steer while a turn ran; desktop keeps the plain Send arrow and offers the other way through Cmd/Ctrl+Enter. The phone now matches, with hold as its alternate. * test(mobile): the send button keeps its arrow while the agent works











Problem
Native chat has a full message queue: cards, edit in place, drag to reorder, Paused · n with Resume and Clear all, image cards, and a queued
/compact. But nobody could use it. The host never advertised the capability that lets a client ask for a message to wait, so every message sent while the agent was working went straight into the running turn. Settings showed no queue option at all.What changes for users
/compactor a question nobody here can answer decides for you). A tap follows the host's setting, and the phone picks up changes to it live.How it works
agent-session.queued-messages.v2. Released desktops (1.4.219 and later) and older native phone builds read the old v1 name, which no host ever advertised, so they keep sending immediately. The v2 name stops their older, unfinished queue UI from turning on.alternate): it flips the setting for that one send only while the agent works and is not Stopping. The existing rules still apply after it: a waiting/compactholds later sends behind it, and prompts no one here can answer send immediately. The host still decides against the live session, as it already does for orchestration and automations. The phone's Send label and menu come from the same resolver, so they always say what the send will do.nativeChatQueueFollowUpsboolean. Absent means on; an explicit off is kept. No new saved key and no migration. Every reader goes throughsrc/shared/native-chat-follow-up-behavior.ts.nativeChatQueueFollowUpsChangedevent when it changes, so an open phone page updates without a reconnect.Mixed versions
Differences from the common pattern
Testing
delivery, with queueing on and off; the same for the phone's tap and hold choices;This PR carries only the queue switch-on, the phone changes and the queue-on default from #36430; the host ordering work stays in #36430.