Skip to content

feat(desktop): improve auto-updater with user notifications#243

Merged
Kitenite merged 2 commits intomainfrom
release-desktop-v0.0.3
Dec 2, 2025
Merged

feat(desktop): improve auto-updater with user notifications#243
Kitenite merged 2 commits intomainfrom
release-desktop-v0.0.3

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Dec 2, 2025

  • Add dialog prompt when update is downloaded with "Restart Now" / "Later" options
  • Add "Check for Updates..." menu item in app menu (macOS)
  • Remove legacy make:release script from package.json
  • Wire up main window reference for proper dialog display

🤖 Generated with Claude Code

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

Release Notes

  • New Features

    • Added "Check for Updates..." menu option for macOS users.
    • Enhanced update notifications with interactive dialogs prompting users to confirm restart when updates are available.
  • Chores

    • Removed unused build script from configuration.
    • Code cleanup and import consolidation.

✏️ Tip: You can customize this high-level summary in your review settings.

- Add dialog prompt when update is downloaded with "Restart Now" / "Later" options
- Add "Check for Updates..." menu item in app menu (macOS)
- Remove legacy make:release script from package.json
- Wire up main window reference for proper dialog display

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 2, 2025

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

Project Deployment Preview Comments Updated (UTC)
website Ready Ready Preview Comment Dec 2, 2025 7:23am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 2, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR establishes a macOS-focused interactive update flow by refactoring the auto-updater module to display user dialogs for update checks and installations, wires the main window into the auto-updater for UI rendering, adds a "Check for Updates" menu item, and removes the make:release script and redundant imports.

Changes

Cohort / File(s) Summary
Script Removal
apps/desktop/package.json
Removed make:release script that invoked the release.ts module.
Auto-Updater Enhancements
apps/desktop/src/main/lib/auto-updater.ts
Introduced macOS-specific interactive update flow with checkForUpdatesInteractive() for user dialogs; added checkForUpdates() with environment guards; new setMainWindow() to store BrowserWindow reference; configured autoUpdater startup with feed URL and event handlers; changed update-downloaded handling from silent to user dialog with restart confirmation.
Menu Integration
apps/desktop/src/main/lib/menu.ts
Added import for checkForUpdatesInteractive; injected "Check for Updates..." menu item into macOS About submenu.
Main Window Setup
apps/desktop/src/main/windows/main.ts
Added import for setMainWindow; called setMainWindow(window) after main window creation to wire it into auto-updater dialogs.
Import Cleanup
apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/WindowItem/index.tsx
Consolidated Input import source to @superset/ui/input and removed duplicate local import.

Sequence Diagram

sequenceDiagram
    actor User
    participant Menu as Menu
    participant AutoUpdater as Auto-Updater
    participant Dialog as System Dialog
    participant Electron as Electron Update

    User->>Menu: Clicks "Check for Updates..."
    Menu->>AutoUpdater: checkForUpdatesInteractive()
    AutoUpdater->>AutoUpdater: Platform/Dev Guard Check
    AutoUpdater->>Electron: Check for updates
    Electron-->>AutoUpdater: Update available or not
    alt Update Available
        AutoUpdater->>Dialog: Show update dialog
        Dialog-->>User: Update ready. Restart now?
        User->>Dialog: Confirm restart
        Dialog->>AutoUpdater: User confirmed
        AutoUpdater->>Electron: quitAndInstall()
    else No Update
        AutoUpdater->>Dialog: Show "No updates" dialog
        Dialog-->>User: You are up to date
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • apps/desktop/src/main/lib/auto-updater.ts: New dialog flow logic, event handler wiring, and window reference management require careful validation of macOS-specific behavior and update state handling.
  • apps/desktop/src/main/windows/main.ts: Verify setMainWindow() is called at the correct lifecycle point before menu creation.
  • apps/desktop/src/main/lib/menu.ts: Confirm checkForUpdatesInteractive is properly scoped to macOS and menu item structure is consistent.

Possibly related PRs

  • add auto update #203: Extends and replaces the earlier auto-update implementation; both PRs modify auto-updater.ts and desktop wiring integration points.
  • Fix desktop app notifications for Claude Code hooks #160: Both PRs modify main.ts to wire the main window reference into auto-updater functionality, suggesting coordinated window lifecycle changes.
  • open new window #59: Both PRs touch desktop app main window wiring and menu code, suggesting related changes to the app initialization and menu structure.

Poem

🐰 Updates now whisper through dialogs with care,
When users click menus, a window will dare
To ask "shall we install?" with macOS delight,
One tap quits and installs—seamless and right!
The rabbit's paws type, the desktop takes flight! 🚀

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release-desktop-v0.0.3

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ac3ec6 and 967633b.

📒 Files selected for processing (5)
  • apps/desktop/package.json (0 hunks)
  • apps/desktop/src/main/lib/auto-updater.ts (2 hunks)
  • apps/desktop/src/main/lib/menu.ts (2 hunks)
  • apps/desktop/src/main/windows/main.ts (2 hunks)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/Sidebar/TabsView/WindowItem/index.tsx (1 hunks)

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 and usage tips.

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