Skip to content

feat(providers): merge update notices, Update all with progress - #600

Merged
Tryanks merged 1 commit into
mainfrom
feat/provider-update-all
Oct 6, 2026
Merged

Tryanks merged 1 commit into
mainfrom
feat/provider-update-all

Conversation

@Tryanks

@Tryanks Tryanks commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Summary

Provider update checks now report as one round, and updating is one sequential run that the runtime owns and every client renders.

 check_provider_versions
-  per provider: Notice(UpdateAvailable)           # one toast each
+  round of checks → Toast(ProviderUpdatesAvailable { updates })
+    action "Update all" for entries whose plan is automatic

-Command::UpdateProvider { provider }
+Command::UpdateProviders { providers }
+  run sequentially (package managers hold locks)
+  Toast(ProviderUpdateStarted) → ProviderUpdateProgress (same toast id) → ProviderUpdateFinished
+  ProvidersStatus.update_run { total, completed, current, failed }
 Settings → Providers header
   checked X ago · Tcode update · Add agent
+  Update all (shown when an automatic update exists; loading during a run)
   refresh
+ progress row: "Updating Codex… 1/3" + Progress bar (while a run is active)

Toasts carrying an action no longer auto-dismiss. The git retry action and the new Update-all action share one RuntimeToastAction enum. RuntimeNotice::{UpdateAvailable, UpdatingProvider, UpdateDone} and RuntimeError::{UpdateUnknown, UpdateFailed} are removed; failures are folded into the run result. Protocol version stays 9 (unreleased); its note records the change.

Evidence

  • Before: four providers with updates produced four separate success notices with no action; each update ran independently and could collide.
    After: version_round_merges_new_updates_and_finishes_after_stale_completion drives complete_version_check for two new updates plus one stale completion and gets exactly one toast listing both; merged_provider_toast_offers_only_automatic_updates_in_both_locales checks the Update-all action is offered only for automatic entries; provider_update_command_and_toasts_have_literal_wire_contracts pins the JSON shape.
  • Checks run in the worktree: cargo fmt --all --check, cargo clippy --workspace --all-targets --locked -- -D warnings, cargo nextest run --workspace --locked (908 passed, 11 skipped).
  • Visual: Settings → Providers inspected at 1200×800 and 600×800 in light and dark. No provider on this machine had an update, so the Update-all button, progress row and a real package-manager run were not seen live; the idle state hides them correctly.

Merge Danger

Door: two-way

Revert restores the per-provider notices; nothing persisted changes.

Blast Radius: protocol

A client and host on different sides of this change disagree on UpdateProvider and the removed notice variants, but the wire already changed in unreleased version 9. The live update path (sequential command execution, success and failure toasts) is unverified on a real outdated CLI.

Provider version checks now run as a round: the runtime emits one
ProviderUpdatesAvailable toast listing every provider newly found with
an update once the round's last check completes, instead of one notice
per provider. The toast offers Update all for the entries whose verified
update plan runs without a terminal.

UpdateProvider becomes UpdateProviders: the runtime updates the requested
providers sequentially under one run, publishes total/completed/current/
failed in ProvidersStatus, and drives one lifecycle toast (start, same-id
progress replacement, finish) with a progress bar. Settings → Providers
shows an Update all button beside refresh when automatic updates exist
and a progress row while a run is active. Toasts carrying an action no
longer auto-dismiss.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Tryanks
Tryanks force-pushed the feat/provider-update-all branch from 10d05d4 to 7b830cc Compare October 6, 2026 09:02
@Tryanks
Tryanks merged commit 9252d11 into main Oct 6, 2026
13 of 14 checks passed
@Tryanks
Tryanks deleted the feat/provider-update-all branch October 6, 2026 09:28
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