Skip to content

feat(mobile): show an orchestration agent's crew - #37726

Draft
gsxdsm wants to merge 8 commits into
stablyai:mainfrom
gsxdsm:feat/mobile-orchestration-crew
Draft

gsxdsm wants to merge 8 commits into
stablyai:mainfrom
gsxdsm:feat/mobile-orchestration-crew

Conversation

@gsxdsm

@gsxdsm gsxdsm commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Mobile chat has no view of the orchestration crew (coordinator and workers) behind a conversation.

What changes

  • A crew pill on mobile chat, shown only for a session that has a crew, opening a sheet that lists workers with running, waiting and done status and a Mention action.
  • The crew sheet loads only when the pill is shown.
  • Open idle workers show as waiting rather than running; the crew subscription is moved out of the effect body so its cleanup is the subscription teardown.

Draft: held on #38045

Upstream #38045 (merged) temporarily disabled the desktop orchestration panel mount and its Experimental Settings toggle because crew graph updates retain older record maps and can exhaust memory. It kept the crewSubscribe server protocol for mixed versions, and noted that this PR would add a new subscriber, so it must stay held or address that exposure before landing. This PR is a draft until the retention repair (STA-13738) lands. Revisit then.

How it relates to upstream

Cross-workspace worker nesting moved to #38494. Complements #38045 (see above).

Testing

pnpm tc, mobile tsc, mobile localization and code-quality pass. check:changed --base=upstream/main: all checks pass except unit tests, where pty-launch-race-parity fails identically on clean upstream (3 of 3 runs), and the other flaked files (relay integration, cross-version wire) passed 3 of 3 alone.

Visual Proof

Real iOS Simulator screenshots (iPhone 17 Pro Max) against a live host running an orchestration run. The computer name is covered with a black box.

Session list: workers nested under the coordinator

Crew sheet: live Running, Waiting and Done statuses with Mention

Session-list nesting in the first shot now ships in #38494; the crew sheet stays here. Both are Simulator shots, not layout renders.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

Mobile chat now displays orchestration crew members and supports adding crew mentions to outgoing messages. Runtime crew status and subscription routing are updated. Worktree agent rows support nested cross-workspace workers, child-specific presses, and navigation to a pane’s home worktree. The child disclosure toggle has a larger minimum touch area. The bundle verification script uses higher measured counts for five routes.

Merge Risk: Minimal · up to 45465

No merge-blocking risk was established for the crew and session-navigation changes.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 32.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description covers the problem and the main changes, and includes testing notes and visual proof. It has no ELI5 section, no separate Why section that compares alternatives, and no Linked Issue li… Add or complete these template sections: (1) ELI5, a plain-language summary; (2) What Changed, with the before and after user experience; (3) Why, with the reasons for this approach over alternatives; (4) Linked Issue, using a closing keywo…
Passed Passed checks: 3 passed

Check name Status Explanation
Linked Issues check Passed Issue #37725 is the only active directly linked issue. Its requirements are: (1) show the crew (manager, workers, peers) for the agent in the current mobile chat or terminal, and (2) nest orchestratio…
Out of Scope Changes check Passed Each changed area supports issue #37725 or its tests:
- Crew view: mobile crew hook, reducer, status and party helpers, pill and sheet components, native chat activity-bar wiring, mention insertion, a…
Title check Passed The title clearly describes the primary change: showing an orchestration agent's crew in the mobile app. It is concise and specific, although it does not mention worker nesting, which is an additional…
Full details: Linked Issues check

Explanation

Issue #37725 is the only active directly linked issue. Its requirements are: (1) show the crew (manager, workers, peers) for the agent in the current mobile chat or terminal, and (2) nest orchestration workers under their coordinator in the mobile session list, including workers in other folder workspaces.

