-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat(desktop): Add auto-update functionality to Goose desktop app #2852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- add UpdateSection component with check for updates and install functionality - add IPC handlers for executing update scripts and restarting the app - integrate update section into AppSettingsSection - support checking github releases for latest version - display progress during download and installation - prompt user to restart after successful update
- Add electron-updater for handling desktop app updates - Create autoUpdater module with GitHub release integration - Update UpdateSection component with real update checking - Add IPC handlers for update operations - Configure GitHub publisher in forge config - Fix version display and error handling
- Check for updates automatically 5 seconds after app launch - Add red dot indicator to menubar icon when updates are available - Create iconTemplateUpdate.png with red dot overlay - Update tray icon dynamically based on update availability - Pass tray reference to auto-updater for icon management
- Add automatic update checking on app startup (5s delay) - Implement auto-extraction of downloaded ZIP files - Add GitHub API fallback for update checking - Store and display update state in settings - Show visual indicator in menu bar when updates available - Bump version to 1.0.27 - Remove temporary documentation files
- Add 'Update Available...' menu item when updates are ready - Dynamically update tray menu based on update status - Clean up console.log statements - Fix missing await statements in window creation - Add navigation to update settings from tray menu
- Fix implicit any types in autoUpdater.ts - Remove unused MenuItem import - Convert require statements to proper imports - Fix ESLint and formatting issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be 1.0.27
|
.bundle |
|
|
For the security of the IPCs, instead of using exec for the unzip, can you use spawn() instead? Same with the mv call, you should use built in FS rename or similar to move the file/dir instead of calling out to exec again |
baxen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Worked in local testing with that one addition. Will also test this out with the next release.
will merge after the shell handling improvements @mrand-block
- Replaced exec() with spawn() for the unzip command for better IPC security - Replaced shell mv command with built-in fs.rename() for file operations - Removed unused execAsync and promisify imports Addresses security concerns raised by @mrand-block in PR block#2852
|
Thanks for the security feedback @mrand-block! I've addressed both concerns:
The code now uses more secure IPC methods and avoids shell command injection vulnerabilities. All tests pass (lint and typecheck). |
|
Update: Fixed prettier formatting issues. All checks now pass:
The security improvements requested by @mrand-block have been implemented and the code is ready for review. |
Co-authored-by: Bradley Axen <[email protected]>
| // Get current version on mount | ||
| const currentVersion = window.electron.getVersion(); | ||
| setUpdateInfo((prev) => ({ ...prev, currentVersion })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to guarantee window.electron is not undefined in this useEffect
|
Thank you for contributing this auto-update PR! Being able to easily stay up-to-date is so important <3 |
|
.bundle |
|
| useEffect(() => { | ||
| if (scrollToSection === 'update' && updateSectionRef.current) { | ||
| // Use a timeout to ensure the DOM is ready | ||
| setTimeout(() => { | ||
| updateSectionRef.current?.scrollIntoView({ behavior: 'smooth', block: 'center' }); | ||
| }, 100); | ||
| } | ||
| }, [scrollToSection]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required, but consider using useLayoutEffect here instead of depending on the timeout.
| useEffect(() => { | |
| if (scrollToSection === 'update' && updateSectionRef.current) { | |
| // Use a timeout to ensure the DOM is ready | |
| setTimeout(() => { | |
| updateSectionRef.current?.scrollIntoView({ behavior: 'smooth', block: 'center' }); | |
| }, 100); | |
| } | |
| }, [scrollToSection]); | |
| useLayoutEffect(() => { | |
| if (scrollToSection === 'update' && updateSectionRef.current) { | |
| updateSectionRef.current.scrollIntoView({ behavior: 'smooth', block: 'center' }); | |
| } | |
| }, [scrollToSection]); |
|
Ship it |
|
Awesome! Auto-update functionality is a great feature! 👏 👏 👏 🚢 |
|
Looks great! Would love to see a short demo vid of it in action or testing steps if we want to verify it locally. |
* main: (26 commits) docs: update Snowflake link and description verbiage (#2882) Fixed typos and wording for endpoint info for ollama (#2861) Docs: Unlist blog post called What's in my goosehints file (#2891) Docs: Fix Nav Bar and wrong command in docs (#2889) fix the claude model name (#2890) disable temporal by default (#2886) feat(desktop): Add auto-update functionality to Goose desktop app (#2852) docs: add goose web command (#2856) Docs: Schedule recipes with the CLI (#2881) Docs: Fix readme (#2880) fix: CPU hogging GUI (#2877) feat/fix: don't stop cli starting if MCPs don't load (#2860) fix invalid context length for claude models (#2872) dynamic port selection for temporal (#2865) Docs: Session Export via CLI (#2867) Docs: Adding Snowflake as a Provider (#2868) [goose-llm] update example to add toolResult status error (#2854) fix: cap the repeat time when display usage (#2864) Docs: Goose now respects gitignore files (#2858) docs: add CLI token usage (#2857) ...
* upstream/main: fix: Revert downgrade to version number (block#2894) Goose recipes have settings now (block#2397) docs: update Snowflake link and description verbiage (block#2882) Fixed typos and wording for endpoint info for ollama (block#2861) Docs: Unlist blog post called What's in my goosehints file (block#2891) Docs: Fix Nav Bar and wrong command in docs (block#2889) fix the claude model name (block#2890) disable temporal by default (block#2886) feat(desktop): Add auto-update functionality to Goose desktop app (block#2852) docs: add goose web command (block#2856) Docs: Schedule recipes with the CLI (block#2881)
|
This is so needed! |
…ock#2852) Co-authored-by: jack <[email protected]> Co-authored-by: Bradley Axen <[email protected]> Signed-off-by: Soroosh <[email protected]>
…ock#2852) Co-authored-by: jack <[email protected]> Co-authored-by: Bradley Axen <[email protected]>
This PR adds comprehensive auto-update functionality to the Goose desktop application, enabling users to easily stay up-to-date with the latest releases.
Features Added:
Technical Changes:
electron-updaterfor native update supportTesting:
What this PR adds:
Files changed: