Tell the user when a newer release exists (check-for-updates)#9
Merged
Merged
Conversation
There was no way to know an arrow update shipped: no in-app hint, no CLI flag. Add a lightweight check-for-updates — it reports a newer release and points at it, but never downloads or installs (arrow is unsigned, so a silent in-app updater would fight Gatekeeper; that stays deferred). - Lib (src/update.rs): check_update(current) -> UpdateStatus, an opt-in, secondary network layer kept out of the parser hot path. Shells out to curl (no new HTTP dependency), time-boxed, and degrades to an honest error instead of panicking. Strict semver-ish comparison so a weird tag never spuriously claims an update. - CLI: arrow --check-update [--json] prints current vs latest and, when newer, the release URL + the installer one-liner. - Tauri: check_update() (off-thread) and open_url() (https-only) commands. - UI: the VersionBadge checks once on mount and, when newer, shows a green dot + 'Update available -> vX.Y.Z' with an 'Open release' button. In the browser dev build it stays silent (no app to update). - Docs: README/CLAUDE/ROADMAP updated; the 'no auto-update' note now reflects the check, with the signed auto-updater still on the roadmap. - Tests: version ordering, v-prefix normalization, honest failure status.
2ce855f to
70c8cec
Compare
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.
Today there is no way to learn that an arrow update shipped: no in-app hint and no CLI flag. This adds a lightweight check-for-updates that reports a newer release and points at it — it never downloads or installs anything (arrow is unsigned, so a silent in-app updater would fight Gatekeeper; the signed auto-updater stays deferred).
src/update.rs):check_update(current) → UpdateStatus, an opt-in, secondary network layer kept out of the parser hot path (build_report/file_contentnever call it). Shells out tocurl(no new HTTP dependency), time-boxed (--max-time), and degrades to an honesterrorinstead of panicking. Strict semver-ish comparison, so a weird/non-numeric tag never spuriously claims an update.arrow --check-update [--json]— prints current vs latest and, when newer, the release URL + the installer one-liner.check_update()(runs off the UI thread viaspawn_blocking) andopen_url()(https-only) commands.VersionBadgechecks once on mount and, when a newer release exists, shows a green dot + "Update available → vX.Y.Z" with an "Open release" button. In the browser dev build it stays silent.tauri-plugin-updater+ a Homebrew Cask still on the roadmap.Honesty
It only ever says "update available" when a
latestwas fetched, parsed, and is strictly newer; any failure (offline, rate-limited, no release) is silent in the UI / an explicit message in the CLI. It never claims to auto-install.Testing
v-prefix normalization, honest failure status.arrow --check-updateagainst this repo printsarrow is up to date (v0.1.6);--jsonreturns{current, latest, updateAvailable, url, error}.cargo test(24) +cargo clippyclean on both crates, frontend builds.Branches off
main, independent of the worktree-clean PR.