Auto relaunch in startup update - #113
Merged
Merged
Conversation
A failed relaunch after a successful download+install surfaced as 'Failed to check for updates'. Catch it separately and tell the user to reopen the app instead.
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.
Greptile Summary
This PR adds automatic relaunch behavior to the startup update check: when
autoUpdateis enabled and an update is found on launch, the app now downloads, installs, and immediately relaunches into the new binary rather than deferring to the next manual launch. The accompanying comment oncheckOnStartupis updated to reflect this.get().status === "ready", so non-release builds (wheredownloadInstallshort-circuits tostatus: "available") and failed downloads are safe.try/catchwith a user-friendly message distinct from the outer "Failed to check for updates" catch, addressing a concern from a previous review.Confidence Score: 5/5
Safe to merge — the change is narrowly scoped to the startup path and the relaunch is properly guarded and error-handled.
The relaunch is gated on get().status === 'ready', which prevents premature restarts on non-release builds or failed downloads. The relaunch error path produces a user-facing message distinct from the outer download/check error. No existing behavior outside checkOnStartup is affected.
Files Needing Attention: No files require special attention.
Important Files Changed
status === 'ready'and wrapped in its own try/catch with an accurate error message. The rest of the diff is cosmetic reformatting.Reviews (3): Last reviewed commit: "fix(updater): report relaunch failures a..." | Re-trigger Greptile