Skip to content

fix #13: fix update restart overlapping save-canvas dialog#89

Open
blueberrycongee wants to merge 1 commit intomainfrom
fix/issue-13-update-save-dialog-overlap
Open

fix #13: fix update restart overlapping save-canvas dialog#89
blueberrycongee wants to merge 1 commit intomainfrom
fix/issue-13-update-save-dialog-overlap

Conversation

@blueberrycongee
Copy link
Owner

Summary

  • Properly sequence the update restart flow: dismiss update panel → save canvas → quit → install → relaunch
  • Fix app not relaunching after save + update install

Changes

  • UpdateModal.tsx: Dismiss the update modal before sending the updater:install IPC, preventing UI overlap
  • auto-updater.ts: Replace direct quitAndInstall() calls with window.close() to go through the normal save-canvas flow first. A updateRestartRequested flag tells the before-quit handler to relaunch after installing.
  • mac-updater.ts: registerAutoInstallOnQuit now accepts a shouldRelaunch callback so the install script knows whether to reopen the app (user-initiated restart) or silently install (normal quit)

Root cause

The updater:install handler called quitAndInstall() directly, which:

  1. Spawned the install script immediately
  2. Called app.quit(), which triggered the window's close handler, which showed the save dialog — overlapping with the still-visible update modal
  3. The before-quit auto-install handler fired a second install script with relaunch=false, racing with the first one and preventing relaunch

Test plan

  • Click Restart on update notification — save dialog appears cleanly without overlap
  • After saving, app quits, installs update, and relaunches
  • Normal quit (not update) with pending update: installs silently without relaunch
  • Cancel save dialog after clicking Restart: app stays open, no install triggered

Instead of calling quitAndInstall() directly when the user clicks
"Restart" (which fires app.quit() before the save dialog runs, causing
UI overlap and preventing relaunch), the updater:install handler now:

1. Dismisses the update modal first
2. Triggers window.close() to go through the normal save-canvas flow
3. Sets a flag so the before-quit handler runs the install script
   with relaunch=true (mac) or calls quitAndInstall (win/linux)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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