Repository navigation
feat: MenuBar "Check for Updates…" + download progress UI - #247
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: MenuBar "Check for Updates…" + download progress UI
Discoverability + UX polish for the update flow. Two related
improvements:
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.
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:
src/components/layout/MenuBar.tsx
from "Keyboard Shortcuts" by a separator).
src/components/layout/AppLayout.tsx
useSettingsStore.getState().checkForUpdates(). Same path as
the status bar chip.
src/components/layout/StatusBar.tsx
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
progress callback. For Started events, captures contentLength as
total. For Progress events, accumulates chunkLength into
transferred. On error, resets downloadProgress.
Tests added:
menu-action id.
unknown.
multiple Progress events.
Out of scope (issue #244, separate work):
rpm -Uon alayered atomic OS. That requires detecting OSTree and routing to
rpm-ostree update(or surfacing "manual update required").rpm-ostree installfrom the GitHub release page.