Skip to content

Show running subagents in the phone worktree list - #26423

Merged
brennanb2025 merged 8 commits into
brennanb2025/phone-native-parent-targetfrom
brennanb2025/phone-worktree-subagent-rows
Oct 16, 2026
Merged

brennanb2025 merged 8 commits into
brennanb2025/phone-native-parent-targetfrom
brennanb2025/phone-worktree-subagent-rows

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

The phone worktree list hid running subagents even when the desktop sidebar showed them: its list data omitted those child records. Each running child now appears below its parent with its state, name, activity and relative age. Tapping a child opens its parent chat or terminal.

What Changed

This rebuild follows the host-owned child records and saved per-subagent rows now on main. The catalog reads the existing published child summary and CLI roster; phone and desktop use the same running-child selector. There is no second tracker or transcript scan.

Child changes update the worktree-list version and the affected phone row. Unchanged workspace rows still skip rendering. When the phone fetches the list directly from a host, terminal output alone still avoids a full resend. Parent counts, collapse behavior and ordinary workspace opening keep their existing behavior. Optional child fields preserve old-host/old-phone pairing; losing contact makes retained activity unverifiable rather than declaring it stopped.

Since the October 8 review, the branch merged main once and was rebuilt and fully reviewed again. The earlier host-clock sampling/calibration was removed: child age uses the same relative-time formatter as the parent, and absent start times show no age. Added feature test lines fell from about 778 to 235, against 251 added production lines.

Why

Reusing the existing owner, publication and row selector keeps child lifecycle and identity consistent across surfaces. The common pattern is host-owned status with derived presentation. The phone adds the requested desktop sidebar parity.

Depends on #28686, which resolves canonical native-chat pane addresses to already-listed saved tab IDs. A missing parent keeps the current selection; it does not create or reveal a tab. Merge that prerequisite first, then retarget this PR to main before deleting its branch.

Linked Issue

Requested phone/desktop subagent visibility parity. Native parent targeting prerequisite: #28686.

Visual Proof

Native iOS Simulator, mock-host data, using the repository mock host with the same parent and two working children. A private mock-only v2 refusal exercised the existing old-host fallback; no authentication changes or harness files are included.

Before, main 80f038e (parent only):

Mock-host phone list before

After, fcc67c2 (two running children):

Mock-host phone list after

Child tap opens the parent terminal:

Mock-host child tap opens parent

Testing

  • All four sequential gated typechecks pass: node, renderer, CLI and mobile.
  • The gated native-compiler mobile test ratchet passes: 1,000 test files included, 122 grandfathered files, no newly failing files. All four affected navigation cases were rerun and pass.
  • 54 tests pass across seven coupled mobile suites; 49 tests pass across seven host/provider suites. Coverage includes canonical child publication/clearing, old peers, child-only catalog and row updates, and parent navigation.
  • Local static checks: 19/20 pass. The only failure is five native import-cycle warnings also independently reproduced on pristine main 80f038e using the same dependencies. No warnings were suppressed.
  • GitHub CI passed at f3518374837f121fa411d3ed4031c25d09ca9dbc: 18 checks passed, 14 conditionally skipped, no failed or pending checks. The single blocking watch exited 0. Root tests, static analysis, compatibility and packaging, mobile verification, headless persistence.
  • Native mock-host before/after list and parent-terminal tap verified. Existing tab selection for restored/reserved/headless native identities is covered by the prerequisite's native/web tests.

Not verified: live provider delivery, live native-chat notification flow, rendered SSH/server/Linux/Windows flows, VoiceOver interaction or CPU/heap/frame-time performance at scale. Relative ages have the same cross-machine clock limits as parent rows.

Review

Fresh full adversarial host/mobile reviews, an independent architecture challenger, dedicated performance review and readiness checklist at fcc67c2. No open P0/P1 findings; the known P2 accessibility limitation below is explicitly deferred. A subsequent one-line test fixture correction was independently reviewed at f3518374837f. Every production file is byte-identical to the native-tested fcc67c21af48, so the displayed phone evidence applies to this head.

