Skip to content

feat: auto-update on new releases - #225

Closed
0xbrayo wants to merge 10 commits into
ActivityWatch:masterfrom
0xbrayo:updater
Closed

feat: auto-update on new releases#225
0xbrayo wants to merge 10 commits into
ActivityWatch:masterfrom
0xbrayo:updater

Conversation

@0xbrayo

@0xbrayo 0xbrayo commented May 26, 2026

Copy link
Copy Markdown
Member

No description provided.

0xbrayo added 10 commits July 29, 2026 00:33
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.
@TimeToBuildBob

Copy link
Copy Markdown
Contributor

Reviewed the diff. Here are the testing artifacts I spotted that should be dropped before this goes to review:

1. .envrc (whole file) — references your local key path (~/.tauri/aw-tauri.key). This is a personal dev convenience file. Should be in .gitignore, not committed.

2. Version downgrade 0.1.00.0.1 — appears in package.json, src-tauri/Cargo.toml, src-tauri/Cargo.lock, and src-tauri/tauri.conf.json. Clearly done to trigger an update check during local testing. Needs to be reverted back to 0.1.0.

3. tauri.conf.json updater endpoint and pubkey — currently pointing at your personal fork:

"endpoints": ["https://github.com/0xbrayo/activitywatch/releases/latest/download/latest.json"]

And the pubkey is your personal testing keypair. Both need to be replaced with the official AW values (which is the step still gated on @ErikBjare's greenlight in the issue thread).

Everything else looks intentional — the workflow signing secret additions, createUpdaterArtifacts: true, the new updater_ui.rs and update-progress.html, capabilities/permissions, and the tauri-plugin-updater dep.

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

I've opened #235 which picks up the implementation from this PR. The changes on top:

  • Removed createUpdaterArtifacts from the baseline config (CI adds it dynamically via a conditional step so unsigned builds don't fail)
  • Added the same conditional step to release.yml; includeUpdaterJson is now conditional too
  • Fixed endpoint to ActivityWatch/activitywatch (was pointing at the fork)
  • Cleared test pubkey ("") — Erik will generate the real keypair after merge
  • Added .envrc to .gitignore

Happy to close this draft and iterate on #235, or vice versa — whatever works best for you @0xbrayo.

ErikBjare pushed a commit that referenced this pull request Jul 31, 2026
…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>
@0xbrayo 0xbrayo closed this Aug 4, 2026
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.

2 participants