-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c068004
feat(ui): add update functionality to desktop app settings
e356416
docs: add implementation details for GUI update feature
8dc92ca
feat(desktop): implement auto-update functionality
d4e1091
feat(desktop): add auto-update check on launch and menubar indicator
439c0fd
feat: enhance auto-updater with auto-extraction and startup checks
04dac72
feat: add dynamic tray menu with update notifications
f77c725
fix: resolve TypeScript errors and formatting issues
90930a6
Replace exec with spawn for unzip and use fs.rename instead of mv
44fd2f9
chore: fix prettier formatting in githubUpdater.ts
54d6045
Update ui/desktop/src/utils/autoUpdater.ts
jackjackbits File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| const { createCanvas, loadImage } = require('canvas'); | ||
| const fs = require('fs'); | ||
| const path = require('path'); | ||
|
|
||
| async function generateUpdateIcon() { | ||
| // Load the original icon | ||
| const iconPath = path.join(__dirname, '../src/images/iconTemplate.png'); | ||
| const icon = await loadImage(iconPath); | ||
|
|
||
| // Create canvas | ||
| const canvas = createCanvas(22, 22); | ||
| const ctx = canvas.getContext('2d'); | ||
|
|
||
| // Draw the original icon | ||
| ctx.drawImage(icon, 0, 0); | ||
|
|
||
| // Add red dot in top-right corner | ||
| ctx.fillStyle = '#FF0000'; | ||
| ctx.beginPath(); | ||
| ctx.arc(18, 4, 3, 0, 2 * Math.PI); | ||
| ctx.fill(); | ||
|
|
||
| // Save the new icon | ||
| const outputPath = path.join(__dirname, '../src/images/iconTemplateUpdate.png'); | ||
| const buffer = canvas.toBuffer('image/png'); | ||
| fs.writeFileSync(outputPath, buffer); | ||
|
|
||
| console.log('Generated update icon at:', outputPath); | ||
|
|
||
| // Also generate @2x version | ||
| const canvas2x = createCanvas(44, 44); | ||
| const ctx2x = canvas2x.getContext('2d'); | ||
|
|
||
| // Load and draw @2x version | ||
| const icon2xPath = path.join(__dirname, '../src/images/[email protected]'); | ||
| const icon2x = await loadImage(icon2xPath); | ||
| ctx2x.drawImage(icon2x, 0, 0); | ||
|
|
||
| // Add red dot in top-right corner (scaled) | ||
| ctx2x.fillStyle = '#FF0000'; | ||
| ctx2x.beginPath(); | ||
| ctx2x.arc(36, 8, 6, 0, 2 * Math.PI); | ||
| ctx2x.fill(); | ||
|
|
||
| // Save the @2x version | ||
| const output2xPath = path.join(__dirname, '../src/images/[email protected]'); | ||
| const buffer2x = canvas2x.toBuffer('image/png'); | ||
| fs.writeFileSync(output2xPath, buffer2x); | ||
|
|
||
| console.log('Generated @2x update icon at:', output2xPath); | ||
| } | ||
|
|
||
| generateUpdateIcon().catch(console.error); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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
useLayoutEffecthere instead of depending on the timeout.