Skip to content

fix(desktop): report which stage blocked an update - #8975

Merged
lidge-jun merged 1 commit into
lidge-jun:devfrom
luvs01:codex/desktop-update-stage-errors
Nov 21, 2026
Merged

lidge-jun merged 1 commit into
lidge-jun:devfrom
luvs01:codex/desktop-update-stage-errors

Conversation

@luvs01

@luvs01 luvs01 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • 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.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: Minimal · up to 6974e

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: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d61cca1 and 6974e94.

Files selected for processing: 9

  • desktop/src-tauri/src/lib.rs
  • desktop/src-tauri/src/tray.rs
  • desktop/src-tauri/src/updater.rs
  • desktop/ui/update.html
  • docs-site/src/content/docs/es/troubleshooting/update-failed.md
  • docs-site/src/content/docs/tr/troubleshooting/update-failed.md
  • docs-site/src/content/docs/troubleshooting/update-failed.md
  • structure/desktop-shell.md
  • tests/clients/desktop-update-surface.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Nov 20, 2026
@luvs01
luvs01 marked this pull request as ready for review November 20, 2026 02:38
@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer integration into dev (per MAINTAINERS.md; maintainer integration, not an independent approval)

@lidge-jun
lidge-jun merged commit 70b0e83 into lidge-jun:dev Nov 21, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants