Fix desktop test build identity and onboarding recovery#5778
Conversation
Greptile SummaryThis PR tightens the identity contract for macOS desktop test builds — bundle ID, app name, and auth callback URL scheme are now all derived from the same Key changes:
Issues found:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["run.sh: OMI_APP_NAME set?"] -->|"'Omi Dev' (default)"| B["EXPECTED_BUNDLE_ID = com.omi.desktop-dev\nEXPECTED_URL_SCHEME = omi-computer-dev"]
A -->|custom name| C["slugify_identifier(APP_NAME) → slug"]
C --> D{"slug empty?"}
D -->|yes| E["exit 1"]
D -->|no| F["EXPECTED_BUNDLE_ID = com.omi.slug\nEXPECTED_URL_SCHEME = omi-slug"]
B --> G["Validate OMI_BUNDLE_ID == EXPECTED\nValidate OMI_URL_SCHEME == EXPECTED"]
F --> G
G -->|mismatch| H["exit 1 — override rejected"]
G -->|match| I["Patch Info.plist\nPatch GoogleService-Info.plist BUNDLE_ID"]
I --> J["Build & sign .app"]
J --> K["Install to /Applications/APP_NAME.app"]
subgraph Swift ["Swift runtime (AppBuild.swift)"]
L["AppBuild.bundleIdentifier"]
L --> M{"== com.omi.computer-macos?"}
M -->|yes| N["isNonProduction = false\n→ Analytics ON, Sentry ON"]
M -->|no| O{"hasPrefix('com.omi.')?"}
O -->|yes| P["isNonProduction = true\n→ Analytics OFF, dev backend"]
O -->|no| Q["isNonProduction = false"]
end
subgraph Onboarding ["Onboarding Recovery (OnboardingChatView)"]
R["App relaunch: isMidOnboarding = true"] --> S{"isToolCompleted?"}
S -->|yes| T["Show Continue immediately"]
S -->|no| U["Start bridge\nscheduleRecoveredOnboardingFallback"]
U --> V["2s sleep"]
V --> W{"explorationRunning\nor explorationCompleted\nor fileCount > 0?"}
W -->|yes| X["Unlock Continue button"]
W -->|no| Y["Stay blocked"]
end
|
…e#5778) ## Summary - align custom macOS desktop test builds so app name, bundle ID, and auth callback scheme stay consistent - treat non-production com.omi.* bundles as dev/test builds and preserve custom app naming in the desktop app - add a minimal onboarding recovery fallback so resumed onboarding cannot get stuck waiting forever for complete_onboarding - remove the stale folder-access onboarding image while keeping real permission guidance, including screen recording/full disk access follow-ups ## Verification - xcrun swift test -c debug --package-path Desktop - built and relaunched /Applications/1233.app - verified the running app with agent-swift against bundle id com.omi.1233 - verified custom callback scheme routing for the 1233 test app during earlier local auth testing
Summary
Verification