[Feat|Local] Auto-update and stable release channel - #1773
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary
electron-updater: off by default,Settings › Generalgets a "Check for updates automatically" switch and a "Check now" row; download starts only after a check the user enabled or clicked, install always waits for "Restart to update"stableupdate channel (stable-*.yml); the legacy 0.0.x desktop readslatest-*.yml, which no release produces anymore, so it can never update into the new app and no release needs pinningdmg+zip; the updater installs from the zip. Differential download is off, GitHub's CDN rejects the multi-range requests it needsdesktop-release.yml(legacy desktop) deleted;release-local.ymlnow triggers onv*and is the only desktop release workflow;docker-build.ymlbuilds hosted images fromv0.*tags only*.zip,*.deb,*.blockmap,*.ymlso aworkflow_dispatchrun can be checked for the channel filesTest plan
pnpm typecheckandpnpm testinsurfsense_local/electron;pnpm testinsurfsense_local/frontendworkflow_dispatchonDesktop Release,publish: never, all targets; artifacts containstable-mac.yml,stable.yml,stable-linux.yml, a mac.zip, and nolatest-*.ymlstable-*.yml+ installer locally, confirm "Check now" downloads it and "Restart to update" installs it (mac, Windows, AppImage)latest-mac.yml: startup check logs "update check skipped", no dialogHigh-level PR Summary
This PR implements opt-in auto-update functionality for the desktop app using
electron-updaterwith a newstablerelease channel. Updates are off by default and can be enabled via a new switch in Settings › General, with a "Check now" button available regardless of the setting. When an update is downloaded, a banner appears offering the user to restart and install. The release workflow is consolidated from two separate workflows into a singlerelease-local.ymlthat triggers onv*tags and publishes to thestablechannel (viastable-*.ymlfiles), ensuring the legacy 0.0.x desktop (which readslatest-*.yml) can never auto-update into the new app. Mac builds now produce bothdmgandzipformats, with the updater installing from the zip. Differential downloads are disabled due to GitHub CDN limitations.⏱️ Estimated Review Time: 30-90 minutes
💡 Review Order Suggestion
surfsense_local/electron/src/main/updater.test.mtssurfsense_local/electron/src/main/updater.mtssurfsense_local/electron/electron-builder.ymlsurfsense_local/electron/package.jsonsurfsense_local/electron/src/main/index.tssurfsense_local/electron/src/preload/index.tssurfsense_local/frontend/src/lib/api.tssurfsense_local/frontend/src/features/updates/update-settings.test.tsxsurfsense_local/frontend/src/features/updates/update-settings.tsxsurfsense_local/frontend/src/features/settings/settings-dialog.tsxsurfsense_local/frontend/src/app/app-bootstrap.tsx.github/workflows/release-local.yml.github/workflows/docker-build.yml.github/workflows/desktop-release.ymlsurfsense_local/electron/pnpm-lock.yaml