Skip to content

Conversation

@jorben
Copy link
Collaborator

@jorben jorben commented Feb 12, 2026

Summary

  • Implement in-app auto-update using electron-updater, enabling automatic version detection, background download, and restart-to-install workflow
  • Add UpdateChecker component in the About page with full status UI (checking, downloading with progress bar, ready to install, error with retry)
  • Configure electron-builder publish to GitHub Releases and update CI workflow to upload latest*.yml and *.blockmap files

Changes

New files

File Description
src/shared/types/UpdateStatus.ts UpdateStatus enum and UpdateStatusData interface
src/main/services/UpdateService.ts Singleton service wrapping electron-updater with lazy init
src/main/ipc/handlers/updater.handler.ts IPC handlers with dev-mode guard
src/renderer/components/UpdateChecker.tsx React component for update status UI

Modified files

  • package.json — Add electron-updater dep, publish config, macOS zip target
  • src/shared/ipc/channels.ts — Add UPDATER channels and UPDATER_STATUS event
  • src/main/ipc/handlers/index.ts — Register updater handlers
  • src/main/index.ts — Fire-and-forget update check on startup (packaged only)
  • src/preload/index.ts — Expose updater API and onUpdaterStatus event
  • src/preload/electron.d.ts / src/renderer/electron.d.ts — Type declarations
  • src/renderer/components/About.tsx — Embed UpdateChecker component
  • 6 i18n files — Add update.* translation keys (en, zh, ja, ru, fa, ar)
  • .github/workflows/release.yml — Upload *.yml and *.blockmap release assets
  • Test files — Add electron-updater and WindowManager mocks

Test plan

  • npm run build — TypeScript compilation passes
  • npm run test — All 947 tests pass (unit + renderer)
  • npm run dev — Verify UpdateChecker renders in Settings > About, "Check for Updates" button visible
  • npm run build:win — Verify release/ contains latest.yml and .blockmap files
  • Packaged app — Verify startup auto-update check runs without blocking UI

🤖 Generated with Claude Code

jorben and others added 2 commits February 13, 2026 00:33
Implement automatic version detection and update capability using
electron-updater, so users no longer need to manually download
new versions from GitHub Releases.

Key changes:
- Add UpdateService singleton with lazy initialization (dev-safe)
- Add IPC handlers for checkForUpdates and quitAndInstall
- Add UpdateChecker React component in About page
- Add updater status event bridge (main -> renderer)
- Configure electron-builder publish to GitHub Releases
- Add macOS zip target for auto-update support
- Upload latest*.yml and *.blockmap in CI release workflow
- Add i18n keys for all 6 supported languages
- Add electron-updater mocks in handler and About tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously, `latest.yml` / `latest-mac.yml` / `latest-linux.yml` were
uploaded during the prereleased build phase, which could cause stable
users to auto-update to pre-release versions via electron-updater.

Now, manifests are saved as workflow artifacts during prereleased builds
and only uploaded to the GitHub Release when promoted to stable
(released event). Uses `gh run download` for reliable cross-run
artifact retrieval.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jorben jorben merged commit 10d9bcf into master Feb 12, 2026
2 checks passed
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