Skip to content

Block new threads on a missing provider CLI with an Install banner - #4224

Merged
ymichael merged 1 commit into
mainfrom
bb/find-provider-protocol-install-helper-thr_yseg6fw3d9
Sep 23, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/find-provider-protocol-install-helper-thr_yseg6fw3d9

Conversation

@ymichael

@ymichael ymichael commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

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: " not installed" / "Install before starting a thread." with an Install 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

When the selected provider's CLI is not installed on the machine, the
root composer now shows the same requirement banner it shows for an
unsupported CLI version, with an Install action that runs the provider's
installation plan. Thread creation is blocked until the CLI is present.

Install prompts disappeared from the app when the provider CLI health
toasts were removed (#813) and the Settings -> Updates rows were limited
to installed CLIs (#1996).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@ymichael
ymichael merged commit b87b916 into main Sep 23, 2026
18 checks passed
@ymichael
ymichael deleted the bb/find-provider-protocol-install-helper-thr_yseg6fw3d9 branch September 23, 2026 22:31
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