Requirement (1), crew view: mobile/src/session/orchestration-crew/use-mobile-orchestration-crew.ts subscribes to orchestration.crewSubscribe. mobile-orchestration-crew.ts reduces the stream into snapshots. MobileSessionActiveContent.tsx derives the party from the active tab. MobileSessionCrewActivity.tsx and MobileOrchestrationCrewBar.tsx render the Crew pill and sheet with Manager, Workers, and Peers sections. Rows show status and a Mention action. src/main/runtime/runtime-rpc/runtime-rpc-mobile-method-routing.ts routes the method to the execution host. Tests in mobile-orchestration-crew.test.ts and use-mobile-orchestration-crew.test.ts cover subscription handling, status mapping, and party selection.

Requirement (2), nesting: src/main/runtime/runtime-worktree-agent-rows.ts mirrors descendant rows into ancestor worktrees. runtime-worktree-agent-rows-lineage.test.ts covers cross-workspace nesting. WorktreeAgentList.tsx, WorktreeAgentRow.tsx, and WorktreeAgentChildDisclosure.tsx render a separate disclosure control. agent-pane-home-worktree.ts and use-host-worktree-actions.ts open a child row in that child's own worktree and tab. Tests in WorktreeAgentList.cross-workspace-nesting.test.tsx and host-worktree-child-navigation.test.tsx cover this path.

No unmet coding requirement is shown. The issue has no further acceptance criteria. The changes since the previous review do not alter these conclusions based on the supplied summary.

Full details: Out of Scope Changes check

Explanation

Each changed area supports issue #37725 or its tests:

  • Crew view: mobile crew hook, reducer, status and party helpers, pill and sheet components, native chat activity-bar wiring, mention insertion, and mention projection in send paths. Mention projection (projectMobileCrewMentions) applies to outgoing text in use-mobile-native-chat-message-send.ts, use-mobile-structured-send-with-outcome.ts, and mobile-queued-message-edit-draft.ts. This supports the Mention action shown in the crew sheet.
  • Status accuracy: crewRowStatus in crew-rules.ts and crew-party-snapshot.ts report an assigned-but-idle dispatch as idle. The desktop read-model test changes cover this. This changes desktop status values as well as mobile. The PR description states this is needed so that the crew count is not inflated. The change is consistent with the crew view requirement, not unrelated.
  • Nesting: worktree mirroring and home-worktree resolution in runtime-worktree-agent-rows.ts, agent-pane-home-worktree.ts, and resolveRuntimeWorktreeSidebarStatus (ownsRow predicate). These support cross-workspace nesting. homeWorktreeId and homeHostId are optional fields in runtime-worktree-contracts.ts, which supports the same behavior.
  • Pending subagent focus (pending-subagent-focus.ts) and child press handling support opening the child session.
  • Localization strings in en.json support the new UI.
  • config/scripts/verify-mobile-web-app-bundle.mjs count updates record the lazy-loaded crew chunks. The PR description states that no assets or routes were removed.

No change is demonstrated to be unrelated to #37725.

Full details: Title check

Explanation

The title clearly describes the primary change: showing an orchestration agent's crew in the mobile app. It is concise and specific, although it does not mention worker nesting, which is an additional change.

Full details: Docstring Coverage

Explanation

Docstring coverage is 32.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 37 functions across 34 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Description check

Explanation

