Skip to content

feat(desktop): restore Tauri auto-updater support#393

Merged
wesbillman merged 2 commits intomainfrom
feat/desktop-updater
Apr 23, 2026
Merged

feat(desktop): restore Tauri auto-updater support#393
wesbillman merged 2 commits intomainfrom
feat/desktop-updater

Conversation

@wesbillman
Copy link
Copy Markdown
Collaborator

Summary

  • Restores all client-side Tauri auto-updater scaffolding that was removed in Remove release pipeline from public repo #360 ("Remove release pipeline from public repo")
  • Adds tauri-plugin-updater dependency (Rust + npm), build.rs env var detection, conditional plugin registration, updater capabilities, and config skeleton
  • Restores the UpdateChecker frontend component and wires it into Settings as a new "Updates" section
  • The updater is double-gated: compile-time cfg(sprout_updater_enabled) requires SPROUT_UPDATER_PUBLIC_KEY + SPROUT_UPDATER_ENDPOINT env vars, and runtime debug_assertions check prevents activation in dev builds

Not included (handled by external release pipeline): build-release-config.mjs, publish-updater-to-github-release.mjs, publish-dmg-to-github-release.mjs, set-version-from-tag.mjs, CI workflow YAML.

Test plan

  • Verify cargo check passes in desktop/src-tauri (requires sidecar binaries to be present)
  • Verify pnpm typecheck and pnpm check pass in desktop/
  • Verify local dev build launches without updater (no env vars set → sprout_updater_enabled not set → updater skipped)
  • Verify release build with SPROUT_UPDATER_PUBLIC_KEY and SPROUT_UPDATER_ENDPOINT set activates the updater plugin
  • Verify "Updates" section appears in Settings and "Check for Updates" button works against the release endpoint

🤖 Generated with Claude Code

wesbillman and others added 2 commits April 23, 2026 11:32
The updater was removed in #360 ("Remove release pipeline from public
repo") as collateral when the CI workflows were moved. This restores
all client-side updater scaffolding:

- Add tauri-plugin-updater dependency (Rust + npm)
- Restore build.rs env var detection (SPROUT_UPDATER_PUBLIC_KEY,
  SPROUT_UPDATER_ENDPOINT) and cfg(sprout_updater_enabled) flag
- Restore conditional plugin registration in lib.rs (release builds
  only, double-gated on compile-time cfg + debug_assertions)
- Add plugins.updater config skeleton to tauri.conf.json
- Add updater capability permissions
- Restore UpdateChecker frontend component and wire it into Settings

The updater endpoint and public key are injected at release build time
by the external release pipeline. Local dev builds are unaffected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ities

- Store the Update handle in a ref and reuse it for download instead of
  calling check() twice (fixes resource leak and TOCTOU issue)
- Close previous Update resource before re-checking
- Remove redundant updater:default capability (allow-check and
  allow-download-and-install are sufficient)
- Remove unused progress tracking field

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wesbillman wesbillman merged commit c1a33e3 into main Apr 23, 2026
13 checks passed
@wesbillman wesbillman deleted the feat/desktop-updater branch April 23, 2026 18:55
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