🤖 feat: move update controls into About dialog#2335
Merged
ibetitsmike merged 2 commits intomainfrom Feb 11, 2026
Merged
Conversation
b02f832 to
8d6ca70
Compare
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 11, 2026
## Summary Adds user-facing feedback when update operations fail, plus a `DEBUG_UPDATER_FAIL` flag to test error states locally. ## Background Follow-up to #2335 (moved update controls into About dialog). Several failure modes were identified: - `downloadUpdate()` / `installUpdate()` could throw without emitting an `UpdateStatus.error` - TitleBar had no icon for the `error` state — failures were invisible unless the About dialog was open - Transient errors during **manual** "Check for Updates" silently reverted to `idle`, identical to background auto-checks — users couldn't tell if the check actually ran - No easy way to test error UI locally in dev mode ## Implementation ### Schema: phase-aware errors - Extended `UpdateStatusSchema` error variant with `phase: "check" | "download" | "install"` so the UI can tailor messaging and retry CTAs. ### Backend: source-aware checks + error emission - `update.check` now accepts `{ source?: "auto" | "manual" }`: - **Auto** checks (background polling): transient errors still silently back off to `idle` (no spam) - **Manual** checks (user clicks): transient errors surface as `{ type: "error", phase: "check" }` so the user gets feedback - Wrapped `downloadUpdate()` and `installUpdate()` in try/catch to emit proper error statuses with the relevant phase instead of silently throwing - All error paths throughout the updater now include the `phase` field ### UI: discoverable errors - **About dialog open behavior**: Opening About now uses existing streamed update state and does **not** force a manual check; update checks occur only when the user clicks **Check for Updates**. - **TitleBar**: Added `AlertTriangle` badge icon when `updateStatus.type === "error"` — failures are now visible even with the About dialog closed - **About dialog**: Phase-aware error section with tailored copy and retry CTAs: - Check errors → "Update check failed" + "Try again" - Download errors → "Download failed" + "Retry download" + "Check again" - Install errors → "Install failed" + "Try install again" + "Check again" ### `DEBUG_UPDATER_FAIL` — dev-mode failure simulation New env var to exercise error UI locally: ```bash DEBUG_UPDATER=1.0.0 DEBUG_UPDATER_FAIL=check make dev # check fails DEBUG_UPDATER=1.0.0 DEBUG_UPDATER_FAIL=download make dev # download fails at ~40% DEBUG_UPDATER=1.0.0 DEBUG_UPDATER_FAIL=install make dev # install fails ``` Only takes effect when `DEBUG_UPDATER` is set with a fake version string. Extended `parseDebugUpdater()` to parse the fail phase and gated simulation in each fake path. ## Validation - `make static-check` — all checks pass - `bun test src/desktop/updater.test.ts` — 25 tests pass (includes new source/phase + fail simulation tests) - `bun test ./tests/ui/aboutDialog.integration.test.ts` — 7 tests pass (includes 3 new error phase tests) ## Risks Low. Changes are additive — the `phase` field is new, and `source` input is optional (existing call sites passing `undefined` remain valid). `DEBUG_UPDATER_FAIL` is dev-only and gated behind `DEBUG_UPDATER`. --- _Generated with `mux` • Model: `anthropic:claude-opus-4-6` • Thinking: `xhigh` • Cost: `$4.77`_ <!-- mux-attribution: model=anthropic:claude-opus-4-6 thinking=xhigh costs=4.77 -->
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Background
Implementation
DEBUG_UPDATER=<fakeVersion>now seeds an immediateavailablestate inUpdaterService, so local update-pending simulation is visible right away.UpdateServicenow notifies subscribers after initial status sync to avoid missing early state during initialization races.Validation
TEST_INTEGRATION=1 bun x jest tests/ui/aboutDialog.integration.test.ts --runInBand --silentbun test src/desktop/updater.test.tsmake static-checkRisks
Generated with
mux• Model:openai:gpt-5.3-codex• Thinking:xhigh• Cost:$2.98