Repository navigation
Prevent resting chats from delaying native command menus - #35069
Conversation
|
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: 4

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:
678e663d-126e-47b0-95ba-e7c41dc2d1d6
Files selected for processing: 49-
mobile/src/session/mobile-structured-agent-session-contract.tsmobile/src/session/mobile-structured-agent-session-host-support.tsmobile/src/session/mobile-structured-composer-command.test.tsmobile/src/session/native-chat/composer/MobileNativeChatComposer.structured.test.tsmobile/src/session/native-chat/composer/MobileNativeChatComposer.tsxmobile/src/session/native-chat/composer/use-mobile-native-chat-composer-menu.tsmobile/src/session/native-chat/composer/use-mobile-native-chat-structured-composer.tsmobile/src/session/use-mobile-native-chat-session-lane.tsmobile/src/session/use-mobile-structured-agent-session.tsmobile/src/session/use-mobile-structured-agent-state.tsmobile/src/session/use-mobile-structured-session-commands.test.tsxmobile/src/session/use-mobile-structured-session-commands.tsmobile/src/transport/mobile-runtime-client-capabilities.test.tsmobile/src/transport/mobile-runtime-client-capabilities.tssrc/main/acp/acp-at-rest-commands.test.tssrc/main/acp/acp-at-rest-commands.tssrc/main/claude/claude-at-rest-commands.tssrc/main/claude/claude-structured-session-commands.test.tssrc/main/native-chat/agent-session-wire/agent-session-subscribe-input.tssrc/main/native-chat/agent-session-wire/agent-session-subscriber-frame-fields.tssrc/main/native-chat/agent-session-wire/at-rest-command-catalog.tssrc/main/native-chat/agent-session-wire/at-rest-command-demand.test.tssrc/main/native-chat/agent-session-wire/at-rest-command-demand.tssrc/main/native-chat/agent-session-wire/structured-agent-session-adapter-router.tssrc/main/native-chat/agent-session-wire/structured-agent-session-at-rest-commands.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-at-rest-commands.tssrc/main/native-chat/agent-session-wire/structured-agent-session-client-delivery.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host.tssrc/main/native-chat/agent-session-wire/structured-agent-session-subscribers.tssrc/main/runtime/rpc/methods/structured-agent-session-options-read.tssrc/main/runtime/rpc/methods/structured-agent-session-policy.tssrc/main/runtime/rpc/methods/structured-agent-session-wire-contracts.test.tssrc/main/runtime/rpc/methods/structured-agent-session.tssrc/renderer/src/components/native-chat/native-chat-composer-types.tssrc/renderer/src/components/native-chat/structured-agent-session-command-refresh.test.tsxsrc/renderer/src/components/native-chat/structured-agent-session-command-refresh.tssrc/renderer/src/components/native-chat/use-native-chat-composer-command-picker.tssrc/renderer/src/components/native-chat/use-native-chat-picker-state.test.tsxsrc/renderer/src/components/native-chat/use-native-chat-picker-state.tssrc/renderer/src/components/native-chat/use-native-chat-structured-composer-transport.tssrc/renderer/src/components/native-chat/use-structured-agent-session.tssrc/shared/agent-session-command-menu-query.test.tssrc/shared/agent-session-command-menu-query.tssrc/shared/agent-session-frame-fields.tssrc/shared/agent-session-wire.tssrc/shared/structured-agent-session-composer.test.tssrc/shared/structured-agent-session-composer.tssrc/shared/structured-agent-session-renderer-client-capabilities.tssrc/shared/structured-agent-session-surface-capabilities.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
-
[Medium impact] The latest changes appear safe to merge; no new blocking issue was found. SummaryCommand discovery now follows open menus instead of resting chats. Desktop and phone menus share cached results and recover pending reads while open.
|














What changes
Opening a command menu could wait behind command discovery for unrelated resting chats, including closed tabs. Current clients discover commands for the menu being used and observe cached lists elsewhere once host support is reported. The phone keeps its eager compatibility read until that report, as described below.
Claude and OMP share discovery within each context while explicit menu requests proceed independently of the legacy queue. Account/workspace retirement invalidates matching open menus even when command rows remain absent. Pending reads recover within a bounded episode; settled success stops polling. Closing, hiding or retargeting ends supported-menu recovery. Earlier compatibility reads can still finish. Existing Codex pooling and grace remain.
Typed provider text, attachments and queued edits do not depend on optional inventory. Orca handles its implemented operations through their existing paths and forwards other provider text unchanged.
/permissionsforwarding is intended; provider support for the command is not promised.Compatibility and intended differences
Intended: Until a host reports support, the phone keeps today's eager command read, so older hosts never get a slower first menu; a modern host may run one discovery pass in that window. Here one pass describes a stable enabled client/host/session, idle request queue and unchanged context; additional refreshes, reconnects, retargeting or context retirement can add work. Once support is confirmed, discovery is menu-driven. Reconnect or retarget can begin a new discovery window; explicit later menu actions are separate demand. Until that report, a late command list can still require reopening the menu, preserving the existing fallback. Already requested or queued compatibility work can drain after support arrives. This is not a universal process-count limit.
This follows the common pattern of scoped discovery, per-context sharing and explicit app-owned operations. Supported older desktops and phones retain eager delivery and existing catalog admission; new clients on older hosts retain their fallback. There is no version floor, new saved field or RPC. Existing capability metadata, pending replies and bounded change hints support independently updated phones/hosts. Authoritative host, account, workspace and pinned-folder identity remain part of catalog context. Logical cancellation is not a universal physical-process ceiling.
Tracked in STA-10883.
Validation
Independent final review and capability-contract proof are complete on
4e8a4fc69072b2c5f0d87a8bbf8c0fb57ed32b16. Final CI is green on that head, including static analysis/typecheck, all ten root-test shards, Mobile verify, mixed-version wire compatibility, macOS/Windows packaging and all three WSL distro checks.Full review path: lifecycle, process admission, ordering and mixed-version behavior span host, desktop and phone. Three behavioral rounds, the design-panel settlements, reference/readiness reviews and independent performance verification are complete. Earlier confirmed defects were fixed; the pre-report phone discovery path is the intended compatibility exception described above, with its causal trace preserved. CI supplies lint/typecheck, mobile, mixed-version wire, root tests and packaging checks.
Deterministic production-path N/10N contracts cover both catalogs, mixed legacy/modern subscriptions, duplicate demand, expiry, account/cwd retirement, replacement while cleanup is pending, zero passive acquisition and unaffected per-chat renders. Named root suites ran through tc-gate; the final capability proof passed 38 unique targeted root tests and all 11 new phone cases in CI. The repaired phone fixture also passes the test-typecheck ratchet; the normal hooks passed. The tests execute the actual capability producer, lane, menu callbacks and host catalog dispatch/settlement, including held status, queued refresh, stale-target ownership and N/10N unknown-support demand.
Real QA on macOS and Windows used previous-build-created saved state and graceful upgrade. Ten distinct resting contexts restored; Claude and Codex each completed two real replies; command menus reopened; OMP exposed 67 rows and completed a skill token. Matched Windows resting catalogs and completion matched baseline; an already-open menu replaced account-specific rows on A→B→A selection. The account labels are local fixture metadata, not a login-flow claim. Phone suites ran in CI only.
Fresh process capture on
98d6f359classified all observed launcher starts and confirmed teardown. Conservative captured-set peaks were 2 roots, 1 command root, 1 immediate native Codex process, and 5 including other captured descendants; QA wrappers are separately counted. Historical process purposes cannot be assigned from retained data. Sampling at 20 ms/200 ms and missing kernel descendant tracking mean these are measured captured-set bounds, not a universal process cap or guaranteed latency.Visual proof
Restoration and command menus (macOS)
The Codex screenshots retain a failed gpt-5.4 setup attempt from baseline history. The baseline subsequently succeeded with GPT-6.1-Sol, and both branch replies below succeeded.
Real replies and OMP catalog/completion
Matched Windows baseline and held-open account menu
Selection used the production local account-selection API with declared fixture profile labels and real provider authentication. This proves menu replacement, not an OAuth flow or a specific refresh-latency guarantee. The draft, caret and composer stayed the same.
Review classification
Full path: larger than the light threshold; changes lifecycle/process ownership, ordering, recovery and mixed-version behavior; recent catalog fixes share the mechanism; effects cross desktop, host and phone.
Agent skill upstream boundary
Not applicable: no upstream skill-installer code or data is copied.