Repository navigation
feat(app): confirm before installing an update, with release notes - #60
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).
releases_fetchcommand 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.releases_fetchbefore any update check had run: reqwest is built without a TLS provider, so the command installs rustlsringwhen none exists.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.Merge with squash:
6586357anda6cc610fail svelte-check on their own (the card is rewired in a later commit).Known gaps, not filed:
ReleasesErrorCodeis exported but unused inclient.ts; a few other minor review notes.cargo fmt --check,cargo clippy -- -D warningsandcargo testpasspnpm turbo check test buildandpnpm version:checkpassCHANGELOG.mdupdated if behaviour changed