Skip to content

Add update dialog and show app version in settings#8

Merged
Ghvstcode merged 1 commit intomainfrom
update-dialog-and-version
Mar 26, 2026
Merged

Add update dialog and show app version in settings#8
Ghvstcode merged 1 commit intomainfrom
update-dialog-and-version

Conversation

@Ghvstcode
Copy link
Copy Markdown
Owner

Summary

  • Replace the easy-to-miss toast notification for app updates with a persistent modal dialog (with "Later" / "Install & Restart" buttons and a spinner during install)
  • Show the current app version (e.g. "SUSTN v0.3.0") at the bottom of the Account section in Settings

Changes

  • UpdateDialog.tsx — new modal component using shadcn dialog
  • useUpdater.ts — refactored to return state (showUpdateDialog, updateVersion, handleInstall, handleDismiss) instead of firing a toast
  • App.tsx — renders <UpdateDialog> from hook state
  • useAppVersion.ts — new hook wrapping Tauri's getVersion() API
  • AccountSection.tsx — displays app version with section label

Test plan

  • Run in dev mode, verify version number appears in Settings > Account
  • Temporarily set _debugUpdateDialog = true in App.tsx to visually test the update dialog
  • Verify "Later" dismisses the dialog and "Install & Restart" shows the spinner state
  • Create a production build and confirm the updater checks GitHub releases endpoint

Replace the ephemeral toast notification for available updates with a
persistent modal dialog that is harder to miss. The dialog shows the
new version, offers "Later" and "Install & Restart" buttons, and
displays a spinner during the download/install phase.

Also display the current app version (e.g. "SUSTN v0.3.0") at the
bottom of the Account section in Settings, using Tauri's getVersion()
API.

- Add UpdateDialog component using shadcn dialog primitive
- Refactor useUpdateChecker to return state instead of firing a toast
- Wire UpdateDialog into App.tsx
- Add useAppVersion hook (wraps @tauri-apps/api/app getVersion)
- Add version display to AccountSection with section label
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sustn Ready Ready Preview, Comment Mar 26, 2026 6:23am

@Ghvstcode Ghvstcode merged commit 4009f66 into main Mar 26, 2026
3 checks passed
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