Revert "feat(desktop): route beta channel to dev backend"#7230
Conversation
Greptile SummaryThis revert disables the beta-channel → development-backend routing introduced in #7224, after discovering that the dev backend mints fresh Firebase UIDs for existing prod users (causing data isolation issues). The
Confidence Score: 4/5Safe to merge — all builds will continue routing to production backends, and the revert correctly undoes the problematic beta-channel routing. The change is a clean, well-motivated revert. The only rough edges are two leftover artefacts: the desktop/Desktop/Sources/DesktopBackendEnvironment.swift — dead Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[App launch] --> B{shouldUseDevelopmentBackends}
B -- "always false (post-revert)" --> C[Use production backends]
C --> D[api.omi.me Python API]
C --> E[desktop-backend prod Rust API]
B -. "intended future path\n(re-land after auth fix)" .-> F{bundleId == prod\nAND channel == beta?}
F -- Yes --> G[Use development backends]
F -- No --> C
G --> H[api.omiapi.com Python API]
G --> I[desktop-backend dev Rust API]
|
| static func shouldUseDevelopmentBackends( | ||
| bundleIdentifier: String, | ||
| updateChannel: String, | ||
| forceOverride: String? = nil | ||
| updateChannel: String | ||
| ) -> Bool { |
There was a problem hiding this comment.
Both
bundleIdentifier and updateChannel are now unused parameters in shouldUseDevelopmentBackends. The call-site in the computed shouldUseDevelopmentBackends var still passes them, but the function body ignores them entirely. Swift may warn about unused variables here, and it creates a misleading API surface — callers could reasonably assume the values affect the result. Dropping them from the signature (and the call-site) makes the temporary return false state self-documenting.
| static func shouldUseDevelopmentBackends( | |
| bundleIdentifier: String, | |
| updateChannel: String, | |
| forceOverride: String? = nil | |
| updateChannel: String | |
| ) -> Bool { | |
| static func shouldUseDevelopmentBackends( | |
| bundleIdentifier: String = "", | |
| updateChannel: String = "" | |
| ) -> Bool { |
Reapplies #7224 after the #7230 revert. Verified locally this time: - Named bundle (`com.omi.omi-beta-dev-test`) launched with shell-bundled dev URLs (`OMI_PYTHON_API_URL=https://api.omiapi.com/`, `OMI_DESKTOP_API_URL=https://desktop-backend-dt5lrfkkoa-uc.a.run.app/`). - Signed in with `kodjima33@gmail.com` — landed on **prod UID `viUv7GtdoHXbK1UBCDlPuTDuPgJ2`** (not a ghost dev UID). - Existing chat history and tasks loaded. - New requests go through dev backend: `POST https://api.omiapi.com/v2/desktop/messages`, `/v3/memories`, `/v1/action-items` — all succeeding, AgentSync pushing rows. - Confirms dev backend's `SERVICE_ACCOUNT_JSON`, `FIREBASE_API_KEY`, `FIREBASE_PROJECT_ID` are all on prod Firebase (`based-hardware`), so dev-issued custom tokens resolve to the same prod UID. This time the change ships through the existing #7227 diagnostic patch (already on main), so if Codemagic's universal-bundle step trips again we'll get a real error instead of a 0.6s opaque failure. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…ware#7230) This reverts commit d44b4a3, reversing changes made to 34265a0.
Reverts #7224. The change was merged before being validated locally; we want to test the dev-backend routing on a named local bundle first (using the
OMI_FORCE_DEV_BACKENDSoverride I added in that PR — except the env-var didn't actually reach the launched .app becauserun.shloads URLs via a bakedContents/Resources/.env, not shell env). Reverting onmain, validating locally, then redoing.The diagnostic PR #7227 stays — that's an unrelated workflow hardening that's useful regardless.
🤖 Generated with Claude Code