Skip to content

feat(mobile): support orchestration V2 on Android - #3870

Closed
PixPMusic wants to merge 99 commits into
pingdotgg:android-dev-pr-3514from
PixPMusic:pixpmusic/mobile-orchestration-v2
Closed

feat(mobile): support orchestration V2 on Android#3870
PixPMusic wants to merge 99 commits into
pingdotgg:android-dev-pr-3514from
PixPMusic:pixpmusic/mobile-orchestration-v2

Conversation

@PixPMusic

@PixPMusic PixPMusic commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Stacking

Warning

This PR is stacked on two branches: it targets #3579 (android-dev-pr-3514) and requires #2829. Because GitHub can only express one base, the branch carries a merge of t3code/codex-turn-mapping, so the diff below includes #2829's changes until #2829 lands. Review the four commits after Merge orchestration v2 (#2829).

Summary

Makes the Orchestration V2 experience work on the Android app:

  • resolve the Android/V2 merge seams: the V2 shell/thread cache rides the Android SQLite cache store, adapted to the V2 snapshot contracts
  • fix(mobile): render V2 controls on Android — Android icon mappings for every symbol used by the V2 lineage banner, activity inspector, queue controls, and work-log thread links (iOS keeps delegating to expo-symbols)
  • fix(mobile): keep stop and steer responsive — the composer send action reflects actual delivery semantics (offline/backlogged → Queue; connected active turn → Steer) and messages deliver to a busy run instead of failing; the shared control-lane and Codex acknowledgement fixes ship separately in fix(orchestrator): keep stop and steer responsive #3865
  • test(mobile): pin subagent result rendering — locks provider parity for projected subagent results in the activity views (pairs with feat(subagents): disclose projected results consistently #3866)
  • fix(mobile): avoid unsupported Hermes array sorting — Hermes 250829098.0.10 lacks Array.prototype.toSorted; release builds crashed opening a thread (ThreadRelationshipsBanner), replaced with immutable sort() equivalents plus a regression test

Validation

  • vp check, vp run typecheck — green across all 15 packages
  • focused mobile suites (composer model, outbox, activity views, relationship rows) — 32 tests passing
  • the same changes were validated on-device from the integration branch: bundled Release APK on a Pixel 7 Pro and the t3test AVD, cold launch clean with no Hermes/Nitro errors

Note

Medium Risk
Broad mobile orchestration UI and cache contract changes affect thread messaging, queueing, and reconnect behavior; risk is mitigated by focused tests but the stacked diff increases review blast radius.

Overview
Brings the mobile app onto Orchestration V2 end-to-end: shell/thread caches use shared ORCHESTRATION_CACHE_SCHEMA_VERSION and V2 snapshot shapes (projection.thread.id), and thread screens consume V2 shell projections, visibleTurnItems, and RuntimeRequestId for approvals/input instead of V1 turn/session models.

New thread UX wired to V2 workflows includes a lineage banner (fork/subagent/transfer navigation, merge-back, session detach), queue reorder/promote-to-steer, an activity inspector with structured payloads and checkpoint rollback, fork-from-assistant actions, and updated pending approval/input cards that respect live vs stale provider response capability.

Android-specific fixes: Tabler icon mappings for every SF Symbol used by those surfaces, composer Send / Steer / Queue labeling via resolveThreadComposerSendLabel and stop driven by threadRuntimeIsActive, and a Hermes crash fix replacing Array.prototype.toSorted with immutable sort() in orderThreadRelationshipRows (with regression test).

The diff also carries stacked changes (desktop userdata-v2 paths, large .plans docs, marketing copy) from the integration branch; the mobile commits above are the intended product scope.

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

Note

Add Orchestration V2 support to the Android mobile app, replacing session/turn model with runtime/run model

  • The mobile app's thread state, composer, approval/input cards, and status indicators are migrated from the v1 session/turn model to the v2 runtime/run model; useSelectedThreadDetail is replaced by useSelectedThreadProjection and useSelectedThreadVisibleTurnItems throughout.
  • New mobile UI components are added: ThreadRelationshipsBanner (fork/transfer/subagent navigation and merge-back), ThreadQueueControl (reorder and promote queued runs), ThreadActivityInspector (structured item detail view), and PendingApprovalCard/PendingUserInputCard now disable actions when responseCapability !== 'live'.
  • The server ships a full Orchestration V2 stack: ProjectionStoreV2, EventSinkV2, EventStoreV2, ProviderSessionManagerV2, OrchestratorV2, RunExecutionService, provider adapters (Codex, Claude, Cursor, Grok, OpenCode, ACP Registry), and database migrations 033–040.
  • A new Scheduled Tasks feature is introduced end-to-end: contracts, server service, SQL persistence (migration 040), settings UI (ScheduledTasksSettings), and a per-thread automations panel.
  • The MCP server gains an orchestrator toolkit (OrchestratorMcpService) exposing thread lifecycle, task delegation, and scheduling over MCP.
  • Cursor now uses @cursor/sdk directly instead of spawning an ACP runtime; CURSOR_API_KEY is required from provider environment settings.
  • Risk: Server state directory renamed from userdata to userdata-v2 and desktop app directories updated to t3code-v2; existing installations will start with a fresh state directory.
📊 Macroscope summarized a706e39. 5 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted

🗂️ Filtered Issues

No issues evaluated.

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 PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants