Skip re-downloading an already ready update, re-prompt instead - #1127
Merged
Conversation
h0x91b
enabled auto-merge (squash)
July 25, 2026 07:31
h0x91b
disabled auto-merge
July 25, 2026 07:32
h0x91b
force-pushed
the
fix/dev3-updater-ready-version-guard
branch
from
July 25, 2026 07:34
f4712cc to
98cb85d
Compare
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.
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.tsnow keeps its ownreadyUpdate = { version, remindedAt }(Electrobun'supdateReadyflag can't be trusted — any latercheckForUpdate()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
updateAvailablewithreminder: true,App.tsxbumps an announcement counter, andGlobalHeader's toast effect re-opens the restart prompt even though the version is unchanged (previouslysetUpdateVersion(sameVersion)was a silent no-op).Rationale and trade-offs:
decisions/168-ready-update-guard-with-reminder.md.