Skip to content

feat(app): confirm before installing an update, with release notes - #60

Merged
arifintahu merged 7 commits into
mainfrom
feat/update-confirm-release-notes
Nov 23, 2026
Merged

arifintahu merged 7 commits into
mainfrom
feat/update-confirm-release-notes

Conversation

@arifintahu

Copy link
Copy Markdown
Member

What and why

"Check for updates" used to download, install and restart in one go. It now stops at an update card; installing needs a second click (Install X and restart).

  • The card shows the notes for every release between the installed version and the new one. A new releases_fetch command reads them from the GitHub releases API (anonymous, 8 s timeout, stable releases only). If that fails, the card shows the newest release's notes and a link to all releases.
  • The card warns that installing restarts EmberTerm and stops programs running in N tabs (tabs, splits and folders come back).
  • Failed installs and failed restarts are told apart. After a failed restart the card says the update is installed and only offers a restart, without a second download. Failures also show a toast, for when Settings is closed.
  • The check has a 30 s timeout. Focus moves to the card title when it appears.
  • Fixes a panic ("No provider set") in releases_fetch before any update check had run: reqwest is built without a TLS provider, so the command installs rustls ring when none exists.
  • The About text now describes the app for Windows and macOS.

How you checked it

  • cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test: clean, 149 passed.
  • pnpm turbo check test build, pnpm version:check: clean, Vitest 442 passed.
  • Bug fixes (crypto provider, failed restart, toast, timeout, focus) each have a test that failed first.
  • Live in the dev app against a local fake update feed: the card, the in-between notes, the busy-tabs warning, the sticky Install footer and a failed install with retry all behaved as designed. A fresh-context review of the whole branch found no critical issues; its 5 important findings are fixed in the last commit.
  • Not seen live: a successful install and restart, the plugin's real download progress events, and the "notes unavailable" fallback (covered by unit tests only).
  • Size: main bundle +12,956 B raw (+4,499 B gzip), release exe +91,648 B.

Merge with squash: 6586357 and a6cc610 fail svelte-check on their own (the card is rewired in a later commit).

Known gaps, not filed: ReleasesErrorCode is exported but unused in client.ts; a few other minor review notes.

  • cargo fmt --check, cargo clippy -- -D warnings and cargo test pass
  • pnpm turbo check test build and pnpm version:check pass
  • Bug fixes have a test that failed before the fix
  • No secrets, personal paths or machine names in the diff
  • Docs and CHANGELOG.md updated if behaviour changed

releases_fetch returns the stable releases (newest first, at most 30) for the in-between notes of an update. reqwest is a direct dependency with the features the updater already enables, so no second TLS stack is built.
Version parsing and ordering, the releases between the installed and the new version, notes trimmed to Highlights, Changes and Fixes, and the date format for the card.
Used by the update card to say how many tabs the restart would stop.
The updater is now a state machine: a check stops at an available card and nothing downloads, installs or restarts until install() is called. Notes for the releases in between load after the card shows, late answers are ignored, and the state lives in a store so closing Settings does not lose a download.
A props-only view for every update state, an accordion of release notes (newest open), and a sanitized notes renderer that drops images and only follows http(s) links.
Settings > About now shows an update card with the notes of every release since the installed one, a warning about running programs, and installs only on Install. The state lives in a store, About text is current, and a live check in the real app fixed an off-screen Install button and a missing full stop.
…update failures

- A restart that fails after a successful install is its own error: the card says
  the update is installed and offers only a restart, with no second download.
- releases_fetch installs the rustls provider when none exists yet, so it no longer
  panics before the first update check.
- A failed install or restart also shows a toast, for when Settings is closed.
- The update check gets a 30 s timeout so a stalled request cannot disable the button.
- Focus moves to the card title when an update appears, so screen readers announce it.
@arifintahu arifintahu added the enhancement New feature or request label Nov 23, 2026
@arifintahu
arifintahu merged commit 1768c6c into main Nov 23, 2026
@arifintahu
arifintahu deleted the feat/update-confirm-release-notes branch November 23, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant