Updater: always install the newest published version (re-check before applying; replace a stale pending update) #740

Closed
opened 2026-11-16 03:31:21 +00:00 by charles · 1 comment
Owner

Asked by Charles, 2026-11-16: "when downloading an update, sometimes there's an update right behind. Can we make it always download the latest instead?"

What happens. Nightlies are published often (several a day). The client checks every 2 hours (CHECK_INTERVAL in crates/fluxer-core/src/update.rs), finds version A, downloads it and offers "Restart to update". If version B is published before the user restarts (or while A is downloading), the client still installs A; after the restart it finds B at once and asks again.

Wanted. The update that gets installed is the newest one published at the moment of installing:

  • Just before applying (the user clicks the update button / restart, or the update is applied on quit), check the manifest again; if a newer version than the downloaded one exists, download that one and apply it instead (show the progress the button already shows; do not restart into the older one). If that check or download fails (offline), apply the one already downloaded rather than nothing.
  • While an update is downloaded and waiting, the periodic check keeps running; a newer version replaces the pending one (download it in the background, drop the older file so disk does not fill up).
  • A download in progress when a newer manifest is seen: finish or abort as is simplest, but never end with the older version pending when a newer one is known.
  • Never go backwards (a manifest older than the running or the pending version is ignored), keep the verification of every download, and keep manual "Check for updates" behaviour.
  • Both installers (AppImage swap on Linux, Velopack on Windows — check what Velopack itself does with a stale pending package).
**Asked by Charles, 2026-11-16:** "when downloading an update, sometimes there's an update right behind. Can we make it always download the latest instead?" **What happens.** Nightlies are published often (several a day). The client checks every 2 hours (`CHECK_INTERVAL` in `crates/fluxer-core/src/update.rs`), finds version A, downloads it and offers "Restart to update". If version B is published before the user restarts (or while A is downloading), the client still installs A; after the restart it finds B at once and asks again. **Wanted.** The update that gets installed is the newest one published at the moment of installing: - Just before applying (the user clicks the update button / restart, or the update is applied on quit), check the manifest again; if a newer version than the downloaded one exists, download that one and apply it instead (show the progress the button already shows; do not restart into the older one). If that check or download fails (offline), apply the one already downloaded rather than nothing. - While an update is downloaded and waiting, the periodic check keeps running; a newer version replaces the pending one (download it in the background, drop the older file so disk does not fill up). - A download in progress when a newer manifest is seen: finish or abort as is simplest, but never end with the older version pending when a newer one is known. - Never go backwards (a manifest older than the running or the pending version is ignored), keep the verification of every download, and keep manual "Check for updates" behaviour. - Both installers (AppImage swap on Linux, Velopack on Windows — check what Velopack itself does with a stale pending package).
Author
Owner

In nightly 2026.1116.345 (PR #744). Follow-ups: #754. Not yet run on a real Windows install.

In nightly 2026.1116.345 (PR #744). Follow-ups: #754. Not yet run on a real Windows install.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#740
No description provided.