Skip to content

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

Closed

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

Activity

  1. added
    enhancement
    help wanted
    on Jul 7, 2026
  2. added theissue type on Jul 7, 2026
  3. itsbkm commented on Jul 30, 2026

    @itsbkm
    Contributor

    Implemented in 7e95959, per the linked design doc and your answers on scope: all 3 phases (main process silent-download + Linux AppImage enable, preload IPC, and the frontend badge), skipping the active-orders restart check (the doc doesn't call for it), pushed directly to main.

    Summary:

    • autoDownload is now true; both native OS dialogs (download confirm, restart confirm) are gone
    • Linux: AppImage builds now get real self-update via electron-updater; deb/rpm/snap report a 'linux-managed' status instead of a blanket 'unsupported'
    • New in StatusBar.tsx (the one piece of chrome rendered on every dashboard page, POS included) — hidden except while downloading (progress pill) or ready to install (pulsing dot + Restart Now dropdown)
    • Settings' Software Updates panel lost its now-redundant manual Download button and had its Linux copy corrected (it previously claimed AppImage wasn't supported, which is no longer true)
    • Extracted a shared useUpdateStatus() hook so the badge and Settings page read one source of truth, and fixed a stale shared UpdateStatus type that didn't match what's actually sent over IPC

    Verified via tsc, eslint, and the translation integrity test (all clean), plus a real end-to-end pass: rebuilt the frontend, ran it against the actual dev backend, and drove every status (downloading/ready/linux-managed/etc.) through the real component tree with window.electronAPI mocked — confirmed the badge, progress bar, dropdown, and restart button all work, and the settings page has no regressions.

    Not verified, and flagged per our earlier conversation: real signed/notarized platform builds and actual update installs on macOS/Windows/Linux — that needs real signing secrets and a version tag, which you said you'd test before the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementhelp wanted

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions