Skip to content

feat(app): update the desktop app in place from its install source - #71

Merged
dungngminh merged 2 commits into
mainfrom
feat/app-update-check
Oct 16, 2026
Merged

dungngminh merged 2 commits into
mainfrom
feat/app-update-check

Conversation

@dungngminh

@dungngminh dungngminh commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Description

In-app updates for the desktop app.

  • On launch the app checks GitHub for the newest published app-v* release (CLI v* tags, drafts and prereleases are skipped). When it is newer than the running version, a toast offers it; an arrow button next to the SimUtil title in the sidebar reopens the toast.
  • "Update & restart" updates in place through the channel the app was installed from:
    • Homebrew cask: brew upgrade --cask simutil-desktop, then relaunch.
    • DMG: download SimUtil-macos.dmg, copy the new bundle next to the old one while still running (a failure leaves the install untouched), then swap and relaunch after quitting.
    • Windows installer / winget: download the Inno Setup installer and run it with /VERYSILENT once the app has exited, then relaunch.
    • AppImage: replace $APPIMAGE and relaunch.
    • Debug builds and unknown installs fall back to opening the release page.
  • Downloads are verified against the release's checksums.txt.
  • The update toast shows live progress (download % / MB, verify, install, restart); a success toast shows after the restart (last-run version kept in ~/.simutil/desktop-version).
  • The running version is read from the bundle with package_info_plus, so app/pubspec.yaml (or --build-name) is the single source.
  • Bumps the app to 0.4.0. The app-v0.3.1 draft release was never published and has been deleted; its changelog entries are folded into 0.4.0.

Tested on macOS with a release build run as 0.2.0: Homebrew (0.2.0 → 0.3.0) and DMG (0.2.0 → 0.3.0) updates both installed and relaunched; the manual channel opens the release page. Windows and AppImage paths are not yet tried on real machines.

Type of Change

  • 🔥 New feature (non-breaking change which adds functionality)
  • ✨ Enhancement (non-breaking change which improves existing functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • 🧹 Code refactor
  • 📝 Documentation
  • 🗑️ Chore
  • 📦 Build configuration change
  • ✅ Test

Summary by CodeRabbit

  • New Features
    • Added in-app notifications for available desktop app updates, with version details and update progress.
    • Install updates and restart directly for supported installations, or download updates manually.
    • See a notice after the app has been updated.
  • Documentation
    • Updated the changelog and release checklist for version 0.4.0 and in-app updates.

Check GitHub for a newer app-v* release on launch and show a toast;
a button next to the SimUtil title reopens it. "Update & restart"
upgrades through Homebrew, swaps the bundle from the DMG, runs the
Windows installer silently, or replaces the AppImage, verifying
downloads against checksums.txt, then relaunches. Progress shows in
the toast and a success toast follows the restart. The running
version comes from the bundle via package_info_plus.
The app-v0.3.1 draft release was never published, so its changes ship
in 0.4.0.
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 20cf3654-be94-4fb4-960f-c3e6e15da152
📥 Commits

Reviewing files that changed from the base of the PR and between 4899e29 and ae6c482.

⛔ Files ignored due to path filters: 1
  • pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing: 16
  • app/CHANGELOG.md
  • app/lib/main.dart
  • app/lib/src/app.dart
  • app/lib/src/di.dart
  • app/lib/src/recording/saved_recordings.dart
  • app/lib/src/ui/design/toast.dart
  • app/lib/src/ui/devices/device_sidebar.dart
  • app/lib/src/ui/recording_toast.dart
  • app/lib/src/ui/toasts/update_toast.dart
  • app/lib/src/update/app_installer.dart
  • app/lib/src/update/app_update_cubit.dart
  • app/macos/Flutter/GeneratedPluginRegistrant.swift
  • app/pubspec.yaml
  • app/test/app_installer_test.dart
  • app/test/app_update_test.dart
  • docs/ai/deployment.md
+------------------------------------------------------+
| GPU fans at max RPM: ready to blow away regressions. |
+------------------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dungngminh
dungngminh merged commit 472e1f8 into main Oct 16, 2026
6 of 7 checks passed
@dungngminh
dungngminh deleted the feat/app-update-check branch October 16, 2026 17:16
@kilo-code-bot

kilo-code-bot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

No code review findings raised on this PR. The change adds in-app update checking and installation for the desktop app (GitHub release check, Homebrew/DMG/Windows installer/AppImage installers, checksum verification against checksums.txt, progress toast, restart). All new code paths handle errors defensively (try/catch, silent offline/rate-limited failure, fail-safe installs that leave the current install untouched, mounted checks), and the new unit tests cover channel detection, checksum parsing, release selection, and last-run version tracking.

Files Reviewed (17 files)
  • app/CHANGELOG.md
  • app/lib/main.dart
  • app/lib/src/app.dart
  • app/lib/src/di.dart
  • app/lib/src/recording/saved_recordings.dart
  • app/lib/src/ui/design/toast.dart
  • app/lib/src/ui/devices/device_sidebar.dart
  • app/lib/src/ui/recording_toast.dart
  • app/lib/src/ui/toasts/update_toast.dart
  • app/lib/src/update/app_installer.dart
  • app/lib/src/update/app_update_cubit.dart
  • app/macos/Flutter/GeneratedPluginRegistrant.swift
  • app/pubspec.yaml
  • app/test/app_installer_test.dart
  • app/test/app_update_test.dart
  • docs/ai/deployment.md
  • pubspec.lock

Reviewed by free · Input: 158.4K · Output: 21K · Cached: 576.7K

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant