Skip to content

feat(mobile): nested subagent threads behind a toggle - #3871

Closed
PixPMusic wants to merge 104 commits into
pingdotgg:android-dev-pr-3514from
PixPMusic:pixpmusic/mobile-subagent-tree
Closed

PixPMusic wants to merge 104 commits into
pingdotgg:android-dev-pr-3514from
PixPMusic:pixpmusic/mobile-subagent-tree

Conversation

@PixPMusic

@PixPMusic PixPMusic commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Stacking

Warning

Stacked on #3870 (which itself requires #2829). Only the top two commits belong to this PR — refactor(client-runtime): share subagent thread tree projection and feat(mobile): show collapsible nested subagent threads. Everything below them is the #3870 stack.

Summary

Opt-in nested subagent threads for the mobile home screen and thread sidebar, kept separate from #3870 on purpose so it can be dropped or deferred independently if the feature isn't wanted:

  • a persisted "Show nested subagents" toggle in the thread-list filter menu, default off — with it off, nothing changes
  • when enabled, child subagent threads render indented and collapsible under their parent on phone, tablet, and the thread navigation sidebar; pagination keeps counting root threads so expanded branches don't consume the preview quota
  • the tree comes from a shared environment-scoped projection in client-runtime with cycle and orphan fallbacks, so clients cannot drift on which rows count as roots; the web sidebar adopts the same projection in feat(sidebar): reveal nested subagent threads #3861 — whichever lands first, the other's copy of the two threadRelationships files rebases away cleanly

Validation

  • vp check, vp run typecheck — green
  • focused suites (home list items, home thread list, preference storage, tree projection) — 32 tests passing
  • verified on the t3test AVD and a Pixel 7 Pro from the integration branch: toggle appears in the menu, nested Codex/Claude children expand and collapse, and the preference survives a cold restart

Note

Medium Risk
Low-risk list UX when the toggle stays off; medium overall because the diff also touches mobile thread navigation, feed, and desktop userdata paths where regressions would affect daily use.

Overview
Adds an opt-in Show nested subagents control on the mobile home thread list (persisted in device preferences, default off). When enabled, the list uses shared client-runtime helpers (getSubagentThreadTreeRoots, flattenSubagentThreadTree) to indent subagent child threads under parents with per-branch expand/collapse; Show more pagination still counts root threads so expanded nests do not eat preview slots. Recent-thread previews and grouping now derive from roots as well.

The same diff also carries broader mobile orchestration V2 work alongside that feature: home/archive fixtures move to V2 shell types, orchestration cache schema alignment, thread detail feed changes (latestRun, fork-from-response, expandable work log + ThreadActivityInspector), queue reorder UI, relationship banner, runtime-request IDs, and checkpoint summaries from projection. Desktop production state paths shift from userdata to userdata-v2 (and related branding/test expectations). Large .plans docs and a small marketing harness label update are documentation-only.

Reviewed by Cursor Bugbot for commit d03b0c31981aee8397b7b7b82e5e984d04a6542d. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add nested subagent thread display behind a toggle in mobile home and sidebar

  • Adds a 'Show nested subagents' toggle to the mobile home header, sidebar filter menu, and navigation sidebar, persisted via a new useSubagentThreadListPreference hook.
  • Thread list rows now support hierarchical display with expandable/collapsible branches, depth-based indentation, and disclosure chevrons; root-thread-based pagination excludes subagent threads from recent slots.
  • Introduces a full Orchestration V2 runtime on both server and client: V2 projection store, event sink, effect outbox, provider adapters (Claude, Codex, Cursor, Grok, ACP Registry, OpenCode), session manager, run execution, checkpoint capture/rollback, thread fork/merge, and queue management.
  • Adds new UI surfaces including ThreadDetailsPanel, ThreadRelationshipsPanel, ThreadRelationshipsBanner, ThreadQueueControl, ThreadAutomationsPanel, V2ItemInspector, and V2LifecycleRow on web and mobile.
  • Migrates server shell/thread state and client atoms from V1 to V2 snapshot and projection types; all provider drivers now expose orchestrationAdapter instead of adapter.
  • Adds 8 database migrations (033–040) covering V2 event log, projection tables, effect outbox, provider session bindings, scheduled tasks, and application event source.
  • Exposes an Orchestrator MCP toolkit with handlers for thread lifecycle, task delegation, and scheduled task management.
  • Risk: default server state directory changes from userdata to userdata-v2 (and desktop from t3code to t3code-v2), and the SSH tunnel script targets userdata-v2; existing V1 persisted state will not be read by default.
📊 Macroscope summarized d03b0c3. 189 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted

🗂️ Filtered Issues

No issues evaluated.


Depends on #3861 for the server-side owned-subtree lifecycle cascade: mobile dispatches a single root command for archive/unarchive/delete and relies on the orchestrator to cascade the transition and cancel active runs across the owned subagent subtree.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants