Skip to content

Mobile: CLI sessions as real entries (ended or live) + remote-first lane base + sync-host resilience - #697

Merged
arul28 merged 4 commits into
mainfrom
ade/start-skill-ade-mobile-app-8f21a1ec
Jul 3, 2026
Merged

arul28 merged 4 commits into
mainfrom
ade/start-skill-ade-mobile-app-8f21a1ec

Conversation

@arul28

@arul28 arul28 commented Jul 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

Describe the change.

What Changed

Key files and behaviors.

Validation

How you tested.

Risks

Anything to watch.

ADE   Open in ADE  ·  ade/start-skill-ade-mobile-app-8f21a1ec branch  ·  PR #697

Greptile Summary

This PR updates lane creation, mobile roster behavior, and sync-host resilience. The main changes are:

  • Remote-first default base resolution for base-less lane creation across CLI, RPC, sync commands, desktop shared logic, and iOS.
  • Standalone CLI sessions shown as real Hub and Work entries, with terminal routing instead of chat transcript routing.
  • Sync host fallback handling that returns host_unavailable errors and retries after post-startup conflicts.
  • iOS updates for remote/local lane base selection, advisory fetches, roster attention counts, and hub navigation.
  • Tests and docs covering the new lane-base, roster, and sync behavior.

Confidence Score: 5/5

Safe to merge with low risk.

The changes are well-scoped and include tests for the main lane-base, roster, and sync-host behaviors. No blocking correctness or security issues were identified in the changed paths.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • Compared the CLI sessions roster between the before and after runs and documented that, before, only chat-await and attached-shell existed, while after, cli-ended, cli-live, and cli-failed were present with run-shell omitted, cli-live marked as running, cli-failed marked as failed, and attentionCount remaining at 1.
  • Compared the remote lane base run between before and after, noting that the after state adds baseBranch origin/main and shows fetchCalls and listBranchCalls referencing lane-primary.
  • Reviewed the sync-host-resilience run, observing that the after state includes a command_result with host_unavailable, a multi-attempt retry sequence, and a successful final exit (0).

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
apps/ade-cli/src/services/laneCreateRemoteBase.ts Adds shared host-side resolution for base-less lane creation using the primary lane remote-tracking ref.
apps/desktop/src/shared/defaultRemoteLaneBase.ts Adds shared remote lane base selection with bounded fetch and safe local fallback.
apps/ade-cli/src/services/sync/syncRemoteCommandService.ts Applies remote-first base resolution to mobile lanes.create commands when no base is provided.
apps/ade-cli/src/services/sync/rosterBuilder.ts Includes standalone CLI sessions in roster output while excluding run-owned infrastructure sessions.
apps/ade-cli/src/services/sync/syncHostStartupLoop.ts Retries cross-channel sync-host conflicts after initial startup so mobile sync can recover.
apps/ios/ADE/Models/RemoteRosterModels.swift Updates roster row helpers so CLI sessions route as terminal sessions and do not drive chat attention.
apps/ios/ADE/Services/SyncService.swift Treats host_unavailable as retryable and adds bounded advisory fetch support.
apps/ios/ADE/Views/Lanes/LaneCreateSheet.swift Adds remote/local base source selection and remote-first defaults to iOS lane creation.
apps/ios/ADE/Views/Hub/HubScreen+ChatNavigation.swift Routes cross-project quick-look only for explicit chat sessions while CLI sessions use activation.
apps/ios/ADE/Views/Work/WorkBrowserHelpers.swift Keeps standalone CLI sessions visible in Work lists and filters run-owned sessions.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Caller as iOS / CLI caller
participant Host as ADE RPC / Sync host
participant Resolver as Remote base resolver
participant Git as Git service
participant Lane as Lane service

Caller->>Host: Create lane without explicit base
Host->>Resolver: Resolve default base
Resolver->>Lane: Read primary lane
Lane-->>Resolver: primary baseRef / branchRef
Resolver->>Git: Fetch primary lane remote with timeout
Resolver->>Git: List branches
Git-->>Resolver: branch summaries
Resolver-->>Host: remote-tracking ref or null
Host->>Lane: Create lane with resolved base when available
Lane-->>Caller: Created lane
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Caller as iOS / CLI caller
participant Host as ADE RPC / Sync host
participant Resolver as Remote base resolver
participant Git as Git service
participant Lane as Lane service

Caller->>Host: Create lane without explicit base
Host->>Resolver: Resolve default base
Resolver->>Lane: Read primary lane
Lane-->>Resolver: primary baseRef / branchRef
Resolver->>Git: Fetch primary lane remote with timeout
Resolver->>Git: List branches
Git-->>Resolver: branch summaries
Resolver-->>Host: remote-tracking ref or null
Host->>Lane: Create lane with resolved base when available
Lane-->>Caller: Created lane
Loading

Reviews (1): Last reviewed commit: "/test: contract tests, iOS regression te..." | Re-trigger Greptile

arul28 and others added 4 commits July 3, 2026 12:07
…e default

- Hub roster (host rosterBuilder + iOS local mirror) now includes standalone
  CLI sessions, live or ended (run-shell excluded); PTY liveness overlays
  running state for booted scopes
- iOS Work list gate no longer hides ended standalone CLI sessions
- RemoteRosterChat.isChatTool: nil/unknown toolType routes to the activation/
  terminal path instead of the chat quick-look (blank-transcript vector)
