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.
- Last reviewed commit: e7d710dcbc630824f0f8150900fff76c8937cbad
Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto 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
This change adds validated metadata for cached shell resumes, enables on-demand provider catalogs across client and server RPCs, expands WebSocket stream windows, and changes long-resume recovery to probe existing sessions while starting replacement connections on remote routes.
Changes: Shell Cache Resume
Layer / File(s) Summary Cache vouch contract and storage
packages/client-runtime/src/platform/orchestrationCache.ts,packages/client-runtime/src/platform/persistence.ts,apps/mobile/src/connection/environment-cache-store.ts,apps/mobile/src/connection/environment-cache-store.test.ts,apps/web/src/connection/storage.tsThe cache record and persistence interfaces support an optional vouch. Mobile and web storage load and save it when present. Vouch validation and shell synchronization
packages/client-runtime/src/state/shell.ts,packages/client-runtime/src/state/shell-sync.test.tsShell synchronization permits cached resume when the vouch matches the omission settings and server version and is less than 12 hours old. Authoritative snapshots update the vouch; replay and deferred-link updates preserve it. On-Demand Provider Catalogs
Layer / File(s) Summary Catalog request contracts and client options
packages/contracts/src/rpc.ts,packages/client-runtime/src/rpc/session.ts,packages/client-runtime/src/state/server.ts,apps/mobile/src/connection/runtime.ts,apps/mobile/src/state/server.tsRPC contracts and client configuration support providerCatalogsOnDemand; the mobile connection and server environment enable it.Server catalog filtering and refresh
apps/server/src/ws.ts,apps/server/src/ws.test.tsThe server filters machine catalogs for cwd-capable providers and returns a pending catalog snapshot when an on-demand cwd snapshot is unavailable. Tests cover provider updates and failed cwd scans. WebSocket Subscription Stream Windows
Layer / File(s) Summary Window initialization and coverage
apps/server/src/terminal/OutputProtocol.ts,apps/server/src/terminal/OutputProtocol.test.tsWindow initialization now includes server-config, shell, and thread subscription methods. The pending-chunk limit test covers these methods. Long-Resume Connection Recovery
Layer / File(s) Summary Replacement connection lifecycle and session closure
packages/client-runtime/src/connection/supervisor.ts,packages/client-runtime/src/rpc/session.ts,packages/client-runtime/src/rpc/session.test.ts,packages/client-runtime/src/connection/supervisor.test.tsThe supervisor manages replacement connection scopes and handoff. The RPC protocol suppresses non-request sends after disconnection, and tests cover session stream termination and retry timing. Long-resume probe and replacement decisions
packages/client-runtime/src/connection/supervisor.ts,packages/client-runtime/src/connection/supervisor.test.ts,docs/internals/connection-runtime.mdRemote long resumes can start a replacement while monitoring the existing session. Probe responses, inbound frames, host checks, and replacement outcomes determine whether the supervisor retains or replaces the session. Tests cover remote, LAN, and loopback cases. Estimated code review effort: 4 (Complex) | ~60 minutes
Sequence Diagram(s)
mermaid1 sequenceDiagram 2 participant EnvironmentSupervisor 3 participant ExistingSession 4 participant ReplacementConnection 5 EnvironmentSupervisor->>ExistingSession: Probe after long resume 6 EnvironmentSupervisor->>ReplacementConnection: Start parallel connection on remote route 7 ExistingSession->>EnvironmentSupervisor: Report probe answer or inbound frame 8 ReplacementConnection->>EnvironmentSupervisor: Report establishment result 9 EnvironmentSupervisor->>EnvironmentSupervisor: Retain existing session or adopt replacement mermaid1 sequenceDiagram 2 participant Client 3 participant WebSocketServer 4 participant ProviderInstance 5 Client->>WebSocketServer: Request config with providerCatalogsOnDemand 6 WebSocketServer->>ProviderInstance: Inspect cwd catalog capability 7 WebSocketServer->>Client: Return filtered config 8 Client->>WebSocketServer: Refresh providers for cwd 9 WebSocketServer->>ProviderInstance: Request cwd snapshot 10 WebSocketServer->>Client: Return matching or pending catalog snapshot Possibly related issues
- pingdotgg/t3code#24997 — The cache-vouch resume and stale-session batch filtering concern shell-list state recovery after cold start.
- pingdotgg/t3code#29255 — Long-resume recovery and shell resume overlap with the reconnect path described, but the issue concerns thread-message acknowledgement.
Suggested reviewers:
juliusmarminge,t3dotgg,macroscopeapp
Merge Risk: External image Minimal · up to e7d71
No merge-blocking defect was established. iOS device timing remains unmeasured.
Pre-merge checks: Passed 4
Check name Status Explanation Title check Passed The title clearly identifies the mobile performance fix for thread-list updates after reopening the app. Description check Passed The description includes Problem, Change, Scope and approval, and Verification sections. It explains the affected behavior, implementation, test coverage, reported checks, and unverified physical-devi… 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. Full details: Description check
Explanation
The description includes Problem, Change, Scope and approval, and Verification sections. It explains the affected behavior, implementation, test coverage, reported checks, and unverified physical-device scenarios.
Finishing Touches
Generate unit tests (beta)
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
External image Recent review info
-
External image Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: e68e19d
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
2736dc9e-3dae-4883-b6bf-4be9f182dc03
External image Commits
Reviewing files that changed from the base of the PR and between 0f9a957f5eda309a16098df281c4dc4c05dc696e and e7d710dcbc630824f0f8150900fff76c8937cbad.
External image Files selected for processing: 2
apps/server/src/ws.test.tsapps/server/src/ws.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
External image Recent review info
-
External image Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: e68e19d
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
2736dc9e-3dae-4883-b6bf-4be9f182dc03
External image Commits
Reviewing files that changed from the base of the PR and between 0f9a957f5eda309a16098df281c4dc4c05dc696e and e7d710dcbc630824f0f8150900fff76c8937cbad.
External image Files selected for processing: 2
apps/server/src/ws.test.tsapps/server/src/ws.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.