Skip to content

Comments

Automatic updates in production#602

Open
CodingWithAnxiety wants to merge 11 commits intodevelopmentfrom
feat/automatic-updates
Open

Automatic updates in production#602
CodingWithAnxiety wants to merge 11 commits intodevelopmentfrom
feat/automatic-updates

Conversation

@CodingWithAnxiety
Copy link
Member

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

  • Adds update checks when the build is prod, with a settings toggle and beta channel setup. (Haven't tested beta stuff, sowwy.)
  • Shows update availability thru the UI, with a changelog. Also allows you to update from this dialogue. So you know, it's a little more.
  • Release notes are handled differently and now each release gets a doc under docs/releases. PRs should write their changelog updates to this.
    • the bump_version.sh script should automatically generate changelog.md from the release notes in docs/releases. A scripts/changelog-tools.mjs tool also provides tools for regenerating docs/releases stuff or changelog.md as needed.
  • CI will pull from the release notes for that tag, now, and attach it to the draft release.

@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 ♥

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +255 to +256
const updateCheckFirstDelay = 10_000; // 10 seconds
const updateCheckInterval = 60 * 60 * 1000; // 1 hour in milliseconds
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +136 to +140
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}"
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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}"

Copilot uses AI. Check for mistakes.
@FatCatClient FatCatClient added this to the 1.37.0 milestone Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants