Skip to content

feat: MenuBar "Check for Updates…" + download progress UI - #247

Merged
EVWorth merged 1 commit into
mainfrom
feat/menubar-check-update-progress
Jul 22, 2026
Merged

EVWorth merged 1 commit into
mainfrom
feat/menubar-check-update-progress

Conversation

@EVWorth

@EVWorth EVWorth commented Jul 22, 2026

Copy link
Copy Markdown
Owner

feat: MenuBar "Check for Updates…" + download progress UI

Discoverability + UX polish for the update flow. Two related
improvements:

  1. MenuBar entry — the only path to manually trigger an update
    check was the small version chip in the status bar, easy to
    miss. Adds a "Check for Updates…" item to the Help menu (above
    "Keyboard Shortcuts") that dispatches the existing
    "check-for-updates" menu-action, which AppLayout now routes to
    useSettingsStore.checkForUpdates(). Same code path the chip uses.

  2. Download progress UI — the status bar chip showed a generic
    "Downloading update..." spinner regardless of asset size.
    With chore: bump version to 0.4.0 #240 wiring the updater, also wired
    downloadAndInstall's onProgress callback. Added a
    downloadProgress field ({ transferred, total }) on
    settingsStore. The chip now shows:

    • percentage (e.g. "48%") once total is known
    • transferred bytes (e.g. "5.0 MB") if total unknown
    • nothing if no events have arrived yet

src/components/layout/MenuBar.tsx

  • Add "Check for Updates…" as first item in Help menu (separated
    from "Keyboard Shortcuts" by a separator).

src/components/layout/AppLayout.tsx

  • Import useSettingsStore.
  • Add case "check-for-updates" in the menu-action handler: calls
    useSettingsStore.getState().checkForUpdates(). Same path as
    the status bar chip.

src/components/layout/StatusBar.tsx

  • Read downloadProgress from store.
  • Add formatBytes helper (B / KB / MB / GB).
  • The downloading state now renders the percentage or transferred
    bytes next to the spinner. Tooltip shows raw bytes ("5.0 MB /
    102 MB" or "5.0 MB") so the actual numbers stay accessible.

src/stores/settingsStore.ts

  • Add DownloadProgress interface + downloadProgress field.
  • installUpdate resets downloadProgress at start, then feeds the
    progress callback. For Started events, captures contentLength as
    total. For Progress events, accumulates chunkLength into
    transferred. On error, resets downloadProgress.

Tests added:

  • MenuBar: "Check for Updates…" entry exists, dispatches the right
    menu-action id.
  • AppLayout: "check-for-updates" action triggers checkForUpdates.
  • StatusBar: percentage shown when total known, byte count when
    unknown.
  • settingsStore: downloadProgress accumulates across Started +
    multiple Progress events.

Out of scope (issue #244, separate work):

  • The Bazzite / rpm-ostree case where Tauri runs rpm -U on a
    layered atomic OS. That requires detecting OSTree and routing to
    rpm-ostree update (or surfacing "manual update required").
  • 0.4.0 Bazzite path remains: AppImage + Gear Lever, or manual
    rpm-ostree install from the GitHub release page.

Discoverability + UX polish for the update flow. Two related
improvements:

1. MenuBar entry — the only path to manually trigger an update
   check was the small version chip in the status bar, easy to
   miss. Adds a "Check for Updates…" item to the Help menu (above
   "Keyboard Shortcuts") that dispatches the existing
   "check-for-updates" menu-action, which AppLayout now routes to
   useSettingsStore.checkForUpdates(). Same code path the chip uses.

2. Download progress UI — the status bar chip showed a generic
   "Downloading update..." spinner regardless of asset size.
   With #240 wiring the updater, also wired
   downloadAndInstall's onProgress callback. Added a
   downloadProgress field ({ transferred, total }) on
   settingsStore. The chip now shows:
     - percentage (e.g. "48%") once total is known
     - transferred bytes (e.g. "5.0 MB") if total unknown
     - nothing if no events have arrived yet

src/components/layout/MenuBar.tsx
- Add "Check for Updates…" as first item in Help menu (separated
  from "Keyboard Shortcuts" by a separator).

src/components/layout/AppLayout.tsx
- Import useSettingsStore.
- Add case "check-for-updates" in the menu-action handler: calls
  useSettingsStore.getState().checkForUpdates(). Same path as
  the status bar chip.

src/components/layout/StatusBar.tsx
- Read downloadProgress from store.
- Add formatBytes helper (B / KB / MB / GB).
- The downloading state now renders the percentage or transferred
  bytes next to the spinner. Tooltip shows raw bytes ("5.0 MB /
  102 MB" or "5.0 MB") so the actual numbers stay accessible.

src/stores/settingsStore.ts
- Add DownloadProgress interface + downloadProgress field.
- installUpdate resets downloadProgress at start, then feeds the
  progress callback. For Started events, captures contentLength as
  total. For Progress events, accumulates chunkLength into
  transferred. On error, resets downloadProgress.

Tests added:
- MenuBar: "Check for Updates…" entry exists, dispatches the right
  menu-action id.
- AppLayout: "check-for-updates" action triggers checkForUpdates.
- StatusBar: percentage shown when total known, byte count when
  unknown.
- settingsStore: downloadProgress accumulates across Started +
  multiple Progress events.

Out of scope (issue #244, separate work):
- The Bazzite / rpm-ostree case where Tauri runs `rpm -U` on a
  layered atomic OS. That requires detecting OSTree and routing to
  `rpm-ostree update` (or surfacing "manual update required").
- 0.4.0 Bazzite path remains: AppImage + Gear Lever, or manual
  `rpm-ostree install` from the GitHub release page.
@EVWorth
EVWorth merged commit e6580f7 into main Jul 22, 2026
10 checks passed
@EVWorth
EVWorth deleted the feat/menubar-check-update-progress branch July 22, 2026 01:03
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