Automatic updates in production#602
Conversation
Styles should be considered unfinished. Come back over this, fatcat!
There was a problem hiding this comment.
Pull request overview
This PR implements automatic update functionality for production builds of the Horizon application. It introduces electron-updater integration, a new changelog management system with individual release note files, and UI improvements for displaying and managing updates.
Changes:
- Adds electron-updater integration with auto-download and update-on-quit behavior for supported platforms (Windows, macOS, and Linux AppImages)
- Implements a changelog tool system with individual release notes in
docs/releases/and automatic CHANGELOG.md generation - Updates build scripts and CI workflow to include auto-update artifacts (latest.yml, blockmaps) and pull release notes for GitHub releases
Reviewed changes
Copilot reviewed 46 out of 47 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/changelog-tools.mjs | New Node.js script for splitting/building changelog from individual release files |
| package.json | Adds npm scripts for changelog management |
| electron/release-scripts/*.{ps1,sh} | Updates build scripts to copy auto-update artifacts |
| electron/pnpm-lock.yaml & electron/package.json | Adds electron-updater dependency and GitHub publish configuration |
| electron/main.ts | Implements auto-updater logic, update checking, and download/install workflows |
| electron/common.ts | Adds settings fields for hiding auto-updater and skipping versions |
| electron/changelog.ts & electron/Changelog.vue | Updates changelog UI to support update actions (download, skip, install) |
| electron/browser_windows.ts | Adds updateMode parameter to changelog window |
| electron/Window.vue & electron/Settings.vue | UI updates for update notifications and settings |
| docs/releases/*.md | Individual release note files for version history |
| bump_version.sh | Updates version bump script to regenerate changelog from release notes |
| .github/workflows/build.yml | Updates CI to use release notes for GitHub release bodies |
| chat/locales/en_us.json | Adds localization strings for update UI |
Files not reviewed (1)
- electron/pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… (I hate when I change var names)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 47 out of 48 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- electron/pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const updateCheckFirstDelay = 10_000; // 10 seconds | ||
| const updateCheckInterval = 60 * 60 * 1000; // 1 hour in milliseconds |
There was a problem hiding this comment.
The update check interval is defined as a constant but could be made configurable via settings, allowing users to customize how frequently the app checks for updates.
| echo -e "${YELLOW}Warning: Failed to regenerate $CHANGELOG_FILE.${NC}" | ||
| exit 1 | ||
| fi | ||
| else | ||
| echo -e "${YELLOW}Warning: node is not installed; cannot regenerate $CHANGELOG_FILE.${NC}" |
There was a problem hiding this comment.
The script exits with status 1 if changelog regeneration fails, but the error message says 'Warning'. This should either be changed to 'Error' or use a non-zero exit code only after user confirmation to proceed.
| echo -e "${YELLOW}Warning: Failed to regenerate $CHANGELOG_FILE.${NC}" | |
| exit 1 | |
| fi | |
| else | |
| echo -e "${YELLOW}Warning: node is not installed; cannot regenerate $CHANGELOG_FILE.${NC}" | |
| echo -e "${YELLOW}Error: Failed to regenerate $CHANGELOG_FILE.${NC}" | |
| exit 1 | |
| fi | |
| else | |
| echo -e "${YELLOW}Error: node is not installed; cannot regenerate $CHANGELOG_FILE.${NC}" |
…or showing the update dialog
Also fixes the discord and kofi links openning in an external browser, and adds localization to stuff that didn't have it.
1b0d69a to
99671e3
Compare
Hello, maintainers of this project! Come haz a look at my cool new PR.
Anyways, joking aside. This PR is a big one, apologies in advance, @FatCatClient .
Changes
docs/releases. Ascripts/changelog-tools.mjstool also provides tools for regeneratingdocs/releasesstuff orchangelog.mdas needed.@FatCatClient is requested to review this. I've also pulled copilot in to help catch stuff we don't. On that note, I'd like to start using copilot more to catch small mistakes we might make and not catch, I think that's a fair use of AI to save us all some time? :emu_shrug:
k thx bye ♥