Skip to content

feat: in-app auto-update with notification badge #58

Description

@khaira777

Goal

Enable silent background downloads with an in-app notification badge across all platforms. Replace native OS dialogs with a subtle UI indicator. Enable Linux auto-update (currently disabled).

Design doc: in-app-updates-design.md

What Changes

Area Before After
Download trigger User clicks "Download" in native dialog Silent, automatic
Download progress Console only IPC → renderer badge shows %
Update ready Native dialog In-app badge with dropdown
Linux (AppImage) Skipped Works via electron-updater
Linux (deb/snap) Skipped Package manager (unchanged)
Store builds (MAS, MSIX) Skipped Still skipped
Dev mode Skipped Still skipped

Tasks

Task 1: Main process — silent download + Linux

File:

  • Enable autoUpdater.autoDownload = true
  • Remove download confirmation dialog (update-available handler)
  • Remove restart confirmation dialog (update-downloaded handler)
  • Add granular progress IPC channel (update-download-progress)
  • Enable Linux: remove if (process.platform === 'linux') return;
  • Linux non-AppImage: send linux-managed status, skip self-update
  • Enable auto-updater initialization on Linux (!isStoreBuild only)
  • Add restart-and-install IPC handler

Task 2: Preload — expose new IPC channels

File: main/preload.ts

  • Add restartAndInstall invoke handler
  • Add onUpdateProgress listener
  • Add onUpdateReady listener

Task 3: Frontend — notification badge component

File: frontend/

  • useUpdateStatus() hook — manages state from IPC events
  • <UpdateBadge /> component — shows in app header
    • Hidden when idle/up-to-date
    • "↓ {percent}%" pill when downloading
    • Pulsing dot when ready
    • Dropdown with version + "Restart Now" / "Later"
  • Location: POS topbar (visible to all users, not just settings)

Task 4: Cross-platform testing

Must verify ALL applicable platforms:

Platform Format Test
macOS DMG (x64) Silent download → badge → restart installs
macOS DMG (arm64) Same on Apple Silicon
macOS MAS Auto-update skipped (store status)
Windows NSIS (x64) Silent download → badge → restart installs
Windows MSIX Auto-update skipped (store status)
Linux AppImage Download → badge → restart
Linux deb "linux-managed" status, no errors
Linux snap Snap own update handles it
All Dev mode "dev-mode" status, no check
All No internet Check fails silently, no error UI

Edge cases:

  • Download interrupted → retry works
  • "Restart Now" disabled during download
  • No active orders check before restart (POS safety)

Acceptance Criteria

  • macOS + Windows: existing users get silent download on next launch
  • Linux AppImage: first-time auto-update works
  • Linux deb/snap: no noise, package manager handles updates
  • Store builds: still skipped (MAS, MSIX)
  • Badge is subtle, non-intrusive (24-32px)
  • No native OS dialogs shown to user
  • All platform tests pass

Out of Scope (future)

  • Deferral ("remind me later", skip version)
  • Restart safety check (no active orders)
  • Changelog panel / "what's new" modal
  • Delta updates, staged rollouts

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions