Skip to content

Phone: hold Send to choose Queue or Steer - #28653

Closed
brennanb2025 wants to merge 6 commits into
brennanb2025/queue-steer-keysfrom
brennanb2025/phone-send-menu
Closed

brennanb2025 wants to merge 6 commits into
brennanb2025/queue-steer-keysfrom
brennanb2025/phone-send-menu

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​191 $\color{#cf222e}{\Huge{\mathbf{−}}}$​15 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​176
Prod 14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​218 $\color{#cf222e}{\Huge{\mathbf{−}}}$​76 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​142

ELI5

When message queueing is enabled, the phone only offers the default queue action, so a correction cannot go straight into the agent's running turn. Holding Send now opens Queue / Steer; a plain tap keeps the phone's existing queue default.

Queueing remains unadvertised in this PR. The menu appears only while an agent is working on a connected host that supports queueing and confirms that this agent can steer. It stays hidden during Stopping, when idle, for host-owned commands such as /compact, or when queueing would be bypassed for a prompt this phone cannot answer.

What Changed

  • Reuse the phone's action sheet for a two-choice Send menu. Opening or dismissing it sends nothing; selection submits once through the existing send guard and preserves draft recovery.
  • Carry that one-message choice through the current text and attachment send wrappers, as the same queue / steer value the desktop uses (src/shared/native-chat-follow-up-delivery.ts, from Separate native chat draft and queued-card shortcuts #28634, which this PR is stacked on). A plain tap carries no choice and gets the shared default, Queue. Queue requests the existing queue delivery for ordinary text; Steer omits it and uses the current direct-send path.
  • Read the host's existing agent list to confirm steering support. Missing or unreadable support hides the menu, and a connection change invalidates the previous answer.
  • Reuse the existing accepted-action hook for the view's send feedback, keeping the view below its file-length limit.
  • Derive menu eligibility from the current draft with the existing host-command classifier. A host-owned command keeps its normal Send action; an agent-owned slash command can still use Queue or Steer.

Why

This follows the common pattern: holding Send reveals delivery choices, and selecting a choice uses the normal sender. Reusing the action sheet and sender keeps one owner for sends, draft cleanup, attachments, and failures. It avoids a second send path or a new phone preference.

Linked Issue

N/A (maintainer PR).

Visual Proof

Native iOS 26.5, disposable iPhone 17 Pro simulator. Inputs used orca emulator; screenshots used simctl. The screenshots show the real chat view/composer with a simulated host, before and after opening the menu. No live pairing, real agent, or SSH host was used.

Before holding Send After holding Send
Composer before opening the menu Queue and Steer choice after holding Send

Selecting Steer reached direct delivery and selecting Queue reached queue delivery through the real phone send wrappers. Dismissal retained the draft without a send; a plain tap requested queueing. The menu stayed hidden while idle, Stopping, and on an older host. QA-only fixture code was removed before committing. Android and live paired-host QA remain untested. Desktop Electron QA is not applicable (phone-only UI).

Testing

  • Manually exercised the native iOS composer with the simulated host described above. This fixture verifies the menu and choice forwarding; it does not prove real host delivery.
  • Automated tests cover menu open/dismiss/select, default versus explicit delivery with attachments and an older host, and steering support across connection changes. One new composer regression verifies that /compact keeps plain Send while Codex's pass-through /goal can still choose Steer.
  • Focused composer test after the fix: 24 passed in one explicitly selected file through tc-gate.
  • Mobile source typecheck after the fix: passed through tc-gate.
  • Earlier branch validation: 142 targeted mobile tests across nine files and mobile test typecheck passed.
  • Full local orca-ci-checks after the fix: 20/22 checks passed. The two failures are already on main: five import-cycle warnings in untouched mobile transport/terminal files, and local Bun 1.3.14 lacking the check script used by typecheck:ci. Changed-code quality, React, localization, file-length, and the regular repository typecheck produced no failures.
  • GitHub CI on 5cfadbb2d24: the single blocking gh pr checks 28653 --watch --fail-fast --interval 60 passed. Mobile verify, static analysis/typecheck, mobile web bundle, repository guards, test line-count check, and final PR checks passed; 15 other jobs were skipped.

Review

Self-reviewed the send path, disabled and stopping states, draft recovery, attachment forwarding, host support, and connection invalidation. Screenshots were inspected and contain only fixture data.

Agent skill upstream boundary

  • Not applicable: no upstream skill-installer code or documentation copied.

Notes

Mixed versions: host methods, published content, and capability advertisement are unchanged, so old clients keep their existing behavior with a new host. A new phone on a host without queue support sends directly and offers no menu; a queue-capable host without a readable agent list also offers no menu. Queue delivery is sent only with confirmed host support.

SSH and folder workspaces: the choice follows the existing paired client's session and transport. The execution host still decides how to deliver it; no local fallback or Git-specific behavior was added. Live SSH and folder-workspace flows were not exercised.

Differences from the common pattern: Intended — one shared resolver, as the common pattern does: the phone and desktop read Queue/Steer through the same type and default. Intended — use the existing phone action sheet. Intended — retain the phone's queue default without adding or syncing a preference, as approved for PR6. Intended — if the turn ends before direct delivery arrives, the existing host sender can start a new turn. Temporary — the current host sends image attachments directly even when Queue is selected; #28655 resolves this before queue switch-on. Temporary — queue advertisement stays off until the separate queue switch-on PR.

Checklist

  • Small and focused phone change.
  • Explained the problem, before/after, mechanism, and approach.
  • Native screenshots attached; simulated-host limits stated.
  • Self-reviewed correctness, security, and performance.
  • Cross-platform, SSH/remote, folder-workspace, phone, and mixed-version impact considered.
  • Targeted tests and mobile typecheck passed; local static-check baseline failures are listed above, and GitHub CI passed.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

When queueing is enabled, the phone's ordinary Send action queues a follow-up, leaving no choice to send a correction straight into the running turn. This PR adds Queue / Steer when holding Send; a plain tap keeps the existing default, and opening or dismissing the menu sends nothing. Queue advertisement remains off for the separate rollout.

Two review rounds, an independent architecture challenge, readiness review and dedicated performance scan are complete on 5cfadbb2d24. The review found that Steer was incorrectly offered for /compact even though it still queued the command. The fix hides the choice for host-owned commands using the existing classifier, preserving their delivery rules and allowing agent-owned slash commands to keep the choice.

  • Verified: CI passed on the final head; 73 focused mobile tests passed on the original head, then 24 composer tests including the command regression and mobile typecheck passed after the fix. Pre-push static checks had only the documented main/local failures: existing mobile import cycles and the unavailable local Bun check script.
  • Native QA: Final source exercised on an owned iPhone 17 Pro simulator through Orca emulator, with native screenshots: open/dismiss/select, plain tap, /compact suppression and normal command routing, pass-through /my-skill, and idle/Stopping/unsupported-host gates passed. This uses a simulated host and proves the rendered controls and request routing, not live agent delivery.
  • Temporary prerequisite: feat(native-chat): image messages wait in the queue like text #28655 must provide host image queueing before switch-on; today's host sends images directly even when Queue is chosen. Combining with fix(mobile): edit queued messages in place #28646 also requires hiding this menu while editing a queued card. These sibling changes were kept separate.

No new product decision is outstanding. The PR remains draft, with no main sync or merge performed; Brennan owns the one final main sync and its narrow recheck. Android, live paired/SSH delivery, native image admission and a true native main-versus-branch comparison remain unverified.

Final branch with a simulated host: ordinary text offers the two choices; a supported host command keeps its normal delivery and shows no choice. These are two inputs on the final branch, not an actual main/branch comparison.

Holding Send with ordinary text Holding Send with /compact
Native ordinary-message delivery menu Native host-command send without a delivery menu

@brennanb2025
brennanb2025 force-pushed the brennanb2025/phone-send-menu branch from 5cfadbb to b85b068 Compare October 15, 2026 03:44
@brennanb2025
brennanb2025 changed the base branch from main to brennanb2025/queue-steer-keys October 15, 2026 03:44
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Superseded by #36588, which ships hold Send on the phone to choose Queue or Steer. Per the shared behavior across agents, it offers the menu for every agent.

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.

1 participant