feat(desktop): add manual "Check for Updates" button in web settings#1123
feat(desktop): add manual "Check for Updates" button in web settings#1123AriajSarkar wants to merge 20 commits intopingdotgg:mainfrom
Conversation
Add checkForUpdate IPC channel so the web renderer can trigger an update check on demand. Surface a Check for Updates button in Settings > About (desktop only) with contextual labels and error handling. - Add DesktopUpdateCheckResult type and DesktopBridge.checkForUpdate() - Wire UPDATE_CHECK_CHANNEL in preload and main process IPC handler - Add canCheckForUpdate/getCheckForUpdateButtonLabel logic helpers - Add DesktopUpdateCheckSection component in settings About section - Guard IPC handler when updater is not configured (local/dev builds) - Add 15 unit tests for new logic functions Closes pingdotgg#1107
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…check # Conflicts: # apps/web/src/routes/_chat.settings.tsx
…check # Conflicts: # apps/desktop/src/main.ts # apps/web/src/routes/_chat.settings.tsx
2bd1d03 to
4e5586b
Compare
…rmation - Replace generic rocket icon with a downward arrow (`ArrowDownToLineIcon`) in the sidebar for better visual clarity. - Update sidebar icon colors to use a green/blue semantic palette instead of warning colors, and fix CSS class collisions that caused the icon to incorrectly render as white. - Add a confirmation dialog before triggering `installUpdate()` in both the sidebar and settings panel to warn users that the app will restart and tasks will be interrupted. Addresses UX feedback in pingdotgg#1204
…ion/status maps for button label with tooltip from getDesktopUpdateButtonTooltip
… instead of misleading 'Update available'
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| return { | ||
| checked: true, | ||
| state: updateState, | ||
| } satisfies DesktopUpdateCheckResult; |
There was a problem hiding this comment.
IPC handler reports checked: true when check was skipped
Low Severity
The UPDATE_CHECK_CHANNEL handler always returns { checked: true } after awaiting checkForUpdates("web-ui"), but checkForUpdates can silently return without performing any check — for example, when updateCheckInFlight is already true (race with auto-poll) or isQuitting is true. The client relies on checked being false to display an error, so a skipped check produces no user feedback at all.




What Changed
checkForUpdateIPC channel (DesktopUpdateCheckResulttype,DesktopBridge.checkForUpdate())UPDATE_CHECK_CHANNELin preload + main process handler (reuses existingcheckForUpdates()canCheckForUpdate/getCheckForUpdateButtonLabelpure logic helpersWhy
The desktop app checks for updates automatically and has a native menu "Check for Updates…", but there's no way to trigger a check from the web UI. Users may not discover the menu item. This adds a simple, focused entry point in Settings → About.
Closes #1107 (already closed)
UI Changes
Checklist
Local Test:
v0.0.10->v0.0.11Note
Add manual "Check for Updates" button to desktop web settings
desktop:update-checkIPC channel in main.ts andcheckForUpdate()onwindow.desktopBridgevia preload.ts.canCheckForUpdatehelper in desktopUpdate.logic.ts and fixes the default tooltip for non-actionable states to read "Up to date" instead of "Update available".Macroscope summarized b216503.
Note
Medium Risk
Adds a new IPC surface and UI flow that can trigger desktop update checks/download/install, touching Electron auto-updater state handling. Risk is moderate due to potential edge cases in update state transitions and differing behavior when the updater is not configured (dev/local builds).
Overview
Adds a manual “Check for Updates” control to the web Settings page for Electron builds, with a single button that adapts to the current update state (check/download/install), shows last-checked timestamp, and surfaces check/download/install errors.
Introduces a new
desktop:update-checkIPC handler andDesktopBridge.checkForUpdate()/DesktopUpdateCheckResultcontract, guarded to returnchecked: falsewhen the updater isn’t configured. Also adjusts desktop update UI behavior (sidebar icon/style + install confirmation prompt) and adds update helper logic (canCheckForUpdate, tooltip default) with new unit tests, plus a small React Query wrapper for caching update state.Written by Cursor Bugbot for commit b216503. This will update automatically on new commits. Configure here.