Skip to content

In-app updates from GitHub releases (asked once, weekly, never mid-flash) - #1

Merged
traviswye merged 2 commits into
mainfrom
updater
Oct 9, 2026
Merged

traviswye merged 2 commits into
mainfrom
updater

Conversation

@traviswye

Copy link
Copy Markdown
Collaborator

In-app updates for the first public release, with the same contract as Create Companion 1.0.

  • Asking first. The Hub asks once: "Check for updates automatically, once a week?" Nothing is checked before a yes. The answer lives in <data>/shell/updates.json; Settings › About changes it.
  • Check, download, install (electron-updater in electron/updater.js, reached through the preload). It reads the latest published release's latest*.yml, so drafts stay invisible until they're published. Installing happens only on a click.
  • Never mid-flash. /api/update-safe is false while a keyboard or module flash runs. The shell asks before and after the download, then stops the backend before the installer starts.
  • Copies that can't replace themselves (the portable exe, a .deb install, a dev run) get a download link instead.
  • Release: a GitHub publish target makes electron-builder write the update files. The Mac rows add a .zip (the updater needs it), and the release job merges the two Mac update files (scripts/merge-mac-update-info.mjs).
  • Tests: openflow-updater-e2e installs an old signed build on Windows, macOS and Linux and has it update itself to 9.9.9 from localhost. tests/e2e/updates.spec.js covers the page states with a stubbed shell.

Draft until the e2e run is green on all three platforms.

…, never mid-flash

electron-updater in the shell (electron/updater.js) with the same contract as
Create Companion: the Hub asks once whether to check weekly; nothing is checked
before a yes; an update downloads and installs only on a click, in Settings ›
About or on the Hub. A check fetches the latest published release's latest.yml;
drafts are invisible, so a build reaches installed copies only when published.

Installing quits the app and so the backend. The new /api/update-safe answers
false while a keyboard or module flash runs, and the shell asks it before and
after the download, then stops the backend before the installer starts (on
Windows the installer runs while the app closes and must not find the
backend's files in use). The portable exe, a .deb install and a dev run cannot
replace themselves and get a link to the release instead.

Release: a GitHub publish target makes electron-builder write latest*.yml; the
Mac rows build a zip beside the dmg (the updater needs it) and the release job
merges the two Mac update files. openflow-updater-e2e installs an old signed
build on Windows, macOS and Linux runners and has it update itself to 9.9.9
from localhost.
@traviswye
traviswye marked this pull request as ready for review October 9, 2026 20:54
@traviswye
traviswye merged commit 532f5cc into main Oct 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant