Skip to content

Auto relaunch in startup update - #113

Merged
macnev2013 merged 3 commits into
macnev2013:mainfrom
iamnoksio:fix/auto-updater
Jul 25, 2026
Merged

Auto relaunch in startup update#113
macnev2013 merged 3 commits into
macnev2013:mainfrom
iamnoksio:fix/auto-updater

Conversation

@iamnoksio

@iamnoksio iamnoksio commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds automatic relaunch behavior to the startup update check: when autoUpdate is 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 on checkOnStartup is updated to reflect this.

  • The relaunch is correctly gated behind get().status === "ready", so non-release builds (where downloadInstall short-circuits to status: "available") and failed downloads are safe.
  • The relaunch error is handled in its own try/catch with a user-friendly message distinct from the outer "Failed to check for updates" catch, addressing a concern from a previous review.
  • Formatting-only changes (brace style, line wrapping) make up the rest of the diff.

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

Filename Overview
src/stores/updater-store.ts Adds auto-relaunch after silent startup install; relaunch is correctly gated on 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

Comment thread src/stores/updater-store.ts
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.
@macnev2013
macnev2013 merged commit 2a7df89 into macnev2013:main Jul 25, 2026
8 checks passed
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.

2 participants