feat: auto-update on new releases - #225
Conversation
Add an [updates] section to the user config (enabled by default). When an update is found, automatically download, install, and restart when enabled; otherwise fall back to the existing confirm dialog. Progress is logged in 10% buckets and a desktop notification is shown while updating. Also adds the updater:default capability required for handle.updater().
When a module exits due to a malformed config (detected via stderr), stop trying to restart it and show an error dialog instead, since restarting won't fix a bad config file.
Bump version to 0.0.1 and point the updater endpoint at the activitywatch fork's releases so a locally-built copy can detect and install updates published from that fork's CI. Also add a local .envrc for signing env vars and remove an accidentally-committed aw-notify binary.
Add updater_ui.rs: a custom-protocol-served progress window (aw-update://) so IPC works during download (data: URLs break Origin checks). Wire it into the update-check flow in lib.rs with config-driven auto_download, a restart_app/close_update_progress command pair, and an AW_DISABLE_AUTO_UPDATE env var escape hatch mirroring gptme's pattern. Add the update-progress capability window and scoped permissions file, new assets/update-progress.html, and the tokio/log deps the progress window and env-gating need.
|
Reviewed the diff. Here are the testing artifacts I spotted that should be dropped before this goes to review: 1. 2. Version downgrade 3. And the Everything else looks intentional — the workflow signing secret additions, |
|
I've opened #235 which picks up the implementation from this PR. The changes on top:
Happy to close this draft and iterate on #235, or vice versa — whatever works best for you @0xbrayo. |
…235) * feat: configure tauri updater with GitHub Releases * fix(ci): pass signing key to build workflow for updater artifacts * feat(updater): add config-driven auto-update with notification Add an [updates] section to the user config (enabled by default). When an update is found, automatically download, install, and restart when enabled; otherwise fall back to the existing confirm dialog. Progress is logged in 10% buckets and a desktop notification is shown while updating. Also adds the updater:default capability required for handle.updater(). * feat(updater): add update progress window and env-var opt-out Add updater_ui.rs: a custom-protocol-served progress window (aw-update://) so IPC works during download (data: URLs break Origin checks). Wire it into the update-check flow in lib.rs with config-driven auto_download, a restart_app/close_update_progress command pair, and an AW_DISABLE_AUTO_UPDATE env var escape hatch mirroring gptme's pattern. Add the update-progress capability window and scoped permissions file, new assets/update-progress.html, and the tokio/log deps the progress window and env-gating need. * fix(updater): clean up testing artifacts and harden CI gating - Remove createUpdaterArtifacts from baseline config; CI adds it dynamically only when TAURI_SIGNING_PRIVATE_KEY is set (fail-open until Erik provisions the signing keypair) - Add conditional 'Configure updater artifacts' step to release.yml, matching build.yml; also make includeUpdaterJson conditional - Clear test pubkey (empty string placeholder until official key generated) - Fix updater endpoint from 0xbrayo fork to ActivityWatch/activitywatch - Add .envrc to .gitignore (local signing key helper, not for repo) * fix(updater): address review findings --------- Co-authored-by: Brayo <vukubrian@gmail.com>
No description provided.