You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P0/bug] installUpdate calls relaunch() unconditionally — no confirmation, no 'later' option #344
On any machine where downloadAndInstall succeeds but the user has unsaved work (the dialog is open, an editor tab is dirty, a long-running query is in flight), relaunch() immediately kills the process. The StatusBar.tsx code paths that prevent relaunch in the "available" state (lines 165-178) check isExecuting and hasDirtyTabs BEFORE the install starts — but they don't prevent the install from starting in the first place if the user navigates the dialog and clicks Install. Once installUpdate is called, the relaunch is unconditional. The order is also fragile: set({ updateStatus: "downloaded" }) then await relaunch() — the relaunch will throw if it can't kill the process (e.g., user denies OS-level permission), and the catch path sets updateStatus: "error" — but the OS has already started the install. The user is now in an inconsistent state where the install may have started but the UI says "error".
Files
src/stores/settingsStore.ts:178-198
Expected
Clicking the update chip downloads the update, then a confirmation dialog appears; clicking Restart Now relaunches; clicking Restart Later preserves the install and prompts on next launch.
Proposed fix
Scope M — (a) re-check isExecuting and hasDirtyTabs at the moment of relaunch(); (b) ask for a confirmation dialog before triggering relaunch: "Update downloaded. Restart SQLPilot now to apply?" with Cancel and "Restart Now" buttons; (c) add a "Restart Later" option that defers the relaunch to app exit.
Acceptance
Clicking the update chip downloads the update, then a confirmation dialog appears; clicking Restart Now relaunches; clicking Restart Later preserves the install and prompts on next launch.
Activity
fix(update): separate downloading from restarting, and put the refusa…