Skip to content

feat: Tauri auto-updater + pnpm update-all + UX polish#30

Merged
7xuanlu merged 9 commits intomainfrom
feature/auto-updater
Apr 28, 2026
Merged

feat: Tauri auto-updater + pnpm update-all + UX polish#30
7xuanlu merged 9 commits intomainfrom
feature/auto-updater

Conversation

@7xuanlu
Copy link
Copy Markdown
Owner

@7xuanlu 7xuanlu commented Apr 28, 2026

Summary

Wires up the Tauri auto-updater plugin so end users get an in-app prompt when a new release lands, plus a developer convenience script.

Tauri auto-updater (Phase 5 of the auto-update plan)

  • Adds @tauri-apps/plugin-updater@^2.0.0 and tauri-plugin-updater = "2"
  • Configures plugins.updater in tauri.conf.json (GitHub releases manifest URL + minisign pubkey)
  • Registers the plugin in the Tauri builder chain (app/src/lib.rs)
  • New app/src/updater.rs: on startup (after a 3s window-paint delay), checks for updates; if found and not dismissed in the last 24h, shows a dialog with "Install" / "Later". On Install: downloads (with progress notifications), then second notification + 800ms pause + app.restart(). On Later: persists {version, dismissed_at} so we don't re-nag for the same version within 24h
  • .github/workflows/release.yml gets TAURI_SIGNING_PRIVATE_KEY + TAURI_SIGNING_PRIVATE_KEY_PASSWORD env vars on the tauri-action step (secrets configured in repo)

Developer convenience

  • pnpm update-all script: pulls every Origin repo, upgrades brew origin-mcp, rebuilds .app, replaces /Applications/Origin.app. ERR trap to restore backup if cp fails. Prints daemon-restart hint if :7878 is in use

Pre-merge gate (IMPORTANT)

The signed update flow has not been exercised end-to-end yet. Per adversarial review:

Cut a v0.1.5-beta.1 first, install manually, bump to v0.1.5-beta.2, confirm the signed update flow works before promoting to stable.

After merge:

  1. Cut v0.1.5-beta.1 tag → wait for CI → curl .../latest.json | jq . → confirm signature field populated
  2. Install the beta DMG manually → confirm app runs
  3. Bump to v0.1.5-beta.2 → confirm beta.1 → beta.2 update flow

Test plan

  • cargo check -p origin clean
  • cargo fmt clean
  • Manual: cut beta release per gate above before promoting stable

🤖 Generated with Claude Code

7xuanlu and others added 9 commits April 26, 2026 19:23
Per code review: trap restores /Applications/Origin.app from backup if
cp fails after mv. Drop `|| echo` that swallowed brew failures. Print
restart hint if daemon detected on :7878.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two issues caught in code review:
- Without delay, dialog could appear before the main window paints,
  leaving "what app is this?" UX confusion. 3s sleep at the start of
  check_and_prompt covers the typical app-ready event window.
- Without persistence, "Later" suppressed only the current run.
  Persist {version, dismissed_at} to app_data_dir/updater-dismissed.json
  and skip re-prompts for the same version within 24h.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@7xuanlu 7xuanlu merged commit d898d6b into main Apr 28, 2026
1 check failed
@7xuanlu 7xuanlu deleted the feature/auto-updater branch April 28, 2026 02:58
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.

1 participant