Skip to content

feat(desktop): improve auto-updater UX and add global update indicator#394

Merged
wesbillman merged 1 commit intomainfrom
desktop-updater-ux
Apr 23, 2026
Merged

feat(desktop): improve auto-updater UX and add global update indicator#394
wesbillman merged 1 commit intomainfrom
desktop-updater-ux

Conversation

@wesbillman
Copy link
Copy Markdown
Collaborator

Summary

  • Restyled the Settings → Updates section to match the design system (semantic tokens, <Button>, <Badge> — no more hardcoded zinc/blue colors)
  • Extracted updater state machine into useUpdater hook + UpdaterProvider context (single instance shared between settings panel and top bar)
  • Added UpdateIndicator in the top nav bar: pulsing dot when update available, green dot when ready to restart — clicking opens Settings → Updates
  • Passive Sonner toast notification when an update is detected (deduped, no auto-open)
  • Dev build graceful fallback: when the updater plugin isn't loaded, silently stays in idle state instead of showing an error
  • Wrapped relaunch() to surface errors in UI instead of unhandled promise rejections

Files changed

File What
desktop/src/features/settings/hooks/use-updater.ts NEW — updater state machine hook
desktop/src/features/settings/hooks/UpdaterProvider.tsx NEW — React context for single updater instance
desktop/src/features/settings/UpdateIndicator.tsx NEW — top-bar update indicator component
desktop/src/features/settings/UpdateChecker.tsx Rewritten as pure presentational component
desktop/src/app/AppShell.tsx Wraps app with UpdaterProvider, adds UpdateIndicator

Notable design decisions

  • Single context instance — both the top-bar indicator and the settings panel share one useUpdater() via context. No split-brain, no duplicate API calls.
  • Passive notifications only — toast is informational with no action button. Settings only opens on explicit user interaction (clicking top-bar icon or navigating manually). No interrupting the user on app launch.
  • Dev-safe — catches plugin-not-found errors from Tauri and falls back to idle state, so dev builds without sprout_updater_enabled work cleanly.

Test plan

  • Build a release with updater enabled, verify toast appears when update is available
  • Verify top-bar Download icon appears with pulsing dot when update available
  • Verify top-bar RefreshCw icon appears with green dot after install completes
  • Click top-bar icon → Settings opens to Updates tab
  • Verify Settings → Updates section matches other settings sections visually
  • Dev build: confirm no error state on launch, idle state shows correctly
  • Click "Download & Install" → verify downloading/installing/ready states transition correctly
  • Error scenario: verify error message displays and Retry button works

🤖 Generated with Claude Code

- Restyle UpdateChecker settings section to match design system (semantic
  tokens, Button/Badge components, no hardcoded zinc/blue colors)
- Extract updater state machine into useUpdater hook with React context
  provider (single instance, no split-brain between settings and top bar)
- Add UpdateIndicator in top nav bar: pulsing dot when update available,
  green dot when ready to restart
- Fire deduped Sonner toast on update detection (passive, no auto-open)
- Gracefully handle dev builds where updater plugin isn't loaded
- Wrap relaunch() to surface errors in UI instead of unhandled rejections

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wesbillman wesbillman merged commit da0506f into main Apr 23, 2026
13 checks passed
@wesbillman wesbillman deleted the desktop-updater-ux branch April 23, 2026 21:13
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