You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(desktop): report which stage blocked an update - #8975
The Desktop update window discarded every native install error and offered a manual package download even after signature verification or a runtime stop refusal. It now reports the stage that failed. The runtime messages distinguish an unsuccessful stop, unknown proxy ownership, and a stop already in progress.
Only a package download request failure offers the release link. The updater keeps plugin diagnostics in its existing local log and sends the page a bounded message and a download-advice flag. If the status refresh also fails, the page keeps the install error and asks the user to check again.
Updated the desktop shell contract and the English, Spanish and Turkish troubleshooting pages. The download, verification, drain, recovery and installer calls retain their order and behavior.
Verification
Windows, Bun 1.4.4. bun test tests/clients/desktop-update-surface.test.ts tests/clients/desktop-exit-ownership.test.ts passed all 29 tests. This covers the release fallback, the timeout and unavailable-status paths, and the existing stop-before-install contract.
bun run typecheck, bun run structure:check, cargo fmt --manifest-path desktop/src-tauri/Cargo.toml --check and git diff --check passed.
bun install --frozen-lockfile and bun run build in the documentation site passed. Astro built 820 pages and checked 126,212 internal links.
cargo test --locked --offline --jobs 4 --manifest-path desktop/src-tauri/Cargo.toml --lib updater::tests passed all 17 updater tests on Windows. The new Rust test checks that signature and platform errors omit the manual link and that the serialized page response excludes the raw diagnostic. The test build used the repository's placeholder check resources.
The full Bun suite and a live installation were not run. Local testing used the focused suites on a shared Windows host. The installed application and its serving proxy were left running.
Checklist
Scope stays focused and avoids unrelated cleanup.
Docs or release notes were updated when needed.
Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. The update-page origin gate and native verification remain in place. Raw plugin errors are excluded from the serialized response.
Summary by CodeRabbit
Bug Fixes
Update failures now show messages that identify the stage that failed. A manual-download option appears only when a package download fails and the offered version is known.
After an installation timeout, the update window directs you to check the status before retrying. If status can’t be refreshed, the installation error remains visible.
Documentation
Updated desktop update troubleshooting guidance to explain failure messages, signature checks, and when a release download link is available.
No actionable comments were generated in the recent review.
Walkthrough
The updater now returns structured, stage-specific installation failures. The desktop update window uses those failures to control error messages and manual-download guidance. Tests and documentation cover the updated behavior.
Changes: Desktop update failure reporting
Layer / File(s)
Summary
Classify and report installation failures desktop/src-tauri/src/updater.rs, desktop/src-tauri/src/lib.rs, desktop/src-tauri/src/tray.rs
The updater returns structured failures with stage-specific messages and a manual-download flag. The native invocation logs the original error and returns an invocation error. A test checks failure serialization and diagnostic omission.
Display failure messages and update guidance desktop/ui/update.html, tests/clients/desktop-update-surface.test.ts, docs-site/src/content/docs/*/troubleshooting/update-failed.md, structure/desktop-shell.md
The update window shows manual-download guidance only when a structured failure requests it. If the status refresh fails after installation, the window clears the latest version and displays an unavailable-status message. Tests and documentation cover the failure states and download guidance.
The update window now reports which stage blocked an update and offers the release link only for package download failures. No merge-blocking risk was found in the supplied changes.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "fix(desktop): report which stage blocked an update" matches the main change: install errors now identify the failed stage (download, signature, runtime, installer) via a new InstallFailure …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix(desktop): report which stage blocked an update" matches the main change: install errors now identify the failed stage (download, signature, runtime, installer) via a new InstallFailure type with a user-facing message and manualDownload flag, and the update window shows stage-specific messages. The title is specific to the desktop update path and is not vague or misleading. Its wording follows the conventional commit style and is concise.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Checks on this head: 17 passed, 16 skipped, none pending or failing (Ubuntu PR CI; Windows/macOS are covered by the next dev batch gate).
Review threads: none unresolved.
Review: gpt-6.1-terra, two rounds, final verdict PASS. Error reporting only: signature verification, download source and installer invocation are unchanged.
Regression: tests/clients/desktop-update-surface.test.ts 12 pass on this head, 8 pass / 4 fail with the desktop files restored from dev. cargo check could not run locally (unrelated SwiftUI macro toolchain issue); the desktop shell CI job covers the build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
bun test tests/clients/desktop-update-surface.test.ts tests/clients/desktop-exit-ownership.test.tspassed all 29 tests. This covers the release fallback, the timeout and unavailable-status paths, and the existing stop-before-install contract.bun run typecheck,bun run structure:check,cargo fmt --manifest-path desktop/src-tauri/Cargo.toml --checkandgit diff --checkpassed.bun install --frozen-lockfileandbun run buildin the documentation site passed. Astro built 820 pages and checked 126,212 internal links.cargo test --locked --offline --jobs 4 --manifest-path desktop/src-tauri/Cargo.toml --lib updater::testspassed all 17 updater tests on Windows. The new Rust test checks that signature and platform errors omit the manual link and that the serialized page response excludes the raw diagnostic. The test build used the repository's placeholder check resources.Checklist
Summary by CodeRabbit
Bug Fixes
Documentation