- Hub context menu offers only Open for CLI rows (chat.archive/delete reject
  non-chat sessions host-side)
- lanes.create (sync layer): callers that omit baseBranch get the desktop
  default — remote-first base resolution (origin/<base>) honoring
  git.newLaneBaseSource, bounded fetch; new defaultRemoteLaneBase helper + tests
- iOS LaneCreateSheet: Remote/Local base-source picker, defaults to Remote
- brain ingress: answer command envelopes with a clear host_unavailable error
  instead of silently dropping (was: 30s timeouts + vague hydration banner)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A cross-channel singleton conflict after startup permanently killed the
retry loop, stranding paired phones on the ingress fallback (connected,
every request dropped) until a manual brain restart. Keep the loud
first-attempt failure, but slow-retry afterwards so sync re-hosts the
moment the foreign owner exits.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- host_unavailable is retryable on iOS: excluded from application-error
  classification, queued operations are retained during host restarts, and
  queueable sends queue instead of failing (Track A HIGH: the new ingress
  answer would otherwise permanently delete queued offline work on replay)
- attention counting (host rosterBuilder + iOS needsAttention) only counts
  chat rows and their attached shells — a failed standalone CLI session from
  months ago must not pin its project atop the hub with no way to clear it
- LaneCreateSheet remote-ref freshen now uses a genuinely bounded, non-queued
  advisory fetch (fetchGitAdvisory) instead of a task-group race that awaited
  the full 30s command timeout and enqueued stray git.fetch operations
- defaultRemoteLaneBase moved to shared/ (its consumer is ade-cli; renderer's
  byte-identical remoteNewLaneBaseFallback now aliases the shared function)
- dead provider-fallback collapsed in workCrossProjectChatToolType; the toast
  stub's toolType derivation lives on HubCreatedChat (single mapping site)
- tightened resolveDefaultRemoteLaneBase source param to NewLaneBaseSource|null

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- lanes.create default-base contract pinned in syncRemoteCommandService tests
  (remote default, explicit-base passthrough, local opt-out, no-remote repos)
- iOS ADETests: host_unavailable queue policy, needsAttention scoping,
  workSessionShouldAppearInWorkList visibility rules
- CLI parity: ade lanes create + agent create_lane + run_ade_action lane.create
  now resolve the same remote-first default base (shared
  laneCreateRemoteBase helper) + adeRpcServer regression tests + README/help
- Docs: sync-and-multi-device (roster/ingress/startup-loop/remote-commands),
  lanes (remote-first base), terminals-and-sessions (Work list visibility)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Jul 3, 2026 4:59pm

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@arul28, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c3e62f8f-8691-4366-a962-cf0d5ea0748f

📥 Commits

Reviewing files that changed from the base of the PR and between 607c382 and 92e2a00.

⛔ Files ignored due to path filters (5)
  • docs/features/lanes/README.md is excluded by !docs/**
  • docs/features/sync-and-multi-device/README.md is excluded by !docs/**
  • docs/features/sync-and-multi-device/ios-companion.md is excluded by !docs/**
  • docs/features/sync-and-multi-device/remote-commands.md is excluded by !docs/**
  • docs/features/terminals-and-sessions/README.md is excluded by !docs/**
📒 Files selected for processing (25)
  • apps/ade-cli/README.md
  • apps/ade-cli/src/adeRpcServer.test.ts
  • apps/ade-cli/src/adeRpcServer.ts
  • apps/ade-cli/src/cli.ts
  • apps/ade-cli/src/services/laneCreateRemoteBase.ts
  • apps/ade-cli/src/services/sync/brainProjectActionsSyncHandler.ts
  • apps/ade-cli/src/services/sync/rosterBuilder.test.ts
  • apps/ade-cli/src/services/sync/rosterBuilder.ts
  • apps/ade-cli/src/services/sync/syncHostStartupLoop.test.ts
  • apps/ade-cli/src/services/sync/syncHostStartupLoop.ts
  • apps/ade-cli/src/services/sync/syncRemoteCommandService.test.ts
  • apps/ade-cli/src/services/sync/syncRemoteCommandService.ts
  • apps/desktop/src/renderer/components/lanes/newLaneBaseSource.ts
  • apps/desktop/src/shared/defaultRemoteLaneBase.test.ts
  • apps/desktop/src/shared/defaultRemoteLaneBase.ts
  • apps/desktop/src/shared/types/sync.ts
  • apps/ios/ADE/Models/RemoteRosterModels.swift
  • apps/ios/ADE/Services/SyncService.swift
  • apps/ios/ADE/Views/Hub/HubComponents.swift
  • apps/ios/ADE/Views/Hub/HubComposerDrawer.swift
  • apps/ios/ADE/Views/Hub/HubScreen+ChatNavigation.swift
  • apps/ios/ADE/Views/Hub/HubScreen.swift
  • apps/ios/ADE/Views/Lanes/LaneCreateSheet.swift
  • apps/ios/ADE/Views/Work/WorkBrowserHelpers.swift
  • apps/ios/ADETests/ADETests.swift
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/start-skill-ade-mobile-app-8f21a1ec

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.

@arul28

arul28 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@copilot review but do not make fixes

@arul28
arul28 merged commit 30bedf4 into main Jul 3, 2026
5 of 6 checks passed
@arul28
arul28 deleted the ade/start-skill-ade-mobile-app-8f21a1ec branch July 3, 2026 17:25
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