mirror of
https://github.com/stablyai/orca.git
synced 2026-09-23 08:02:31 +00:00
Two issues caused "Restart to Update" to not apply the update on macOS: 1. Premature window destruction: quitAndInstall() destroyed all windows before calling autoUpdater.quitAndInstall(). On macOS, MacUpdater delegates to Squirrel.Mac which may not be ready yet — it registers a listener and returns. With zero windows, the dock "activate" handler would re-open the old version, making it appear the update failed. Fix: remove close listeners (so windows don't block quit) but don't destroy them. Let Squirrel.Mac handle the actual quit. 2. Premature "ready to install" status: electron-updater fires its 'update-downloaded' event after downloading the ZIP from GitHub, but BEFORE Squirrel.Mac finishes downloading from the localhost proxy. The UI showed "ready to install" when the update wasn't actually installable yet. Fix: on macOS, defer the 'downloaded' status until Electron's native autoUpdater confirms Squirrel has the update. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>