Repository navigation
Improve desktop updater recovery - #8648
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85232d428c
ℹ️ 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".
| private static let betaOverwriteMigrationKey = "didMigrateBetaOverwrite_v1" | ||
| private static let desktopAppcastURL = URL( | ||
| string: "https://api.omi.me/v2/desktop/appcast.xml?platform=macos")! | ||
| static let manualDownloadURL = URL(string: "https://api.omi.me/v2/desktop/download")! |
There was a problem hiding this comment.
Point the recovery link at an existing download route
When the recovery banner opens AppBuild.manualDownloadURL, this path does not match any route served by the production Python API: backend/routers/updates.py registers /v2/desktop/download/latest and /v2/desktop/download/beta, and a repo-wide search found no /v2/desktop/download route. In any update-failure scenario, the “Download Latest” button will land on a 404 instead of the DMG, so use the existing latest endpoint (and the beta variant/query when appropriate).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
3 issues found across 9 files
Confidence score: 3/5
- The riskiest area is the download recovery path across
desktop/macos/Desktop/Sources/AppBuild.swiftanddesktop/macos/Backend-Rust/src/routes/updates.rs: the recovery link can target a non-existent latest-download route and the fallback asset name (omi.dmgvsOmi.dmg) can produce 404 redirects, so users may be unable to fetch updates when fallback logic is used — point to the concrete latest endpoint and align the fallback filename casing before merging. - In
desktop/macos/Desktop/Sources/UpdaterViewModel.swift, leavinglastUpdateFailureset whendiagnostics.reason == .noUpdatecan keep a stale failure recovery card visible after a successful check, which can confuse users about update health — clear the failure state on the no-update path before merging.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
85232d4 to
e96cf8f
Compare
Summary
Closes #8635.
Omi.Beta.dmgGCS path, and let release creation store an explicitmanual_download_url.Root Cause
Update failures were being collapsed into human-readable Sparkle strings, while the backend had a manual download path that could point at a nonexistent stable artifact. Users running from Downloads, mounted DMGs, or temporary/read-only locations also had no clear in-app recovery path.
Validation
cargo test routes::updatescargo testxcrun swift test --package-path Desktop --filter UpdateFailureDiagnosticsTestsxcrun swift build -c debug --package-path Desktopgit diff --checkNote: live UI inspection through
agent-swiftwas blocked locally because Accessibility permission is not granted to this terminal, so the UI recovery card was compile-checked but not visually inspected through the accessibility tree.