Skip to content

fix: prevent update banner from persisting after update#52

Merged
AmethystLiang merged 1 commit intomainfrom
AmethystLiang/update-banner-stuck
Mar 23, 2026
Merged

fix: prevent update banner from persisting after update#52
AmethystLiang merged 1 commit intomainfrom
AmethystLiang/update-banner-stuck

Conversation

@AmethystLiang
Copy link
Copy Markdown
Contributor

Problem

After updating the app and restarting, the update banner ("Version X is ready to install" + "Restart now") stays visible even though the user is already running the latest version. This creates an infinite loop: banner → restart → banner again.

Solution

With allowPrerelease enabled, electron-updater may consider the current version as an "available" update via the atom feed. Added same-version guards in both the update-available and update-downloaded event handlers in src/main/updater.ts — if the reported version matches app.getVersion(), we emit not-available instead of showing the banner. Also preserved the userInitiated flag through the guard so user-initiated "Check for Updates" still shows the "You're on the latest version" toast.

With allowPrerelease enabled, electron-updater may consider the current
version as an "available" update, causing the update banner to reappear
in a loop after restarting. Guard both update-available and
update-downloaded handlers to skip when the reported version matches the
running app version. Also preserve the userInitiated flag through the
same-version guard so user-initiated checks still show the "latest
version" toast.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@AmethystLiang AmethystLiang merged commit 0417144 into main Mar 23, 2026
@AmethystLiang AmethystLiang deleted the AmethystLiang/update-banner-stuck branch March 23, 2026 18:23
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.

1 participant