The description covers the problem and the main changes, and includes testing notes and visual proof. It has no ELI5 section, no separate Why section that compares alternatives, and no Linked Issue line ("Fixes #" is absent; the issue #37725 is mentioned only in objectives). The Risk section with level and backout plan is missing. The AI Disclosure, Review, and Agent skill upstream boundary sections are not addressed. The checklist is not ticked. The author also says the PR is a draft held on #38045, which is useful context, but the template's required sections for risk and linked issue are incomplete. Because several required sections are missing, the description is not mostly complete.

Resolution

Add or complete these template sections: (1) ELI5, a plain-language summary; (2) What Changed, with the before and after user experience; (3) Why, with the reasons for this approach over alternatives; (4) Linked Issue, using a closing keyword such as "Fixes #37725" if that issue is the target; (5) Risk, with a Level (Low, Medium, or High), the riskiest part, the older-host compatibility impact, and the back-out method; (6) Testing checkboxes, marked to match what was done; (7) the AI Disclosure section, which is required for non-StablyAI contributors; (8) the Agent skill upstream boundary checkbox; (9) the Checklist. Also state the status of the draft hold on #38045 in the Risk section, because the risk of exposing the crew subscription is the main reason for the hold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent 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: 9d589b81-76e2-492f-9199-0efbb65d3730
Commits

Reviewing files that changed from the base of the PR and between 7431492 and 4546569.

Files selected for processing: 5

  • mobile/src/host-screen/agent-pane-home-worktree.test.ts
  • mobile/src/host-screen/agent-pane-home-worktree.ts
  • src/main/runtime/runtime-worktree-agent-rows-lineage.test.ts
  • src/main/runtime/runtime-worktree-agent-rows.ts
  • src/shared/runtime-worktree-contracts.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up Comments

Nitpick Pass the snapshot as a prop. Do not open a second crew subscription.

32-32: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Pass the snapshot as a prop. Do not open a second crew subscription.

MobileSessionCrewActivity calls useMobileOrchestrationCrew(client, party) to decide visibility. This component then calls the same hook again with the same arguments. Each chat with a crew therefore holds two orchestration.crewSubscribe streams on the host. The pill also stays hidden until the second subscription delivers its own first complete frame, because the second hook starts from HIDDEN.

Take snapshot as a prop from MobileSessionCrewActivity. Pass it to CrewBar and remove the second hook call.

Open the source location

@gsxdsm
gsxdsm force-pushed the feat/mobile-orchestration-crew branch from d759d36 to 7431492 Compare November 3, 2026 15:49
@gsxdsm
gsxdsm force-pushed the feat/mobile-orchestration-crew branch 2 times, most recently from 8c9eda2 to 328ce43 Compare November 3, 2026 23:00
@gsxdsm
gsxdsm force-pushed the feat/mobile-orchestration-crew branch 2 times, most recently from 6159c5d to 96cb9aa Compare November 4, 2026 12:11
gsxdsm added a commit to gsxdsm/orca-stably that referenced this pull request Nov 5, 2026
@gsxdsm
gsxdsm force-pushed the feat/mobile-orchestration-crew branch from 96cb9aa to 27bd41d Compare November 5, 2026 09:36
@gsxdsm
gsxdsm marked this pull request as draft November 5, 2026 09:37
@gsxdsm gsxdsm changed the title feat(mobile): show an orchestration agent's crew and nest its workers feat(mobile): show an orchestration agent's crew in a pill and sheet Nov 5, 2026
@gsxdsm gsxdsm changed the title feat(mobile): show an orchestration agent's crew in a pill and sheet feat(mobile): show an orchestration agent's crew Nov 5, 2026
@gsxdsm
gsxdsm force-pushed the feat/mobile-orchestration-crew branch from 27bd41d to c5170fd Compare November 6, 2026 04:38
…ration-crew

# Conflicts:
#	mobile/src/session/MobileSessionActiveContent.tsx
#	mobile/src/session/native-chat/MobileNativeChatOverlay.tsx
#	mobile/src/session/native-chat/composer/delivery/use-mobile-structured-send-with-outcome.ts
#	mobile/src/session/native-chat/input/queued-messages/mobile-queued-message-edit-draft.ts
#	mobile/src/session/native-chat/transcript/sending/use-mobile-native-chat-message-send.ts
#	mobile/src/session/native-chat/transcript/use-mobile-native-chat-message-send.test.ts
#	src/main/runtime/orchestration/crew/crew-party-snapshot.ts
#	src/main/runtime/orchestration/crew/crew-read-model.test.ts
#	src/main/runtime/rpc/server/runtime-rpc-mobile-method-routing.ts
# Conflicts:
#	mobile/src/session/MobileSessionActiveContent.tsx
#	mobile/src/session/native-chat/MobileNativeChatOverlay.tsx
# Conflicts:
#	mobile/src/session/MobileSessionActiveContent.tsx
#	mobile/src/session/native-chat/MobileNativeChatOverlay.tsx

This branch has not been deployed

No deployments
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