Skip to content

fix(updates): check every minute and keep the found version on offer; release v0.5.3 - #125

Merged
FabioHAraujo merged 2 commits into
mainfrom
fix/realtime-update-checks
Nov 13, 2026
Merged

FabioHAraujo merged 2 commits into
mainfrom
fix/realtime-update-checks

Conversation

@FabioHAraujo

Copy link
Copy Markdown
Contributor

Problem and resulting behavior

New releases took up to 10 minutes to reach an open LowNotes (Zynko, by comparison, checks every minute). Two bugs made it worse:

  • check() had no timeout. A request that hung after sleep or a network change kept busy set, so no later check ran until the app restarted.
  • Every native check returns an Update resource held on the Rust side until close(); discarded ones were never closed.

Now:

  • Checks run at startup, every 60 s, and when the window gains focus or becomes visible again (from the tray, another desktop), at most once per 15 s.
  • Native checks time out after 30 s (CHECK_TIMEOUT_MS); the background download after 15 min. The dialog's own download keeps no limit. The Rust-side external check already had a 15 s timeout.
  • Updates that are not kept (same version again, skipped version, superseded or withdrawn) are closed with discardUpdate.
  • After the dialog closes, the found version stays on offer in the title bar: Restart to update once downloaded, Update available otherwise. It opens the dialog again. A skipped version is not offered, and a newer release replaces the pending one as soon as it is published. Automatic checks wait while the dialog is open.
  • New strings titlebar.updateAvailable / titlebar.updateReady in all three locales. README and CHANGELOG updated.

Validation

  • bun run version:check, bun run check, bun run check:e2e, bun test (120 pass), Python script tests: OK.
  • bun run build and bun run test:e2e (47 pass), including the new title bar test: after Later, the title bar offers Restart to update, which reopens the dialog; the check carries the 30 s timeout.
  • New unit tests for the check timeout and for closing discarded updates.
  • No Rust changes, so the cargo checks were not rerun locally (CI runs them).
  • Checked the title bar button in light and dark themes in the e2e harness (screenshots not attached).

Additional context

The manifest is github.com/.../releases/latest/download/latest.json: the redirect is no-cache and the asset URL is per version, so a new release is visible on the next check. One check is three small requests (two redirects and a ~3 KB JSON). These are release downloads, not REST API calls, so the 60/hour unauthenticated API limit does not apply.

Installed copies keep their current cadence until they update to a release with this change.

A new release took up to 10 minutes to show up, and a check that hung
(after sleep or a network change) had no timeout, so every later check
waited on it until the app restarted. Each native check also left its
Update resource open on the Rust side.

The checker now runs every minute, like Zynko, and again when the window
gains focus or becomes visible (at most once per 15 seconds). Native checks
time out after 30 seconds and the background download after 15 minutes;
updates that are not kept are closed. After its dialog closes, the found
version stays on offer in the title bar (Restart to update / Update
available) unless skipped, and a newer release replaces it. Automatic
checks wait while the dialog is open.
@FabioHAraujo
FabioHAraujo force-pushed the fix/realtime-update-checks branch from c4094c7 to 34f3ebd Compare November 13, 2026 13:23
@FabioHAraujo FabioHAraujo changed the title fix(updates): check every minute and keep the found version on offer fix(updates): check every minute and keep the found version on offer; release v0.5.3 Nov 13, 2026
@FabioHAraujo
FabioHAraujo merged commit 050f1af into main Nov 13, 2026
8 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