Skip to content

mobile: sync saved computers across devices; faster reconnect - #400

Merged
0xSero merged 1 commit into
mainfrom
mobile/computer-sync-fast-reconnect
Sep 29, 2026
Merged

0xSero merged 1 commit into
mainfrom
mobile/computer-sync-fast-reconnect

Conversation

@0xSero

@0xSero 0xSero commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Purpose

Make the "machines" experience work like T3 Connect: a computer paired on one device shows up on the user's other Apple devices, and reconnecting after launch or foreground is faster.

Key changes

  • Computer sync (iOS). Saved Kittylitter and direct-URL computers sync through the existing iCloud KVS bridge. The merge policy lives in Rust (cloud_sync::computers): a last-write-wins element set, so concurrent adds on two devices both survive and removals propagate instead of being resurrected. 8 unit tests.
  • What does not sync: Local Studio (grant bound to one device's iroh key), SSH (keys never leave the device), ChatGPT-connected computers (need that device's own sign-in). Covered by SavedServerStoreTests.
  • Credentials. Tokens for synced Kittylitter computers move to iCloud Keychain (end-to-end encrypted); Kittylitter hosts authenticate by token alone (alleycat host.rs validate_token). All other tokens stay ThisDeviceOnly, which is now the store default. Token reads are cached in memory instead of reading and rewriting the Keychain on every reconnect.
  • Reconnect (shared Rust, both platforms). Concurrent reconnect triggers wait for the in-flight pass instead of returning an empty result (which cleared the "connecting" state early). Foreground account probes run detached with a 10 s per-probe deadline, so a hung remote no longer holds up the reconnect result.
  • Remove the add-server first-run coachmark on iOS and Android.
  • Build hygiene: cap the shared Cargo target (60 GB default, LITTER_RUST_TARGET_MAX_GB) before Rust builds; host dev profile uses line-table debug info. The target had grown to 243 GB.
  • Stop tracking an accidentally committed self-referencing apps/ios/Resources/fs symlink that broke Xcode builds on fresh checkouts.

Verification

  • cargo test -p codex-mobile-client --lib cloud_sync → 16 passed; --lib reconnect → 53 passed.
  • make ios-sim-fast → BUILD SUCCEEDED; xcodebuild test -only-testing:LitterTests/SavedServerStoreTests → passed.
  • App launched on iPad simulator; first-run hint removed.
  • Not verified: real two-device iCloud sync (simulator has no iCloud account). Android not built locally (no toolchain on this Mac); CI covers it.

Platform notes

Computer sync is iOS-only: Android has no iCloud. Follow-up for Android would need Google Block Store or Drive app data. Reconnect fixes and the coachmark removal apply to both.

🤖 Generated with Claude Code

- Saved Kittylitter and direct-URL computers sync through iCloud KVS. The
  merge is a last-write-wins element set in Rust (cloud_sync::computers),
  so concurrent adds survive and removals do not come back. Local Studio,
  SSH and ChatGPT-connected computers stay on the device.
- Kittylitter tokens for synced computers move to iCloud Keychain; every
  other token stays device-only. Token reads are cached in memory instead
  of hitting (and rewriting) the Keychain on every reconnect.
- Reconnect: concurrent triggers wait for the in-flight pass instead of
  returning empty, and foreground account probes run detached with a 10s
  deadline so they no longer hold up the reconnect result.
- Remove the add-server first-run hint on iOS and Android.
- Build: cap the shared Cargo target (default 60GB) before Rust builds and
  keep host dev builds to line-table debug info.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@0xSero
0xSero force-pushed the mobile/computer-sync-fast-reconnect branch from 926c1e7 to 4114871 Compare September 29, 2026 17:26
@0xSero
0xSero merged commit 0a7769d into main Sep 29, 2026
10 checks passed
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