feat(020): rip out Cloud V1 from the mobile app#3389
Conversation
📋 PR Review Helper📱 Mobile App Build✅ Ready to test! (commit 🕶️ ASG Client Build⏳ Waiting for build... 🔀 Test Locallygh pr checkout 3389 |
651b193 to
77599d4
Compare
11110a0 to
d8bc631
Compare
PR Agent Orchestrator State{
"cycle": 8,
"fixRound": 0,
"totalReviewerRuns": 8,
"consecutiveNoNewReviews": 8,
"openFindings": [],
"resolvedFindings": [],
"nitFindings": [],
"phase": "discovery",
"status": "in_progress",
"lastPair": [],
"stagnationFixRounds": 0,
"lastOpenCount": 0,
"fingerprintReopenCounts": {},
"mutedFingerprints": []
} |
🤖 PR Agent Review — cycle 8✅ No blocking findings · 0 blocking · 0 nits No model reviews ran this cycle. Updated automatically by the PR Agent Orchestrator each review cycle. Nits do not block merge. |
Device e2e green (emulator against cloud-isaiah)Ran the ripout build (Metro on this branch, pointed at cloud-isaiah). Verified the three things the removals put at risk:
Full flow observed: version check (V2) → login → |
d8bc631 to
ed7ff3b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8bc63180d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ed7ff3b to
ab1ea27
Compare
ab1ea27 to
f1b72a6
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f1b72a6. Configure here.
Removes all Cloud V1 wiring from the mobile app, host and island, following the login cutover (#3382). Host (src/): - Delete SocketComms + WebSocketManager (the V1 glasses websocket) + tests + jest mocks, and ws-types. - Delete the Supabase provider + @supabase/supabase-js dependency (and its orphaned patch-package patch) — no Supabase SDK in the app at all. - Delete the RestComms shim, BackendUrl.tsx (redundant with the V2 CloudUrl switcher), and NonProdWarning.tsx (already unreferenced). VersionInfo shows cloud_core_url instead of backend_url. - Boot version gate + connection banners already moved to V2 (min-version on core, toolkit.session.status) in earlier commits; the connection-screen reset now targets cloud_core_url. Island (modules/island/): - Delete services/RestComms.ts (the V1 REST client) and every caller. - Remove the backend_url + saved_backend_urls settings, getRestUrl/getWsUrl (the /glasses-ws builder), and the per-change user-settings server sync. - Drop the dead V1 facades: session.account.*, dev.minimumClientVersion / backendUrl / setBackendUrl / savedUrls. - Remove the V1 phone-location upload (local miniapp forwarding unchanged). - Remove backend_url from runtime/config + diagnosticContext. Removed-with-tracking (V2 endpoints do not exist yet; these already silently failed post-cutover): per-change settings sync, phone-location upload, phone notification / calendar upload. Follow-up product work, noted in #3392. Verification: 52 jest suites / 421 tests pass, tsc clean (island included), device e2e green on cloud-isaiah (V2 version gate, login to home, connection banner correct, zero legacy-websocket noise).
f1b72a6 to
288a301
Compare
Scope expanded to the full V1 removal (host + island), closes #3392Per review discussion, this PR now removes all Cloud V1 from the mobile app, not just the host auth/socket paths. Audit and plan captured in #3392. Added since the initial host-auth removal:
Removed-with-tracking (no V2 endpoint yet; already silently failing post-cutover, so no live regression): per-change settings sync, phone-location upload, notification/calendar upload. Follow-up product work, noted in #3392. Net: +114 / −2281. 52 jest suites / 421 tests pass, tsc clean (island included). Device e2e re-verified on cloud-isaiah before this push (V2 version gate, login → home, connection banner correct, zero legacy-websocket noise). Island coordination note: this touches |
- Drop the postinstall patch-package step: it pointed at the deleted patches-runtime/ dir, whose only patch was the retired Supabase one (a missing --patch-dir is a no-op, so this is dead weight, not a fix) - Verify logout against both MMKV account tokens so the check matches the "token pair" comment - Update stale comments that still described the deleted WebSocketManager/SocketComms/ws-types as live
Dev's #3411 renamed @mentra/island to @mentra/engine (toolkit → engine) across every file this branch deletes or edits. Resolution re-expresses the ripout in the engine world: - Files this branch deletes (host SocketComms/WSM/RestComms/ws-types, BackendUrl, NonProdWarning, and the module RestComms): deletion wins; dev's only changes to them were the mechanical rename. - Content conflicts: this branch's version plus dev's exact rename sweep (@mentra/island → @mentra/engine, toolkit → engine, useToolkitSnapshot → useEngineSnapshot), with comment wording aligned to dev's engine naming. tsc clean on the merged tree (mobile src + modules).
Deploying mentra-live-ota-site with
|
| Latest commit: |
057f852
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4114324a.mentra-live-ota-site.pages.dev |
| Branch Preview URL: | https://cloud-v1-mobile-ripout.mentra-live-ota-site.pages.dev |
Deploying mentra-store-dev with
|
| Latest commit: |
057f852
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://69fb147b.augmentos-appstore-2.pages.dev |
| Branch Preview URL: | https://cloud-v1-mobile-ripout.augmentos-appstore-2.pages.dev |
Deploying dev-augmentos-console with
|
| Latest commit: |
057f852
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7ce0ed65.dev-augmentos-console.pages.dev |
| Branch Preview URL: | https://cloud-v1-mobile-ripout.dev-augmentos-console.pages.dev |
Deploying prod-augmentos-account with
|
| Latest commit: |
057f852
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://06a0f64e.augmentos-e84.pages.dev |
| Branch Preview URL: | https://cloud-v1-mobile-ripout.augmentos-e84.pages.dev |

020: Rip out Cloud V1 from the mobile app
Follow-up to #3382 (stacked on
mentra-account-auth; GitHub retargets todevwhen that merges). Removes the V1 wiring the login cutover left dormant.Deleted
supabaseClient.ts+@supabase/supabase-js— zero Supabase SDK in the app now (bun.lockupdated)Migrated
GET /api/client/min-version(same retry semantics, newutils/cloudVersion.ts)toolkit.session.status()/onStatus()(the old status store loses its only writer with WSM gone)Removed with tracking (silently failing since the cutover; V2 endpoints don't exist yet)
Out of scope (island-side, to coordinate with the island workstream)
RestComms+ its settings store's per-change server writetoolkit.session.account.*legacy deletion surface (superseded by the V2 flow in feat(019): mobile login on Cloud V2 account auth (drop legacy Cloud V1 + Supabase) #3382)Verification
53 jest suites / 424 tests pass; tsc clean outside island's in-progress files. Device e2e (login → home → cloud connect on
cloud-isaiah) to be re-run on this branch before merge.Summary by cubic
Removes all Cloud V1 code from the host app and engine module, and moves the boot version gate and connection UI to Cloud V2. Logout now uses the V2 auth flow; settings and phone/calendar/location uploads are local‑first until V2 sync lands.
Refactors
SocketCommsandWebSocketManager(tests andjest.setupmocks removed).GET /api/client/min-versionviautils/cloudVersion.ts(with retry); connection reset targetsSETTINGS.cloud_core_url.CloudConnection,WebsocketStatus) now usesengine.session.status()/onStatus()(Cloud V2 runtime).RestCommsand its callers; droppedbackend_url/saved-URL settings, related dev/session facades, V1 URL builders; cleaneddiagnosticContext.BackendUrlandNonProdWarning;VersionInfoshowscloud_core_url.@mentra/engine(was@mentra/island) after merge fromdev.Dependencies
@supabase/supabase-jsand its patch; deletedsupabaseClient.ts.Written for commit 057f852. Summary will update on new commits.
Note
High Risk
Large cutover touching boot version gating, connection UI, auth/logout, and removal of settings sync and cloud uploads; misconfigured Cloud V2 endpoints or missing V2 replacements could block login or silently stop cloud-side phone/calendar/location data until follow-up work lands.
Overview
Removes the dormant Cloud V1 stack from the mobile app and engine:
SocketComms,WebSocketManager, islandRestComms,@supabase/supabase-js/supabaseClient.ts, V1backend_urlsettings and devBackendUrl/NonProdWarningUI, plus related tests and jest mocks.Boot and connectivity now use Cloud V2: the splash minimum-client-version check calls
fetchMinimumClientVersionagainst the resolved cloud core URL (custom URL detection/reset usescloud_core_url).CloudConnectionandWebsocketStatussubscribe toengine.session.status()instead of the legacy V1 websocket store.Runtime behavior is local-first where V1 uploads are gone: Mantle no longer pulls/pushes user settings, syncs timezone, or uploads phone notifications/calendar/background location to V1; local miniapp forwarding is unchanged. Engine settings drops per-change server sync and
getRestUrl/getWsUrl;session.account.*and dev backend URL helpers are removed from facades. Logout signs out via the auth client and verifies V2 MMKV tokens, with legacy Supabase key cleanup only for upgrades.Reviewed by Cursor Bugbot for commit 057f852. Bugbot is set up for automated code reviews on this repo. Configure here.