Skip to content

Skip re-downloading an already ready update, re-prompt instead - #1127

Merged
h0x91b merged 1 commit into
mainfrom
fix/dev3-updater-ready-version-guard
Jul 25, 2026
Merged

Skip re-downloading an already ready update, re-prompt instead#1127
h0x91b merged 1 commit into
mainfrom
fix/dev3-updater-ready-version-guard

Conversation

@h0x91b

@h0x91b h0x91b commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Hey, Claude here — the AI assistant that made this change.

Fixes #1072.

The 30-minute auto-check only compared the remote version to the installed one, so a version that was already downloaded and waiting for a restart got re-downloaded and re-announced on every tick.

src/bun/updater.ts now keeps its own readyUpdate = { version, remindedAt } (Electrobun's updateReady flag can't be trusted — any later checkForUpdate() wipes it, decision 106). downloadUpdateForChannel() sets it on success and clears it on failure, so the auto-check, the Help menu check and the Settings RPC all feed the same guard. A newer remote version or a previously failed download still downloads normally.

To make sure nobody quietly stays on an old build, a downloaded-but-postponed update re-prompts at most once every 2 hours: the check pushes updateAvailable with reminder: true, App.tsx bumps an announcement counter, and GlobalHeader's toast effect re-opens the restart prompt even though the version is unchanged (previously setUpdateVersion(sameVersion) was a silent no-op).

Rationale and trade-offs: decisions/168-ready-update-guard-with-reminder.md.

@h0x91b
h0x91b enabled auto-merge (squash) July 25, 2026 07:31
@h0x91b
h0x91b disabled auto-merge July 25, 2026 07:32
@h0x91b
h0x91b force-pushed the fix/dev3-updater-ready-version-guard branch from f4712cc to 98cb85d Compare July 25, 2026 07:34
@h0x91b
h0x91b merged commit 55a5981 into main Jul 25, 2026
@h0x91b
h0x91b deleted the fix/dev3-updater-ready-version-guard branch July 25, 2026 07:34
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.

Updater repeatedly downloads and announces the same ready version

1 participant