Known limitation: shares main's nested-action accessibility structure; separate follow-up. Individual child actions may not be independently reachable through VoiceOver. This is source/runtime-contract evidence, not rendered VoiceOver QA; upstream explicitly deferred the row-structure change. Finding and follow-up scope.

Agent skill upstream boundary

  • No upstream skill-installer material copied or translated.

Checklist

  • Focused feature; native targeting split into an independently reviewed prerequisite
  • Problem, visible behavior, mechanism and approach explained
  • Current mock-host native before/after and child-tap evidence attached
  • Fresh correctness, security, compatibility and performance review
  • SSH, folder workspaces, server ownership and mixed-version pairing considered
  • Final GitHub CI complete

@brennanb2025

brennanb2025 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

The phone worktree list hid running subagents because its list data omitted the child records that desktop already displayed. It now shows each running child beneath its parent with state, name, activity and relative age; a child tap opens the existing parent chat or terminal.

Ready: review, mock-host native QA and final CI passed at f3518374837f121fa411d3ed4031c25d09ca9dbc. The PR body embeds the new native iOS main-before, after-list and actual child-tap screenshots.

The branch merged main once and was rebuilt around the execution host's current published child summary and saved per-subagent records. Phone and desktop reuse the same running-child selector. Unchanged workspace rows still skip rendering, while child-only changes update the affected row and list version. Clock calibration was removed; age uses the parent's existing formatter. Feature test additions are 235 lines against 251 production lines.

Fresh full host/mobile reviews, an independent architecture challenge, dedicated performance review and readiness checklist found no open P0/P1 product findings. CI then caught an obsolete preview property in a typed test fixture. The one-line correction is independently reviewed, all four affected cases pass, and the gated native test ratchet passes with 1,000 included files and 122 grandfathered files. Every production file matches the native-tested head fcc67c21af48; upstream confirmed that QA remains valid. All four source project typechecks and focused host/mobile suites pass. Local static checks are 19/20, with only the same five native-cycle diagnostics independently reproduced on main; no suppression was added.

Prerequisite #28686 CI passed: six checks passed, fifteen conditionally skipped. This PR's single blocking final-head watch exited 0: 18 checks passed, 14 conditionally skipped, no failed or pending checks. Root CI, mobile CI, headless persistence. Merge the prerequisite first, then retarget this PR to main before deleting that branch. No merge or auto-merge has been performed here.

Deferred P2: shares main's nested-action accessibility structure; separate follow-up. The workspace Pressable contains the child Pressables (workspace, child). Main already nests its lineage action. Under React Native's accessibility contract, VoiceOver may not independently focus the nested child action. This is source/runtime-contract evidence, not rendered VoiceOver QA. Upstream explicitly deferred the structural change. Follow-up: make all in-card actions accessible siblings of the main action while preserving layout, whole-card pointer tap and 400ms long press.

Verified device evidence uses labelled mock-host data and the real CLI roster shape. Live provider delivery, live native-chat notification flow, rendered SSH/server/Linux/Windows, VoiceOver and runtime performance at scale remain unverified.

@brennanb2025
brennanb2025 marked this pull request as ready for review October 8, 2026 05:07
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d6b0866d-0171-4e22-a7d1-7170b88e4e4b
📥 Commits

Reviewing files that changed from the base of the PR and between 61de2d8 and cd993fb.

📒 Files selected for processing (40)
  • mobile/src/components/WorktreeAgentList.test.tsx
  • mobile/src/components/WorktreeAgentList.tsx
  • mobile/src/components/WorktreeAgentRow.test.tsx
  • mobile/src/components/WorktreeAgentRow.tsx
  • mobile/src/components/WorktreeListRow.tsx
  • mobile/src/host-screen/host-workspace-list.tsx
  • mobile/src/host-screen/host-worktree-catalog-action-error.test.ts
  • mobile/src/host-screen/host-worktree-child-navigation.test.tsx
  • mobile/src/host-screen/use-host-worktree-actions.ts
  • mobile/src/host-screen/use-host-worktree-catalog.ts
  • mobile/src/session/MobileNativeChatBackgroundTasks.tsx
  • mobile/src/session/use-mobile-structured-agent-session-background-tasks.test.tsx
  • mobile/src/worktree/worktree-agent-child-rows.test.ts
  • mobile/src/worktree/worktree-agent-child-rows.ts
  • mobile/src/worktree/worktree-catalog-reply-schema.ts
  • mobile/src/worktree/worktree-catalog-snapshot-client.test.ts
  • mobile/src/worktree/worktree-catalog-snapshot-client.ts
  • mobile/src/worktree/worktree-list-snapshot.test.ts
  • mobile/src/worktree/worktree-list-snapshot.ts
  • src/main/agent-hooks/server-ingest-structured-children.test.ts
  • src/main/agent-hooks/server/server-ingest-structured-children.ts
  • src/main/agent-hooks/server/server-listeners.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-child-work.ts
  • src/main/runtime/rpc/methods/worktree-catalog-methods.ts
  • src/main/runtime/rpc/methods/worktree-catalog-snapshot-method.test.ts
  • src/main/runtime/runtime-worktree-agent-rows-structured.test.ts
  • src/main/runtime/runtime-worktree-agent-rows.ts
  • src/main/runtime/runtime-worktree-agent-source.ts
  • src/main/runtime/runtime-worktree-agent-sources.test.ts
  • src/main/runtime/runtime-worktree-pty-agent-sources.ts
  • src/renderer/src/components/sidebar/worktree-subagent-child-rows.ts
  • src/renderer/src/lib/pane-agent-evidence.ts
  • src/shared/agent-child-row-model.ts
  • src/shared/agent-child-work-listing.ts
  • src/shared/agent-status-freshness.ts
  • src/shared/agent-status-ipc-payload.ts
  • src/shared/agent-status-subagent-snapshot.ts
  • src/shared/running-agent-child-rows.test.ts
  • src/shared/running-agent-child-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; 7 remain after this review.

📝 Walkthrough

The change adds child-work views and CLI subagent data to status and worktree rows. It adds catalog observation timestamps and client-scoped host clock calibration. Shared helpers use child data, freshness, and clock comparability to derive running child rows. The mobile worktree list displays those rows and supports opening the associated agent pane.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to cd993

No actionable issue is established for the child rows or their navigation. The change is mergeable after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 38.64% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 44 functions across 40 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the primary change: showing running subagents in the phone worktree list.
Description check Passed The description is detailed and covers the user impact, implementation, rationale, issue references, visual proof, testing, review findings, limitations, and compatibility considerations. Some templat…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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

Comment @coderabbitai help to get the list of available commands.

@brennanb2025
brennanb2025 changed the base branch from main to brennanb2025/phone-native-parent-target October 14, 2026 09:21
@brennanb2025
brennanb2025 merged commit c44dd72 into brennanb2025/phone-native-parent-target Oct 16, 2026
32 checks passed
brennanb2025 added a commit that referenced this pull request Oct 16, 2026
The phone's worktree list now shows the running subagents the desktop sidebar shows, under their parent agent with their own ages, read from the host's existing child records. Tapping one opens its parent's existing chat or terminal. The feature was reviewed in #26423 and merged into this branch.

Links from the phone to native chats whose saved tab ID differs from the session-derived one (restored, reserved and headless chats) now resolve to the chat's real tab instead of missing it.
@brennanb2025
brennanb2025 deleted the brennanb2025/phone-worktree-subagent-rows branch October 16, 2026 04:21
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