Add auto-update support with electron-updater#42
Conversation
0suu
commented
Mar 24, 2026
- Add electron-updater dependency and configure GitHub as publish provider
- Implement auto-update check/download/install flow in main process
- Expose autoUpdater API via preload bridge
- Add update notification UI (download progress bar, restart prompt)
- Add "Check for updates" button in Settings screen
- Add i18n translations (EN/JA) for update-related strings
- Add release workflow for Windows/macOS builds on tag push
- Clean up ci.yml by removing unused packaging steps and Linux target
- Add electron-updater dependency and configure GitHub as publish provider - Implement auto-update check/download/install flow in main process - Expose autoUpdater API via preload bridge - Add update notification UI (download progress bar, restart prompt) - Add "Check for updates" button in Settings screen - Add i18n translations (EN/JA) for update-related strings - Add release workflow for Windows/macOS builds on tag push - Clean up ci.yml by removing unused packaging steps and Linux target Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@codex review |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the application by introducing robust auto-update capabilities. By integrating Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces auto-update support using electron-updater, which is a great enhancement for the application. The implementation is comprehensive, covering the main process logic, preload script API exposure, and renderer UI for update notifications, download progress, and manual checks. The code is well-structured, particularly the event handling in both the main and renderer processes, which includes proper cleanup to prevent memory leaks. I've identified a couple of medium-severity issues: one concerning a deprecated transitive dependency and another related to an inconsistent method for checking the application environment, which could be improved for better robustness.
| setupAutoUpdater(win); | ||
|
|
||
| // Check for updates after a short delay (skip in dev — app is not packaged) | ||
| if (process.env.NODE_ENV !== "development") { |
There was a problem hiding this comment.
For consistency and improved robustness, it's better to use app.isPackaged to determine if the application is running in a packaged environment. You are already using this method in the updater-check IPC handler. The process.env.NODE_ENV check might not be reliable across all build configurations, whereas app.isPackaged is the canonical way to perform this check in Electron.
| if (process.env.NODE_ENV !== "development") { | |
| if (app.isPackaged) { |
| "node_modules/lodash.isequal": { | ||
| "version": "4.5.0", | ||
| "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", | ||
| "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", | ||
| "deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.", | ||
| "license": "MIT" | ||
| }, |
There was a problem hiding this comment.
The lodash.isequal package, which is a transitive dependency of electron-updater, is deprecated. The deprecation message suggests using require('node:util').isDeepStrictEqual instead. While this is an issue in a dependency and not your direct code, it's good to be aware of it. You might consider checking if a newer version of electron-updater resolves this or monitoring for a fix.
|
@codex review |
Replace process.env.NODE_ENV check with app.isPackaged to match the existing pattern in the updater-check IPC handler. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>