fix(mobile): steer active turns by default #6543
main fromrefs/pull/6543/head·merged by juliusmarminge View on GitHubWhat Changed#
- Mobile messages now steer an active turn by default when the environment is connected.
- Messages continue to queue locally while the environment is offline.
- The local queue drains automatically after the environment reconnects, including into an active turn.
Why#
Mobile previously treated every message sent during an active turn as a local queued message. That differed from desktop steering, and a queued message could remain on the device until the thread became idle or the app was revisited.
The mobile outbox now treats connectivity as the delivery boundary: disconnected messages remain durable locally, while connected messages are delivered immediately. This keeps the existing offline safety and FIFO ordering without adding a user-facing queue/steer mode ahead of server-side orchestration queueing.
UI Changes#
Turn starts when online#
Queueing a message while offline#
Queue drains when back online#
Steering mid-turn#
Verification#
vp test run apps/mobile/src/state/thread-outbox.test.ts(20 tests)vp run typecheckfromapps/mobile- Targeted lint for the seven changed mobile files
- iOS Simulator: active-turn send steered immediately
- iOS Simulator: offline message persisted locally and drained automatically after reconnect
Checklist#
- This PR is small and focused
- I explained what changed and why
- I included before/after screenshots for any UI changes
- Interaction video not included
Authored with GPT-5.6-Sol via the Codex harness in T3 Code.
Note
Allow active turns to send by default in mobile thread outbox#
- Removes the
threadBusyguard fromresolveThreadOutboxDeliveryActionso existing-thread messages are eligible to send whenever the environment is connected, regardless of whether the thread is currently running. - Removes the post-confirmation busy check in
useThreadOutboxDrain, so the drain proceeds after queue confirmation as long as the message is not being edited. - Removes the
activeThreadBusyprop fromThreadComposerand related components, so the send button label no longer switches to 'Queue' when the thread is busy. - Behavioral Change: messages are now queued and sent during active AI turns instead of being held until the turn completes.
Note
Medium Risk Changes core message delivery timing during active orchestration turns; mis-handling could duplicate sends or break offline safety, though connectivity gating and tests limit scope.
Overview Mobile thread messaging now matches desktop steering: when the environment is connected, user messages are delivered immediately—even if a turn is already running—instead of sitting in the local outbox until the thread goes idle.
The outbox delivery rule in resolveThreadOutboxDeliveryAction no longer waits on threadBusy for existing threads; only connectivity (and the existing creation/shell rules) gates send vs wait. useThreadOutboxDrain drops the post-confirmation re-check that deferred delivery when the thread had become running/starting.
Composer UI removes activeThreadBusy end-to-end. The send button label shows Queue only when disconnected or when there are already queued messages—not merely because the agent is busy. Offline queuing and automatic drain on reconnect are unchanged.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
Approvability#
Verdict: Needs human review
This PR changes core message delivery behavior by removing the threadBusy guard, allowing messages to send during active AI turns rather than queueing. This is an intentional behavioral change to messaging infrastructure that warrants human verification.
You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).juliusmarminge merged this184d8ef
juliusmarminge closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
4897d9ef-488a-4385-9834-69f86094b1c9You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
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