Skip to content

BB-48: Sidebar Updates badge + consolidated Settings → Updates - #813

Merged
SawyerHood merged 5 commits into
mainfrom
bb/revamp-update-notification-mock-thr_dutmcsjjdc
Jul 19, 2026
Merged

SawyerHood merged 5 commits into
mainfrom
bb/revamp-update-notification-mock-thr_dutmcsjjdc

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Summary

Replaces bb's stacked update toasts with one quiet, consolidated update system (BB-48):

  • Sidebar badge: a bg-primary pill (PackageReceive icon + "Updates") in the sidebar footer's lower-right, rendered only when an update is available, running, or failed. Clicking opens Settings → Updates.
  • Settings → Updates (new top-level section): bb-app/desktop update state (desktop: Relaunch when downloaded; web/npm: the honest npx bb-app@latest command + Copy — the server can't replace itself), plus provider CLI versions per connected machine with per-row Update/Install/Retry actions and Update all. Connected daemons show "Follows the server version" (they self-update on protocol mismatch); stuck daemons keep the Retry update affordance.
  • Toast removal: useUpdateAvailableToast, useDesktopUpdateAvailableToast, and ProviderCliHealthToasts are deleted. Only transient progress/success/failure toasts for user-initiated installs remain.
  • Runner generalization: useProviderCliInstallRunner now takes per-(host, provider) jobs so installs can target any connected machine (still one at a time), and the UI queries provider_cli.status on every connected host instead of just the primary.
  • CLI/SDK surfaces: bb updates [status] [--machine] [--json] and bb updates apply [--machine] [--json], with guide template + bb-cli skill entries per docs/cli-guide-and-skill.md. (Uses existing public API only — no wire changes, no protocol bump.)

Testing

  • Unit: new/updated tests for the runner (multi-host queueing), the section (web/desktop check paths, Update all fan-out), cache-owner registry, and CLI snapshot tests. Full typecheck+test green on @bb/app, @bb/cli, @bb/shared-ui, @bb/templates.
  • Live e2e (dev app + dev-browser): badge appeared from real inventory (Claude Code 2.1.214 → 2.1.215 on the dev host), clicking it routed to Settings → Updates, clicking Update ran a real claude update through the streamed PTY install RPC with inline Running state + progress toast, the row refreshed to 2.1.215 · Up to date, Update all disabled itself, and the badge disappeared.
  • CLI e2e against the live dev server: bb updates, bb updates --json, bb updates apply all verified.
  • Remaining states (desktop ready/downloading, not-installed, running+queued, offline, daemon protocol retry, status failure, checking, dark theme) exercised via Ladle stories; a screenshot catalog of every state lives in the thread workspace (bb48-e2e-catalog/index.html).

Closes BB-48 (design mock + plan in task comments).

🤖 Generated with Claude Code

SawyerHood and others added 5 commits July 19, 2026 17:03
One quiet, consolidated update surface: a primary-token pill in the
sidebar footer's lower-right (shown only when an update is available,
running, or failed) that opens a new top-level Settings → Updates
section listing bb-app/desktop state plus provider CLI versions per
connected machine, with per-row actions and Update all.

- Remove useUpdateAvailableToast, useDesktopUpdateAvailableToast, and
  ProviderCliHealthToasts; the badge and page replace them. Transient
  install progress/success/failure toasts for user-initiated runs stay.
- Generalize useProviderCliInstallRunner to per-(host, provider) jobs so
  installs can target any connected machine, still one at a time.
- New useUpdateInventory aggregates system version, hosts, per-host
  provider_cli.status, and desktop shell state; provider status cache
  writes move into a cache owner.
- Add bb updates status|apply CLI commands with guide/skill entries.

Co-Authored-By: Claude Fable 5 <[email protected]>
Rows in each Updates card now share a 4-column subgrid (name / version /
state / action) so the columns line up across rows, and every button on
the page is a compact ghost text button instead of a full-size outline
or filled button.

Co-Authored-By: Claude Fable 5 <[email protected]>
"Follows the server version" becomes "In sync", and row/header buttons
go back to outline styling at the compact 24px height instead of ghost.

Co-Authored-By: Claude Fable 5 <[email protected]>
The outline treatment plus ExternalLink icon sat awkwardly against the
adjacent Check for updates icon; What's new is now quiet ghost text.

Co-Authored-By: Claude Fable 5 <[email protected]>
@SawyerHood
SawyerHood marked this pull request as ready for review July 19, 2026 18:00
@SawyerHood
SawyerHood merged commit fcad592 into main Jul 19, 2026
10 checks passed
@SawyerHood
SawyerHood deleted the bb/revamp-update-notification-mock-thr_dutmcsjjdc branch July 19, 2026 18:00
ymichael added a commit that referenced this pull request Sep 23, 2026
…4224)

## Human comments

## What was wrong

When the selected provider's CLI was missing on the target machine, the
new-thread composer offered no way to install it. The only signs were
"Select model", a "Could not load models" error inside the model picker,
and a disabled send button labelled with that error. The app used to
prompt for missing CLIs, first with provider CLI health toasts, then
with a "Not installed" row in Settings → Updates. #813 removed the
toasts, and #1996 then limited the Updates rows to installed CLIs. The
provider installation protocol (`provider/installation/status` and
`provider/installation/run`) still reports `installed: false` and
returns an install plan, but nothing in the app used it.

## What changed

- `ProviderCliVersionBanner` is renamed to `ProviderCliBanner`
(`apps/app/src/components/promptbox/banner/`) and covers two cases. It
is still built on `ProviderRequirementBanner`.
- **Missing CLI:** "<Provider> not installed" / "Install <Provider>
before starting a thread." with an **Install <Provider>** button that
switches to "Installing…" while the install runs.
- **CLI too old:** the unsupported-version copy and Update action are
unchanged.
- `RootComposeView` now blocks the composer when the selected provider
reports `!installed || versionUnsupported`. Previously it blocked only
on `versionUnsupported`. Sending shows the matching blocked reason, and
the composer does not auto-focus. The action goes through the existing
`useProviderCliInstallRunner`. That runner already refreshes CLI status
and execution options after a successful install and shows a failure
toast with the install log.
- The banner only appears for providers that report installation status:
Codex, Claude Code, Pi and Cursor.
- Ladle: added "provider CLI not installed" and "install running" rows
to *Provider Requirement*, and the *missing Codex CLI* composer story
now shows the banner.
- No wire, protocol, CLI or server changes. Settings → Updates is
intentionally unchanged.

**Known limitation:** host CLI status is fetched once per session
(`SESSION_STATIC_QUERY_POLICY`). If someone installs the CLI outside bb,
the banner stays until the page is reloaded. The unsupported-version
banner already behaves this way.

## How you verified

- `pnpm exec turbo run typecheck lint --filter=@bb/app`: passes, 0 lint
errors.
- `pnpm exec turbo run test --filter=@bb/app`: 558 files passed, 1
skipped. `ProviderCliBanner.test.tsx` adds a missing-CLI case (title, no
version copy, Install action).
- Ladle *Provider Requirement* story checked visually.
- Live `pnpm start:worktree` QA with Claude Code forced to report not
installed (`BB_CLAUDE_CODE_EXECUTABLE` pointed at a nonexistent path).
This confirmed the banner, blocked send, and Install button. Progress
and failure states were exercised by intercepting the install request in
the browser, so no real installer ran on the review host.

Related to #3142 (the picker still offers providers that aren't
installed; this PR makes that state explicit and actionable instead of
hiding it).

> AGENT GENERATED

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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