Skip to content

Improve desktop updater recovery - #8648

Merged
Git-on-my-level merged 1 commit into
mainfrom
codex/desktop-updater-reliability-8635
Jun 30, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
codex/desktop-updater-reliability-8635

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jun 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #8635.

  • Add structured Sparkle update-failure bucketing for appcast retrieval, download, signature, network, installer launch, and launch-location failures.
  • Show a recovery card in Settings > About > Software Updates with launch-location guidance and a manual latest-download fallback.
  • Fix desktop manual download routing to use release metadata instead of the hardcoded broken Omi.Beta.dmg GCS path, and let release creation store an explicit manual_download_url.
  • Return a clear 503 when the appcast cannot load releases instead of serving an empty successful feed.

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::updates
  • cargo test
  • xcrun swift test --package-path Desktop --filter UpdateFailureDiagnosticsTests
  • xcrun swift build -c debug --package-path Desktop
  • git diff --check

Note: live UI inspection through agent-swift was 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.

Review in cubic

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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")!

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 9 files

Confidence score: 3/5

  • The riskiest area is the download recovery path across desktop/macos/Desktop/Sources/AppBuild.swift and desktop/macos/Backend-Rust/src/routes/updates.rs: the recovery link can target a non-existent latest-download route and the fallback asset name (omi.dmg vs Omi.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, leaving lastUpdateFailure set when diagnostics.reason == .noUpdate can 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

@Git-on-my-level
Git-on-my-level force-pushed the codex/desktop-updater-reliability-8635 branch from 85232d4 to e96cf8f Compare June 30, 2026 00:54
@Git-on-my-level
Git-on-my-level merged commit 1562280 into main Jun 30, 2026
2 checks passed
@Git-on-my-level
Git-on-my-level deleted the codex/desktop-updater-reliability-8635 branch June 30, 2026 00:57
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.

Desktop: reduce macOS update check/download failures and read-only launch-location dead ends

1 participant