Repository navigation
feat(updates): install any of the newest 5 versions per component - #481
Conversation
…alls check_updates now returns the newest 5 release tags per component alongside latest, reusing the gh-first lookup with a public-API fallback. check_and_install_cli, try_gh_download, ensure_gateway_binary and install_desktop_update gain an optional tag: the cli and gateway download releases/download/<tag>/<asset> (checksums from the same tag), the desktop updater points at that release's latest.json with the allowDowngrades comparator so an older version can be installed. The one-click flow and dev builds behave as before.
The Updates tab renders each component's version with a dropdown of its 5 newest release tags (installed one marked, nothing on dev builds or unknown releases) and an Upgrade or Downgrade button per pick, comparing semver. installUpdate installs exactly the picked component: the CLI reinstall restarts only the daemon while the gateway keeps serving, the gateway reinstall rides the stop-first supervisor flow, the desktop row pins the updater to that release. The one-click Install updates flow is untouched.
…utor recent_tags blocks on a gh subprocess and HTTP, so desktop_update_info now fetches it through spawn_blocking like the CLI and gateway lookups.
|
@infer /model ollama_cloud/glm-5.3 can you review this PR? is it ready for merge? use /ponytail:ponytail /ponytail:ponytail-review /rust /rust-concurrency /clean-architecture /clean-code /domain-driven-design |
|
Model: Todos
Pull Request✅ Infer Result: SuccessAll checks pass. Let me mark the todos complete and deliver the review - this is a review-only run, so no code is changed and nothing is committed or pushed. What this change does: The Updates tab now lists the 5 newest release tags of each component (CLI, Gateway, Desktop) and lets you install any of them from a dropdown with an Upgrade or Downgrade button, instead of only ever moving to the newest release. The CLI and gateway binaries download from the picked tag's What I verified beyond reading the diff: all repo checks pass on this branch - Must fix
Should fix
Nice to have
Verdict: fix 1 first. Not ready to merge as-is - finding 1 is a one-line fix, but as shipped it gives every user with up-to-date binaries (most of them) a permanent false update banner. Findings 2 and 3 are small enough to take in the same PR; 4-6 are optional polish. Lean: -1 line (finding 4). Not checked: the e2e suite (macOS-only, this is a Linux runner) and an actual end-to-end pinned install (it would download ~30 MB binaries and replace local state on the runner); Windows behavior was read from code, not run. Model: Tokens: 2,388,594 in · 43,212 out · 2,431,806 total (25 requests) Tool calls: 49 total · 100% success rate TracesStatsTriggered by edenreich · Infer Action · OSS |
|
@infer can you apply the must-fix from the review? |
|
Model: Todos
Pull Request✅ Infer Result: SuccessDone. The must-fix from the review is applied and pushed to PR #481. What was wrongIn What I changed (commit 7a4b918, one file:
|
… flagged outdated
|
🎉 This PR is included in version 0.60.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Resolves #465
Summary
Every update path only ever moved a component to the newest release. The three components (CLI, Gateway, Desktop) now each expose their 5 most recent release tags, and each can be installed at a chosen tag independently:
releases/download/<tag>/<asset>for the CLI and gateway binaries, and that release's ownlatest.jsonfor the desktop updater (with the allowDowngrades comparator, so an older release can be rolled back over a bad update). The one-click "Install updates" flow and dev-build behaviour stay unchanged when no version is picked.Changes
backend/src/updates.rs:UpdateInfogainsversions- raw release tags (newest first, capped at 5, keeping thevprefix so download URLs work), fetchedgh-first with the public/releases?per_page=5API fallback;lateststays the normalized installable version.check_and_install_cli-style pinning also drives the desktop updater:install_desktop_updatenow takes a tag and points the updater atreleases/download/<tag>/latest.json, dropping the default newer-than-current rule so downgrades work.backend/src/cli_install.rs+backend/src/download.rs:check_and_install_cliandtry_gh_downloadaccept a tag; the binary and itschecksums.txtboth come from the samereleases/download/<tag>/base (gh positional tag arg, matching ureq fallback URL).backend/src/gateway.rs+backend/src/processes.rs:start_gatewayaccepts a tag; the supervisor threads it toensure_gateway_binary, which still stops the running gateway before the download (the Reinstall path [BUG] Applying an update on Windows stops the desktop-run gateway and never restarts it #380 fixed for Windows) and only builds the versioned URL when a tag was pinned.frontend/lib/updates.ts(new):stripV, semver-ishversionAction(Upgrade / Downgrade / no action) andselectableVersions(empty fordevbuilds and failed lookups), with unit tests.frontend/store.tsx: per-component selection (selectedVersions/selectVersion) andinstallUpdate(name): the CLI reinstalls only the CLI (daemon restart, gateway reused), the gateway reinstalls only the gateway through the existing stop-first flow, the desktop row pins the updater; running sessions are cancelled first and the selection clears after install.applyUpdatesis untouched for the one-click path.frontend/components/SettingsView.tsx: each Updates row's version opens a native dropdown of the 5 tags with the installed one marked, and shows anUpgrade/Downgradebutton per selection; dev builds and failed lookups get no dropdown.backend/Cargo.toml:url = "2"forUpdaterBuilder::endpoints.Checks
bun run buildpassing (embedded by the Rust build).cargo fmt --check,cargo clippy -- -D warnings,cargo testpassing (3 new tests: tag URL/base shaping andghtag-list parsing; frontend compares versions inupdates.test.ts).