fix: restart to install update, and three update-flow bugs - #3167
Merged
Conversation
|
setchy
approved these changes
Aug 8, 2026
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
The "Restart to install update" button and the post-download Restart dialog button both did nothing. Root cause turned out to be in
electron-menubar, fixed there and released as v10.2.0. Three smaller update-flow bugs found along the way are fixed here.Why restart-to-update was a silent no-op
Applying an update never goes through
app.quit(). Electron'sautoUpdater.quitAndInstall()does this:before-quitis emitted after the windows close, not before.electron-menubar'shideOnCloseonly let a close through oncebefore-quithad fired, so it vetoed the close, the window list never emptied,OnWindowAllClosednever fired, and the install stalled with no error and no log.macOS only in practice: on Windows and Linux,
electron-updater'sBaseUpdater.quitAndInstallcallsapp.quit()itself, which emitsbefore-quitfirst. Long-standing, not a regression from the v10 migration, the pre-#2880 hand-rolledclosehandler had the sameisQuittinggate.Fixed in electron-menubar (gitify-app/electron-menubar#139) by binding its
before-quithandler toautoUpdater'sbefore-quit-for-updateas well. No Gitify code change needed, just the bump.Also fixed here
errorhandler calledresetState(), which cleared the interval.resetState()is now UI-only and leaves the schedule running. Dropped the write-onlyperiodicIntervalfield.UpdateInfo.releaseNameisstring | null).event.version.menubar.refreshContextMenu(), a new v10.2.0 API. No-op on macOS and Windows.Testing
Every fix has a test that was verified to fail against the unfixed code and pass after, by reverting only the source and re-running:
expected undefined to be type of 'function'(electron-menubar suite)erroreventundefinedin dialog"Gitify undefined has been downloaded"refreshContextMenunever called1317 tests across 166 files pass,
tsc --noEmitclean,vp checkclean. Visual regression tests are Linux-only by design and were not run locally; CI covers them.