Skip to content

Open a sidebar HTML preview full-page in the external browser - #5

Closed
brsbl wants to merge 1655 commits into
mainfrom
inline-vis-external-open
Closed

brsbl wants to merge 1655 commits into
mainfrom
inline-vis-external-open

Conversation

@brsbl

@brsbl brsbl commented Aug 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

Completes the inline-visualization two-step. Today the external icon on an
inline visualization (::inline-vis{file="…"}) opens the file in the sidebar
and stops there. This adds the second step: the sidebar preview header gets an
Open in external browser action that loads the rendered visualization
full-page in the user's default browser.

  • First click (unchanged). The in-thread icon still calls
    openWorkspaceFile and opens the sidebar. plugins/inline-vis/app.tsx has
    zero edits, so the first click has no path to a browser at all.
  • Second click (new). The sidebar header's Globe button opens the rendered
    page full-page in the external browser.

The button appears only for the rendered-HTML preview states (html and
iframe). Every other state is text the app renders itself, with no page a
browser could open on its own; a negative test pins that.

Design decisions worth a reviewer's attention

The absolute-URL resolution is load-bearing, not cosmetic. The preview URL
is an app-relative path (buildThreadWorktreeRawContentUrl and friends all run
through toRelativeUrl). The desktop main process validates for http:/https:
and silently returns on anything else, so handing it the relative path would
be a dead button with no error message anywhere. toAbsolutePreviewUrl resolves
it first, and a unit test asserts the desktop shell receives the absolute form.

openUrlInExternalBrowser, deliberately not useOpenUrlByPreference. The
latter honours the "open links in the in-app browser" preference and would route
the visualization into bb's own in-app browser panel — which is not the external
browser this action promises.

Globe, not ExternalLink. The adjacent OpenInEditorButton already
renders ExternalLink in the very same toolbar for a different destination
(the user's local editor); reusing it produced two identical adjacent icons.
Globe is this codebase's browser signifier (BrowserTabContent,
NewTabFileSearch, ThreadDetailView). A comment in the diff records why.

The existing "Open in editor" affordance is untouched and still renders
beside the new button; the e2e run below asserts it.

Tests

Local, on this branch's head:

  • turbo run build typecheck lint — 72/72 tasks green.
  • turbo run test --filter=@bb/app — 347 files / 2768 tests passed.
  • FilePreview.test.tsx — 19/19, including the 3 new cases: web dispatch
    (window.open with the absolute URL, _blank, noopener,noreferrer),
    desktop dispatch (window.bbDesktop.openExternalUrl receives the absolute
    URL), and the negative case for a text preview.
  • bb-plugin-inline-vis — 16/16, unchanged, guarding the first click.
  • ESLint on both changed files: 0 errors (4 pre-existing
    react-hooks/set-state-in-effect warnings at lines 491/1108/1113/1371, all in
    code this diff does not touch).

End-to-end verification

Driven with Playwright against an isolated dev instance (the packaged bb was
never touched), clicking the real UI:

Step Expected Observed
First click, in-thread icon sidebar opens, 0 new browser tabs sidebar opened (2 preview iframes), 0 new tabs ✅
Second click, sidebar Globe exactly 1 new tab, visualization full-page 1 new tab at the absolute preview URL, rendered full-page ✅
Third click, in-thread icon again still 0 new tabs 0 new tabs ✅

The second-click tab landed on
http://127.0.0.1:14043/api/v1/threads/thr_vbvsx29pas/worktree/files/demo.html
— absolute, title Inline vis demo, and the page's script had run
(INLINE_VIS_FULL_PAGE_OK), confirming the sandbox CSP still permits scripts
on the top-level document. The sidebar's existing Open in editor button was
present alongside the new one throughout.

Screenshots: 01-thread-with-inline-vis.png, 02-after-first-click-sidebar.png,
03-external-full-page.png, 04-after-third-click.png,
05-header-icons-zoom.png — the last shows the two icons side by side
(refresh, copy, Globe, ExternalLink), which is the collision that
motivated the icon choice.

Known gap

The live click-through exercises the browser dispatch (window.open → new
tab). The desktop dispatch (shell.openExternal → the OS default browser)
is covered by a unit test asserting openExternalUrl receives the correct
absolute URL — not by clicking inside the Electron shell. I did not upgrade that claim by clicking inside the Electron shell: it needs a
full desktop build, and shell.openExternal would pop a real browser window on
the machine running the review.

What I did instead is verify the trap in the real main-process code rather than
trusting the description of it. apps/desktop/src/main.ts:1618 handles the IPC
with new URL(payload) and no base, then drops anything that is not
http:/https::

let parsed: URL;
try {
  parsed = new URL(payload);
} catch {
  return;                       // <- a relative path lands here, silently
}
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
  return;
}
void shell.openExternal(parsed.toString());

Running that logic over both forms of the URL this button produces:

relative (what the preview state holds)  => silently dropped (new URL threw)
absolute (what the button sends)         => OPENS -> shell.openExternal(...)

So the renderer-side dispatch is pinned by a unit test, and the main-process
side that consumes it is confirmed by source. The untested seam is only the IPC
hop between them.

Security note

The served preview route carries content-security-policy: sandbox allow-scripts, which also applies to the top-level document opened here:
scripts run and relative assets load, but localStorage, cookies and
fetch-back-to-bb are unavailable. That is identical to what the sidebar iframe
already imposes, and it is the security boundary for arbitrary worktree HTML.
This change does not relax it.

BB-Thread-ID: thr_rq9s68xrgj

AGENT GENERATED: by Claude Opus 5

SawyerHood and others added 30 commits August 7, 2026 07:18
## Summary

- Move the T3 sidebar plugin from `plugins/` to `examples/plugins/`.
- Remove T3 Sidebar from the bundled official plugin catalog.
- Add local icon, select, and style helpers so the example does not use
BB's private shared UI package.
- Update the plugin guides, reference documents, catalog tests,
generated templates, and lockfile.

## Why

T3 Sidebar is a reference implementation for the sidebar replacement
APIs. It should remain an installable example instead of a bundled
product plugin.

## Impact

New BB builds will not include T3 Sidebar in the official plugin
catalog. Developers can install it from a checkout with:

```sh
bb plugin install ./examples/plugins/t3sidebar
```

## Validation

- `pnpm exec turbo run typecheck --filter=bb-plugin-t3sidebar
--filter=@bb/server --filter=@bb/templates`
- `pnpm exec turbo run test --filter=bb-plugin-t3sidebar --force`
- `pnpm exec vitest run --config vitest.config.ts
test/services/plugins/official-plugins.test.ts
test/services/plugins/builtin-plugins.test.ts`
- `pnpm run bb -- plugin build examples/plugins/t3sidebar`
## Summary

- add a default-off newOnboarding experiment with persisted database
support
- gate the onboarding flow and provider checks on the experiment
- expose the experiment through Settings and the bb CLI
- keep replay-onboarding useful by enabling the experiment before replay
- update generated contracts, guides, and migration rewind coverage

## Tests

- type checks passed for app, CLI, database, desktop, domain, plugin
SDK, server, and templates
- 47 focused tests passed across app, CLI, database, domain, and server
## Summary

- Derive `pluginCount`, `includedPluginCount`, and `optionalPluginCount`
in `plugin-catalog-routes.test.ts` from the bundled plugin registry
instead of hardcoding `13 / 8 / 5`.

## Why

CI is red on `main`. Commit f13c2d3 ("Move T3 sidebar plugin to
examples", get-bb#1109) removed `t3sidebar` from `OFFICIAL_PLUGINS`, so the
bundled catalog went from 13 plugins to 12. That PR updated
`plugin-catalog-service.test.ts`, which derives its counts from the
registry, but it missed the route test, which hardcoded the numbers.

```
AssertionError: expected { catalog: { pluginCount: 12, ... } }
                to match object { catalog: { pluginCount: 13, ... } }
```

get-bb#1109 landed without a green run: its own CI run (31186905645) was
cancelled when get-bb#1108 pushed on top of it.

The route test now uses the same source of truth as the service test, so
a future plugin add or remove will not break it again.

## Tests

- `pnpm exec turbo run test --filter=@bb/server -- plugin-catalog` — 7
passed.
- `pnpm exec turbo run test --filter=@bb/server` — 1336 passed. One
unrelated local-only failure in `internal-skill-trees.test.ts`, which
asserts file mode `0o644` but writes the file with no explicit `chmod`.
It follows the umask, so it fails under umask `0002` and passes on CI
runners under `0022`.
- `pnpm exec turbo run typecheck --filter=@bb/server` — pass.
- CI run 31187487485 on `main`: `Tests (server)` was the only failing
job. All other jobs passed.

## Risk

Test-only change. No product code is touched.

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

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…et-bb#1107)

## The problem

`bb plugin new` seeds `types/*.d.ts` once, and nothing ever refreshes
them. The SDK surface grows every release, so a plugin scaffolded
against an older bb typechecks green against an API that has since
moved. Local copies on one machine:

| plugin | lines | current |
|---|---|---|
| `bb-plugin-posthog-dashboard` | 10,966 | 12,868 |
| `omegacode` | 11,736 | 12,868 |
| `bb-slop-cop` | 12,409 | 12,868 |
| `bb-plugin-strudel` | 12,738 | 12,868 |

The `bb-plugin-authoring` skill points agents at `types/` for an exact
signature, but could not promise the directory existed or was current.
With no trustworthy local source of truth, an agent falls back to
grepping minified build output — which costs far more context and
answers worse.

## The fix

**`bb plugin types [path]`** writes the running bb's `@bb/plugin-sdk`
declarations into the plugin's `types/`, creating the directory when
absent. Needs no server. `--check` reports staleness and exits non-zero
without writing, for CI.

**Auto-refresh**: `bb plugin build` and `bb plugin dev` run the same
sync. `dev` refreshes before its watcher starts, so the write cannot
feed the loop its own change event. A failure warns and continues — an
unwritable `types/` must not fail a build.

**`syncPluginTypes`** lives in
`packages/templates/src/plugin-scaffold.ts`, next to the scaffold that
seeds the same files. It compares before writing, so a current plugin
reports `unchanged` and keeps its mtime, and a headless plugin never
gets a frontend declaration it did not ask for.

**The skill** gains a `## Looking up the exact API` section with a
three-step ladder — run `bb plugin types`, read the `.d.ts`, clone the
repo with a copy-pasteable `git clone --depth 1` — plus an explicit
rule: never answer an API question from a built bundle, and if you catch
yourself grepping minified JavaScript, go back to step 1. A Gotchas
bullet points back at it.

Guide chapter (regenerated), `bb-cli` skill, and scaffold README updated
to match.

## Verification

Against the real stale posthog-dashboard plugin: `--check` reported both
files stale and exited 1; `bb plugin types` took the root declaration
10,966 → 12,868 lines and the app declaration 507 → 1,443; a re-check
reported `unchanged`. A headless plugin with no `types/` got only the
root declaration. `bb plugin build` printed `Refreshed SDK declarations`
before compiling.

`pnpm exec turbo run typecheck test --filter=@bb/cli
--filter=@bb/templates` passes (387 tests). Server skill and
plugin-authoring-doc tests pass (75 tests). Five new tests in
`packages/templates/test/plugin-sync-types.test.ts` cover stale
replacement, unchanged-keeps-mtime, the headless case, refreshing an
existing app declaration, and check-mode writing nothing.

## One call to confirm

`bb plugin build` now rewrites `types/` in place, so a plugin that
commits those files and builds in CI will show a dirty tree. That is
deliberate — `--check` is the non-writing alternative — but happy to
make `build` warn instead.

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

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Summary

- Ship a pinned physical Pi 0.84.0 package tree.
- Load global and project Pi settings through Pi's full service path.
- Load configured packages, extensions, skills, prompts, themes,
context, authentication, and models.
- Include extension models in the BB model list.
- Preserve Pi shell settings when BB adds thread environment values.
- Test a custom extension provider, extension tool, and BB dynamic tool
from an installed package.

## Why

The bridge created in-memory settings and bundled Pi into one file. This
bypassed the user's Pi configuration.

The single-file package also prevented extensions from sharing the host
Pi modules.

## Impact

Users keep their Pi settings and extensions while BB controls the Pi
package version.

Users do not need an installed Pi executable.

## Validation

- `pnpm exec turbo run typecheck --filter=@bb/agent-runtime
--filter=@bb/host-daemon --filter=@bb/server --filter=bb-app --force`
- 810 agent runtime tests
- 479 host daemon tests
- 1,335 server tests
- 48 BB application tests
- `pnpm exec turbo run smoke:tarball --filter=bb-app --force`
- A real model request through the packaged bridge with an existing Pi
configuration
## Summary

- render GitHub Flavored Markdown tables as structured, overflow-safe
tables in GitHub issue and pull request bodies
- support alignment markers, optional outer pipes, escaped pipes, and
existing inline formatting inside cells
- add focused frontend regression coverage based on the table from get-bb#1141

## Testing

- `pnpm exec turbo run test typecheck build --filter=bb-plugin-github
--force`
- `pnpm exec prettier --check
plugins/github/components/markdown-lite.tsx
plugins/github/components/markdown-lite.test.tsx
plugins/github/vitest.config.ts plugins/github/package.json`
- `pnpm install --lockfile-only --frozen-lockfile`
- `git diff --check`

Fixes get-bb#1142
## Summary

- constrain shared dialog grid tracks so long intrinsic content cannot
widen desktop dialogs or mobile drawers
- truncate long folder, file, and derived project names while preserving
full entry names as hover titles
- add regression coverage and a long-names row to the Project Path story

## Testing

- pnpm exec turbo run test --filter=@bb/app --force --
src/components/dialogs/ProjectPathDialog.test.tsx
src/components/dialogs/RemotePathBrowser.createFolder.test.tsx
- pnpm exec turbo run typecheck --filter=@bb/app --filter=@bb/shared-ui
- pnpm exec turbo run lint --filter=@bb/app
- pnpm exec turbo run build --filter=@bb/app

Closes get-bb#1112
## Summary

- add a root `pnpm dev:status` command that runs `scripts/bb-dev-app
status`
- document the package command in the local dev QA guide

## Testing

- `pnpm dev:status`
- `pnpm exec prettier package.json docs/debugging-and-qa.md --check`
- `git diff --check`
…et-bb#1076)

Closes get-bb#1075.

## Summary

- batch raw PTY output into ordered chunks and preserve arbitrary
UTF-8/binary bytes end to end
- add bounded browser and daemon websocket backpressure, bad-socket
isolation, heartbeat/reconnect, input queuing, and sequence
deduplication
- reconnect from the last received sequence and bound initial browser
replay to the latest 512 KiB instead of replaying the full 4 MiB
scrollback on every open
- serialize terminal restart, open the replacement before closing the
old PTY, and wait for daemon exit acknowledgement so final output
precedes exit
- keep threadless terminal caches current, make latest-attached clients
own resize, and restore ownership on failed attach/detach
- enable xterm Unicode 11 width rules and Nerd Font fallbacks
- bump the host-daemon protocol from 75 to 76 for byte-preserving input
and required bounded-replay fields

## Measurements

### Sustained output

A local 16 MiB output probe improved from about 6.5 MiB/s to 53–63
MiB/s. Websocket output messages dropped from 16,386 to 258–480
depending on PTY chunking.

Input remained responsive during a 16 MiB remote flood. Over the
Tailscale path used for QA, the full burst completed without disconnect
while a concurrent input echo returned in 101 ms.

### Reopening a populated remote terminal

Measured through an SSH tunnel to a patched VPS:

| | Before | After |
|---|---:|---:|
| Time to final replayed line | 2,210 ms | 556 ms |
| Replay bytes | 4,192,407 | 461,853 |
| Websocket output messages | 1,025 | 15 |

A subsequent reconnect requested the previous `nextSeq` and replayed
only 319 bytes rather than the retained history.

### Input integrity

A 200,009-byte payload containing emoji and combining characters crossed
multiple 64 KiB request boundaries on the VPS with an exact SHA-256
match. CLI `--stdin` also has coverage for invalid UTF-8 bytes.

## Validation

On current `main`:

- `pnpm exec turbo run typecheck` for app, CLI, host daemon, host-daemon
contract, server, SDK, server contract, and templates
- 191 focused tests across app terminal UI/transport/controller, CLI
terminal commands, daemon connection/PTY manager, server hub/routes, and
both contracts
- production builds for app, CLI, server, and host daemon
- patched local and VPS live stacks, including latency,
flood/backpressure, atomic restart, large paste, replay truncation,
reconnect, and multi-client resize ownership

---------

Co-authored-by: Michael Yong <[email protected]>
Closes get-bb#1100.

## Summary
- handle the null window value that Electron sends for native panels
- send the native macOS close action for the About panel
- preserve the existing app-window and detached DevTools close paths
- add a regression test for the null window case

## Tests
- pnpm exec turbo run test typecheck --filter=@bb/desktop --force
- 230 desktop tests passed
- desktop type check passed
## Summary

- let GitHub CLI resolve pull requests from the checked-out branch and
its configured upstream
- fix prompt-banner PR detection for branches tracking contributor forks
- apply the same tracking-aware resolution to ready, draft, and merge
actions
- preserve detached-head and lookup-failure behavior

## Reproduction

PR get-bb#1076 checked out a branch that tracked Diffuzmetall/bb. Passing its
bare branch name to gh pr view searched the base repository and returned
no pull request. Running gh pr view from the worktree without a
positional target followed the fork upstream and found the PR.

## Validation

- 185 host-workspace tests passed
- host-workspace and host-daemon typechecks passed
- verified the current-branch helper resolves same-repository and
fork-backed pull requests and still reports no PR for main

## Commands

- pnpm exec turbo run test --filter=@bb/host-workspace --force
- pnpm exec turbo run typecheck --filter=@bb/host-workspace
--filter=@bb/host-daemon
## Summary

- deduplicate React and React DOM in the Ladle Vite resolver
- keep linked workspace stories on the same React module instance as the
Ladle renderer
- prevent invalid hook calls when Vite refreshes its optimized
dependency graph

## Verification

- pnpm exec turbo run typecheck --filter=@bb/app
- pnpm exec turbo run test --filter=@bb/app --force (321 files, 2,402
tests)
- pnpm exec turbo run lint --filter=@bb/app (passes with existing
warnings)
- confirmed the affected story, StoryRow, and renderer resolve through
one optimized React graph
Closes get-bb#1105.

## Summary

- Scan `.agents/skills` from the Git repository root through the current
directory.
- Keep the legacy `.codex/skills` path.
- Classify canonical roots as Codex project skills.
- Increase the host daemon protocol version to 79.

## Tests

- `pnpm exec turbo run test --filter=@bb/host-daemon -- --run
src/command-discovery.test.ts src/command-handlers/list-skills.test.ts`
- `pnpm exec turbo run test --filter=@bb/host-daemon-contract -- --run
test/contract.test.ts`
- `pnpm exec turbo run typecheck --filter=@bb/host-daemon
--filter=@bb/host-daemon-contract`
- Prettier check
- `git diff --check`
## Summary

- mark the automatically selected connected provider as a client
preference so thread creation uses the provider shown in the composer
- derive onboarding agent order from the same built-in provider catalog
used by the model picker
- add regression coverage for client provenance, server resolution, and
connected-agent ordering

## Root cause

For projects without saved execution defaults, the composer displayed
the first connected provider but sent empty execution-input provenance.
The server intentionally discarded displayed-only provider/model values,
fell back to Codex, and persisted that resolved default.

## Testing

- `pnpm exec turbo run test --filter=@bb/app -- --run
src/hooks/useThreadCreationOptions.test.tsx
src/views/RootComposeView.test.ts`
- `pnpm exec turbo run test --filter=@bb/server -- --run
test/system/onboarding.test.ts
test/services/threads/thread-execution-plan.test.ts`
- `pnpm exec turbo run typecheck --filter=@bb/app`
- `pnpm exec turbo run typecheck --filter=@bb/server`
- `pnpm exec turbo run lint --filter=@bb/app --filter=@bb/server`
- Prettier and `git diff --check`
## Summary

- normalize Codex and Claude subscription rate-limit telemetry into a
shared provider state
- add guarded, at-most-once continuation on the same provider
conversation using agent-only `Please continue.`
- add the opt-in builtin provider-retry plugin with in-memory
scheduling, account coordination, UI, SDK, and CLI controls
- enable it explicitly through Extensions → Plugins or `bb plugin enable
provider-retry`
- allow plugins to be enabled or disabled directly from their settings
detail page
- intentionally exclude retry persistence across server or daemon
restarts

## Safety

- continuation is allowed only for the latest terminal failed turn with
no emitted output or possible side effect
- provider-owned retries remain authoritative while active
- reset changes, host disconnects, cancellation races, and realtime
reconnection are handled explicitly
- credits and spend controls remain manual-retry cases

## Validation

- 13 affected Turbo typecheck tasks pass
- app: 2,354 tests pass
- server: 1,330 tests pass
- agent runtime: 802 tests pass
- provider-retry plugin: 10 tests pass
- host-daemon contract: 49 tests pass
- CLI, SDK, plugin SDK, server contract, templates, and domain suites
pass
- standalone provider-retry plugin build passes
## Summary

- distinguish a reconnect from a genuinely new host-daemon instance when
replacing a server session
- close only the superseded WebSocket for same-instance reconnects,
preserving resident provider runtimes and their background processes
- retain the fatal `session-close` and task reconciliation behavior when
a different daemon instance takes over
- bump the host-daemon protocol version and add unit plus real-provider
regression coverage

## Root cause

Opening a replacement server session always sent
`session-close:replaced` to the previous socket. On an ordinary
reconnect, that socket belonged to the same live daemon instance. The
daemon treated the message as terminal and shut down every environment
runtime, which killed background commands before its supervisor
restarted it.

The server already has both session instance IDs, so it can tell these
cases apart. A same-instance replacement now closes only the stale
transport. A different-instance replacement still shuts down the
superseded daemon and settles its work.

## Reproduction

I reproduced this with standalone dev servers and the `bb` CLI against
both the v0.35.1 tag and this branch:

- v0.35.1: replacing the live session with the same daemon instance
immediately killed the background shell and sleep PIDs, recorded the
task as stopped/interrupted, and logged `session-close:replaced` daemon
shutdown
- patched branch: the daemon reconnected with the same instance ID, the
same background PIDs remained alive across a CLI follow-up, and the task
completed and wrote its marker normally
- control: an unchanged CLI follow-up without a reconnect preserved the
background PIDs, confirming the reported failure is specifically the
reconnect path

## Tests

- `@bb/server` lifecycle and hub regression tests: 32 passed
- `@bb/host-daemon-contract` tests: 49 passed
- sanitized install-machine regression suite: 10 passed
- typechecks for `@bb/server`, `@bb/host-daemon-contract`, and
`@bb/integration-tests`
- real Claude end-to-end reconnect/background-process regression: passed
- full server suite: 1,357 passed; the one environment-dependent
install-script failure passed when rerun with the expected sanitized
`PATH`

Closes get-bb#1127
## Summary

- allocate and persist a distinct local API port for each enrolled host
daemon, and pass it through foreground joins plus generated
launchd/systemd services
- validate readiness through `/status`, requiring the expected `hostId`,
normalized `serverUrl`, and an active server connection
- turn remaining `EADDRINUSE` and service startup failures into
actionable bb-authored diagnostics
- document the installer override and port-selection behavior

## Testing

- `sh -n apps/server/src/assets/install-machine.sh`
- `pnpm exec turbo run typecheck --filter=@bb/host-daemon
--filter=bb-app --filter=@bb/server`
- `pnpm exec turbo run test --filter=@bb/host-daemon --force -- --run
src/local-api.test.ts`
- `pnpm exec turbo run test --filter=bb-app --force -- --run
test/index.test.ts`
- `pnpm exec turbo run test --filter=@bb/server --force -- --run
test/app/install-machine-script.test.ts test/app/skeleton.test.ts`

Fixes get-bb#1121
## Summary

- Verify that the `primeExtensions()` port asked for in get-bb#1086 already
landed in get-bb#1080, end to end against the built bridge.
- Stop one broken Pi extension from emptying the whole model picker.
- Stop an extension model without `input` types from failing the whole
model list.

## Why

get-bb#1086 asks to port `primeExtensions()` to the production Pi bridge so
extension providers such as `commandcode` appear in the stock Pi
provider.

That port already landed in get-bb#1080 (`8d7bf6124`). The bridge builds its
model runtime through `createConfiguredPiServices()`, and Pi 0.84.0
flushes `pendingProviderRegistrations` inside
`createAgentSessionServices()`. A disposable priming session is not
necessary.

I confirmed this with the real extension from the issue, not a mock:
`[email protected]` installed from npm, driven by a real
`model/list` JSON-RPC request to the built `dist/bb-pi-bridge.mjs`. It
returns **51 CommandCode models**.

That test found two defects that still produce the exact symptom in the
issue.

### 1. A broken extension emptied the whole picker

`collectServiceErrors()` throws on any extension load error, and
`getPiModelRuntime()` passed that on, so `model/list` answered with a
JSON-RPC error. The user lost every model on the machine, built-in
providers included, because of one bad third-party extension.

Repro before this change, with a working extension and a broken one
installed together:

```
Error: Failed to load Pi extension "/tmp/pi-broken/ext/broken.ts": Cannot find module '@not-installed/nope'
```

The fix splits the service builder. `loadConfiguredPiServices()` reports
the problems, and `createConfiguredPiServices()` still throws. Model
listing writes the problems to stderr and lists what loaded. Thread
start still fails loudly, so a run never uses a partial configuration in
silence.

After, through the shipped bundle:

```
pi bridge: Failed to load Pi extension "/tmp/pi-broken/ext/broken.ts": ...
TOTAL 2
  commandcode-fake: 2
```

### 2. An extension model without `input` crashed the list

`input: [...model.input]` threw `TypeError: model.input is not
iterable`. Pi types `input` as required, but an extension registers its
models from plain JavaScript and Pi does not validate them. One
malformed model hid every other provider.

## Impact

A user with a broken or outdated Pi extension keeps a working model
picker and gets the reason on stderr, instead of an empty picker with no
explanation.

## Note on model counts

Extension models appear only when the provider has credentials. With
`COMMANDCODE_API_KEY` unset, `getAvailable()` filters CommandCode out
and the count returns to 0. That is correct Pi behavior, not a BB
defect, but it may explain part of what the reporter saw.

`HOST_DAEMON_PROTOCOL_VERSION` is unchanged: this is internal to the
bridge process and the `model/list` result shape is the same.

## Validation

- 823 `@bb/agent-runtime` tests, including 3 new regression tests
- 482 `@bb/host-daemon` tests
- `pnpm exec turbo run typecheck --filter=@bb/agent-runtime
--filter=@bb/host-daemon`
- ESLint on `packages/agent-runtime/src/pi`
- All three scenarios driven over JSON-RPC against the built
`bb-pi-bridge.mjs`, not only against source

Fixes get-bb#1086

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

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Fixes get-bb#1123.

## Summary

- resolve an ambiguous bare Pi model through its sole authenticated
provider
- keep explicit provider selections authoritative
- retain the ambiguity error when zero or multiple matching providers
have authentication
- bump the host daemon protocol to update enrolled daemons before the
model meaning changes

## Tests

- `pnpm exec turbo run test typecheck --filter=@bb/host-daemon-contract
--filter=@bb/agent-runtime --force`
- 879 tests passed after rebasing on get-bb#1148
- both package typechecks passed

## Risk

The behavior changes only for bare model IDs with multiple catalog
matches and exactly one authenticated provider. Explicit
provider-prefixed IDs remain unchanged.
Fixes get-bb#1163

## Root cause

`AppSidebar` opened the thread in `handleThreadSearchSelectItem`
(navigate + `closeOnMobile`) but never cleared the search state.
`isThreadSearchActive`, the query, the cursor index, and the result
items all stayed set. `ProjectList` renders the search panel in place of
the thread list while `threadSearch.isActive` is true, so the sidebar
stayed in search mode after navigation.

## User impact

After Command-K search and a keyboard selection, the thread opened but
the sidebar kept the search field, the typed query, and the result list.
The user had to press Escape twice, or click the X, to get the thread
list back. Pointer selection had the same problem.

## Implementation

- New hook `useSidebarThreadSearch` owns the query, the result items,
the keyboard cursor, the input ref, and the sidebar key handler.
`AppSidebar` supplies only the two effects it owns: open the sidebar,
and open a thread.
- `onSelectItem` opens the thread and then clears all search state.
Keyboard Enter and pointer clicks share this path, so both behave the
same.
- A plugin thread list reads the host search field, so its `onNavigate`
gets the same reset.
- `isThreadSearchKeyboardEventTarget` moved to `sidebarThreadSearch.ts`,
next to the other pure helpers.
- Escape keeps its two-step behavior: the first press clears the query,
the second closes search. Search focus, section labels, and sidebar
visibility do not change. Search still opens the sidebar and does not
close it after navigation.

## Automated validation

- New `useSidebarThreadSearch.test.tsx`: 4 tests covering keyboard
selection, pointer selection, the Escape steps, and activation.
- Mutation check: with the reset call removed, 3 of the 4 new tests
fail. With it restored, all pass.
- Sidebar suite: 25 files, 200 tests, all pass.
- `pnpm exec turbo run typecheck --filter=@bb/app` — pass.
- `pnpm exec turbo run lint --filter=@bb/app` — 0 errors. The 141
warnings match the state before this change; these files add none.

## Dev Browser validation

I ran the real dev app from `scripts/bb-dev-app current` and drove it
with headless Chromium through dev-browser.

Keyboard path — `Control+K`, query `needle`, `ArrowDown`, `Enter`:

| Point | URL | Search input | Options |
|---|---|---|---|
| Before search | `/` | absent | 0 |
| Query typed | `/` | `"needle"` | 3 |
| After Enter | `/projects/.../threads/thr_8b9g6fvnkd` | absent | 0 |

A string comparison of the sidebar text before search and after
navigation returned `true`, so the sidebar returns to its earlier state.
The opened thread row is selected and the sidebar width is unchanged.

Pointer path: `Control+K`, query `gamma`, mouse click on the row. The
thread opened and the sidebar list came back the same way.

Bug reproduction in the live app: with the reset call removed, the same
keyboard flow opened the thread but left `"needle"` in the input and 3
result rows on screen — the state the issue describes. Restoring the
file removed that state again.

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

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Fixes get-bb#1162

## Root cause

The prompt editor consumes key events before the app command layer sees
them.

1. `AppCommandProvider` listens on `window` in the bubble phase and
skips any event whose default is already prevented
(`AppCommandProvider.tsx:270`). TipTap's keymap cancels every chord it
owns. Live check in the dev app, with the chat input focused:
`Ctrl+Shift+B` (blockquote) and `Ctrl+B` reached the `window` listener
with `defaultPrevented === true`. A sidebar shortcut bound to such a
chord therefore did nothing while the chat input had focus.
2. ProseMirror cancels Escape unconditionally, but nothing released the
editor. Live check: after Escape, `document.activeElement` was still the
editor.

## User impact

- The sidebar shortcut, and any other app shortcut, silently did nothing
while the chat input had focus, whenever its chord collided with the
editor keymap. Users had to click the toggle.
- Escape did not release the chat input, so the keyboard could not reach
the rest of the app.

## Implementation

- `AppCommandProvider.tsx`: the keybinding match and dispatch loop moves
into `handleKeyboardEvent`, which reports whether a command ran. A new
`useAppCommandKeyDispatch()` hook exposes it. The window listener keeps
its current behavior.
- `PromptBoxInternal.tsx`: the editor keydown handler asks the app
command layer first, so app keybindings win over the editor keymap.
Escape blurs the editor DOM and drops the caret.

Escape priority stays intact. The typeahead menu claims Escape earlier
in the same handler, so the first Escape dismisses the menu and the
second releases focus. Voice recording cancels from a window capture
listener that stops the event before the editor.

No server or daemon payload changed, so `HOST_DAEMON_PROTOCOL_VERSION`
stays as it is.

## Validation

- New `PromptBoxAppShortcuts.test.tsx`: shortcut from a focused
composer, shortcut on a chord the editor keymap also claims, Escape
blur, and plain typing unaffected.
- `pnpm exec turbo run typecheck --filter=@bb/app` — pass.
- `pnpm exec vitest run --project @bb/app` — 322 files, 2418 tests, all
pass.
- `pnpm exec turbo run lint --filter=@bb/app` — 0 errors, no warnings in
the changed files.
- Live QA in the dev app, thread view and new-thread composer: the
sidebar toggles from the focused chat input, the first Escape dismisses
the mention menu and keeps focus, the second Escape blurs, and the draft
text survives.

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

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Summary

- add `BB_SERVER_BIND_HOST` (default `127.0.0.1`, accepts `127.0.0.1` or
`0.0.0.0`) and pass it as the `serve()` hostname
- add the matching `--server-bind-host` launcher flag, validated before
the server child is spawned
- let an explicit flag win over a persisted `env.json` value, and reject
an invalid value at `bb-app env set` time so it cannot be persisted
- log a security warning at startup when the bind host is not loopback
- default the source-dev Vite listener to loopback and allow `.ts.net`
hosts so the Tailscale Serve dev flow works

## Root cause

`apps/server/src/start-server.ts` called `serve({ port, fetch })` with
no hostname, so Node bound `::`/`0.0.0.0` and the server was reachable
on every network interface the machine joined.

Authentication middleware covers only `/internal/*`; `/api/v1` has none.
`browserRequestProblem` is an Origin/CSRF control that deliberately
passes requests without an `Origin` header, so it does not constrain
non-browser clients.

Together these meant any host that could route packets to the machine
could reach `POST /api/v1/terminals` with `start:{mode:"command"}`,
which the daemon executes through the user's shell, and `GET
/api/v1/files/read`, which accepts an unrestricted absolute path. That
includes LAN, VPN, and tailnet peers — and, because the `::` bind also
covers public IPv4 and globally routable IPv6, the open internet
wherever no firewall happens to stand in front.

The host daemon local API and the machine-auth proxy already bound
loopback deliberately; only the main server lacked a bind host.

## User impact

This isn't a LAN-only concern: deployments with a routable address and
no host firewall (cloud VMs, VPS hosts, machines with global IPv6) were
exposed to the internet. That, plus the public PoC in get-bb#1124, is why this
should ship as a security release rather than waiting for a normal
cycle.

A laptop that joins untrusted networks no longer exposes the bb API. The
desktop app, plugin SDK, bb CLI, agents, and the colocated host daemon
all reach the server over loopback and are unaffected.

Remote host daemons and browsers that targeted a direct LAN or tailnet
`http://<host>:38886` URL must migrate to `tailscale serve` in front of
loopback, to the authenticated bb connect route, or explicitly opt back
in with `--server-bind-host 0.0.0.0`. Migration guidance is documented
in `docs/multiple-devices.md`; establish the new route before restarting
an upgraded server, since an unreachable daemon cannot self-update.

`HOST_DAEMON_PROTOCOL_VERSION` is unchanged: no wire format changed, and
a version bump cannot help a daemon that can no longer reach the server.

## Validation

- `pnpm exec turbo run typecheck --filter=@bb/config --filter=@bb/server
--filter=bb-app --filter=@bb/app --filter=@bb/templates`
- `pnpm exec turbo run test --filter=@bb/config --filter=bb-app
--filter=@bb/server --force`
- verified on a running instance: `lsof` reports `TCP 127.0.0.1:38886
(LISTEN)`, loopback `/health` returns `{"ok":true}`, and the same
request to the host's LAN address is refused

Fixes get-bb#1124

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: Sawyer Hood <[email protected]>
## Summary

Prepares the 0.36.0 release: version lockstep bump and release notes.

- bump `bb-app` and `@bb/desktop` to `0.36.0` via
`scripts/bump-version.mjs`
- add the `0.36.0` section to `CHANGELOG.md`
- add the `0.36.0` entry to `RELEASE_META` in
`apps/web/src/landing/changelog.ts`

## Release notes

Headline is "Fixes and improvements". The notes lead with the loopback
bind default (get-bb#1125), because it is the one change that needs user
action before the upgrade. That section links to
`docs/multiple-devices.md` for the bb connect and Tailscale Serve setup
steps rather than repeating them.

Two risks are called out explicitly in the notes:

- The host daemon protocol moved 69 → 82 in this range. A remote daemon
that reaches the server at a direct `host:38886` address loses its route
and cannot self-update, so the route must move first.
- A thread that names no model now resolves one from the provider
catalog on the target host (get-bb#1002), and fails to start when that host
cannot list models.

A Thanks section credits the external contributors in this range:
@ben-vargas, @Diffuzmetall, @kschrader, and @toasterman234.

Commands stay as inline code spans throughout. The `/changelog` parser
handles only paragraphs and bullets, and its inline renderer supports
only `code` and `strong`, so a fenced block or a Markdown link would
render as literal text on the marketing site.

## Validation

- `node .github/workflows/check-version-lockstep.mjs` — bb-app=0.36.0
@bb/desktop=0.36.0
- `pnpm exec turbo run typecheck test --filter=@bb/config
--filter=@bb/server --filter=bb-app --force` — 1367 tests passed
- `pnpm exec turbo run smoke:tarball --filter=bb-app --force` — passed
- `git diff --check` — clean

Unrelated pre-existing issue found while validating:
`apps/server/test/internal/internal-skill-trees.test.ts` asserts a file
mode of `0o644`, which depends on the process umask. It fails under
`umask 002` and passes under `umask 022`. CI is unaffected.

## Follow-ups

- Redeploy `@bb/web` after this lands so `/changelog` shows 0.36.0.
- `publish-bb-app.yml` and `build-desktop.yml` still need to run from
`main` at this commit.

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

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Summary

Delete two stale generated review documents that were committed into the
repo:

- `sidebar-plugin-review.html` (363 KB, repo root)
- `artifacts/bb-54-product-review.html` (612 KB) — this empties and
removes the `artifacts/` directory

Both are generated product/plugin review reports, not part of the app.
`apps/app/index.html` is the only remaining HTML file and it is the real
app entry point.

## Tests

No tests. The change deletes untracked-by-code files only. Verified with
grep that no source, config, or docs file references either path. The
`artifacts/` strings in `ThreadSecondaryPanelNewTab.stories.tsx` are
unrelated Storybook fixture paths.

## Risks

None known.

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

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…rror (get-bb#1177)

## Summary

A bb 0.35.1 user hit this error on every Claude turn:

> Native CLI binary for darwin-arm64 not found. Reinstall
@anthropic-ai/claude-agent-sdk without --omit=optional, or set
options.pathToClaudeCodeExecutable.

Packaged bb builds inline the Claude Agent SDK into the bridge bundle
and do not ship the SDK's native platform package (217 MB per platform),
so the SDK's bundled-binary fallback can never work in a shipped
install. When the login-shell PATH probe also misses the user's claude
install (theirs was at `~/.local/bin/claude`), the session fails with
the raw SDK error above.

## Changes

- `resolveClaudeCodeExecutable` now checks well-known Claude install
locations (`~/.local/bin/claude`, `~/.claude/local/claude`,
`/opt/homebrew/bin/claude`, `/usr/local/bin/claude`) when PATH discovery
finds nothing. This also benefits model listing, which shares the
resolver.
- The bridge translates the SDK's "Native CLI binary ... not found"
error into bb guidance: install Claude Code, or set
`BB_CLAUDE_CODE_EXECUTABLE`, then restart bb. The old message told users
to reinstall an npm package they do not own.

## Tests

- New test: falls back to well-known install locations when PATH
discovery fails.
- `pnpm exec turbo run typecheck test --filter=@bb/agent-runtime`: 43
files, 831 tests pass.

## Risks

- The well-known-location scan runs only after PATH discovery fails, so
existing setups keep their current resolution.
- A machine with a stale claude binary at a well-known location could
now pick it up where the session previously failed outright; that is
strictly better than failing.

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

---------

Co-authored-by: Claude Fable 5 <[email protected]>
## Summary

- add optional `routeProviderId` metadata to available models and
populate it from the Pi catalog without changing friendly display names
- show the nested provider as muted text in model-picker rows and
include it in search, while keeping the closed selected value unchanged
- cover duplicate `gpt-5.3-codex-spark` routes so `openai` and
`openai-codex` remain visibly and behaviorally distinct
- bump the host daemon protocol to 83 for the model-list wire-contract
change; current `main` already uses 82 for authenticated Pi model
resolution

## Root cause

Pi can expose the same friendly model name through multiple nested
providers. Their canonical model IDs were distinct, but the picker
rendered only the shared display name, making the API-backed
`openai/gpt-5.3-codex-spark` route indistinguishable from the
subscription-backed `openai-codex/gpt-5.3-codex-spark` route.

## Verification

- `pnpm exec turbo run test --filter=@bb/app --force -- --run
src/hooks/useThreadCreationOptions.test.tsx
src/components/pickers/ModelReasoningPicker.test.tsx`
- `pnpm exec turbo run test --filter=@bb/agent-runtime --force -- --run
src/pi/bridge/__tests__/model-list.test.ts`
- `pnpm exec turbo run test --filter=@bb/domain --force`
- `pnpm exec turbo run test --filter=@bb/host-daemon-contract --force`
- `pnpm exec turbo run typecheck --filter=@bb/domain
--filter=@bb/host-daemon-contract --filter=@bb/agent-runtime
--filter=@bb/server-contract --filter=@bb/server --filter=@bb/app`
- `pnpm exec turbo run typecheck --filter=@bb/plugin-sdk
--filter=@bb/templates --force`
…bb#1183)

## Summary

- mark selected sidebar rows so sticky tiers can provide an opaque
backing surface
- preserve the shared active-context tint above the sidebar background
- add regression coverage for the selected-row marker and two-layer
sticky surface

Fixes get-bb#1161

## Test plan

- `pnpm exec turbo run test --filter=@bb/app --
src/components/sidebar/sidebarRowClasses.test.ts
src/components/ui/theme.test.ts`
- `pnpm exec turbo run typecheck --filter=@bb/app`
- `pnpm exec turbo run lint --filter=@bb/app`
- verified the original scroll repro with dev-browser in light and dark
themes
…et-bb#1099)

## Problem

In the installed iPad PWA, there is no way to send a prompt from a Magic
Keyboard. Pressing Enter in the composer always inserts a newline, and
the only way to submit is to tap the send button.

The composer gates Enter-to-submit on pointer coarseness alone:

```ts
const canSubmitWithEnterKey = !isPointerCoarse;
```

An iPad reports a coarse pointer whether or not a hardware keyboard is
attached, so the hardware Enter is permanently routed to the newline
path. Making this device-wide would break the software keyboard, whose
Return must stay a newline.

Two details make the physical key hard to detect on this platform:

- ProseMirror deliberately defers iOS Enter handling and later replays a
**synthetic** Enter into `handleKeyDown`, so the software keyboard can
finish its own DOM mutation first. That synthetic event no longer
carries the physical `code`.
- The iPad software keyboard's Return arrives with an empty `code`,
while a Magic Keyboard Enter arrives as `code: "Enter"` (or
`"NumpadEnter"`).

## Fix

A custom ProseMirror DOM `keydown` hook now looks at the **original**
event before ProseMirror's deferral, and only on iPadOS WebKit. When
that original event carries a physical `Enter`/`NumpadEnter` code, the
existing key handler is invoked with `isOriginalIPadHardwareEnter`,
which enables Enter-to-submit for that one event:

```ts
const canSubmitWithEnterKey = !isPointerCoarse || isOriginalIPadHardwareEnter;
```

Device detection combines an Apple WebKit vendor/UA check with either
the legacy `iPad` platform or the modern desktop-like `MacIntel`
platform plus `maxTouchPoints > 2`, which is what distinguishes current
iPadOS from macOS.

Everything else keeps ProseMirror's normal path, including the software
keyboard's Return, which still inserts a newline.

## Steer/queue mapping is unchanged

No submit routing changed. `canSubmitWithEnterKey` simply moved from a
component-level constant to a per-event value inside the key handler.

- `steerActiveThreadOnEnter` off (default): Enter queues a follow-up,
Command+Enter steers.
- `steerActiveThreadOnEnter` on: Enter steers, Command+Enter queues.
- Shift+Enter inserts a newline; in zen mode unmodified Enter inserts a
newline too.
- On iPadOS, a Magic Keyboard Enter/Command+Enter now reaches exactly
these existing paths instead of being swallowed.

`FollowUpPromptBox.test.tsx` consolidates the two overlapping shortcut
tests into one parameterized case that asserts both settings, including
the scroll-to-bottom behavior that differs between queue and steer.

## Android and desktop safeguards

The interception is scoped as narrowly as possible, and both non-iPad
coarse-pointer cases are covered by tests:

- **Android** (Pixel Tablet, `Google Inc.` vendor, `Linux armv8l`)
reports `code: "Enter"` from its software keyboard. It fails the Apple
WebKit check, is never intercepted, and keeps Return as a newline.
- **Windows touch hybrids** (`Win32`, `maxTouchPoints: 10`) likewise
fail the vendor check and are untouched.
- **Fine-pointer desktop** is entirely unaffected — the hook is a no-op
there, and Enter-to-submit continues to run through the existing
`!isPointerCoarse` path.

## IME and typeahead

Composition is excluded on several fronts, so confirming a candidate
never submits:

- `view.composing`, `event.isComposing`, and `event.keyCode === 229` all
bail out.
- The hook mirrors ProseMirror's own Safari `compositionend` → `keydown`
safeguard with a 500 ms window. Because this DOM hook runs *before*
ProseMirror's keydown handler, skipping that safeguard would submit an
IME candidate confirmation.
- An event suppressed by that window is recorded in a `WeakSet`, so if
it later arrives through the normal handler it is still refused rather
than double-processed.

Typeahead is unaffected: with an open command or mention menu, a Magic
Keyboard Enter applies the highlighted suggestion (`/` → `/review `,
with the mention resource attached) and does **not** submit, matching
the fine-pointer behavior.

## Performance

- `isIPadOSWebKit()` is computed once per mount via `useMemo`. The value
is stable for the lifetime of the page, so no additional media-query or
event listener is registered.
- The keydown hook returns after a few boolean checks for every non-iPad
platform and every non-Enter key, so no per-keystroke cost is added
anywhere else.
- The composition guard is an O(1) timestamp comparison plus a `WeakSet`
lookup. Keying the set on the event object means entries are collected
along with the event, so it cannot grow unbounded.
- `canSubmitWithEnterKey` left the `useCallback` dependency list and was
replaced by `isPointerCoarse`, so handler identity churns no more often
than before.
- Assigning `handleEditorKeyDownRef` moved from `useEffect` to
`useLayoutEffect`, so the ref is current before any keydown can be
dispatched after a commit and a stale handler cannot fire in the same
frame.

## Documentation

Per the repository's rule that a user-facing behavior change updates its
discoverable surfaces in the same change, the Enter behavior is now
described in:

- `docs/configuration.md`
- the built-in `bb-cli` skill (`SKILL.md` and
`references/app-settings.md`)
- the bb guide template `bb-guide-customization.md` and its generated
counterpart

Each now states the typeahead exception, Shift+Enter and zen-mode
newlines, the coarse-pointer software-keyboard path, and the iPadOS
Magic Keyboard behavior.

## Validation

- **Tests:** 317 files and 2,384 app tests passed.
- **Typecheck:** app and templates passed.
- **Lint:** app passed, with existing warnings only.
- **Diff check:** passed.
- **Device verification:** confirmed on a physical iPad running the
installed PWA — a Magic Keyboard Enter submits, and the software
keyboard's Return still inserts a newline.

New coverage in `PromptBoxInternal.test.tsx` spans fine-pointer Enter,
Magic Keyboard Enter, software-keyboard Enter, Android, a Windows touch
hybrid, Shift+Enter, Command+Enter, IME composition, the
post-`compositionend` window, zen mode, and typeahead application.

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

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Co-authored-by: Sawyer Hood <[email protected]>
Refs get-bb#1191.

## Why

Issue get-bb#1191 asks for `bb.sdk.threads.list()` and
`bb.sdk.threads.update({ title })`. Both shipped on 2026-06-04, two
months before the issue. The problem is discoverability: the
plugin-authoring skill documents `threads.spawn`, `threads.send`, and
`threads.get`, but never `list` or `update` — and it leaves nine
`bb.sdk` areas out entirely. A plugin author who reads the skill
concludes the APIs do not exist.

## What changed

**`SKILL.md` — an SDK area map.** The skill covered `threads`,
`projects`, `files`, `terminals`, and `subscribe`. It never mentioned
`hosts`, `providers`, `skills`, `plugins`, `theme`, `status`, `system`,
`threadSections`, or `guide`. The new table lists all 14 areas, their 8
sub-areas, and every method name, with a pointer to
`types/bb-plugin-sdk.d.ts` for exact signatures.

**`SKILL.md` — thread read/edit and event timing.** A worked example for
`threads.list` / `get` / `timeline` / `update`, plus the third point the
issue raised: `thread.created` fires on row creation, before the first
user message lands, so a plugin should listen on `thread.active` and
read messages with `threads.timeline`. Handlers dispatch fire-and-forget
through `setImmediate` after the transition settles, so `threads.update`
from a handler cannot delay or interrupt a turn.

**`api_to_audit.md` — one missing entry.** `AGENTS.md` requires every
`experimental_` member to have an audit entry.
`experimental_useSidebarThreadSplit` had none. The new entry lists three
things to audit before the prefix drops.

## Verification

I swept four surfaces by script rather than by eye:

| Surface | Result |
| --- | --- |
| `bb.sdk` areas (15) | 9 undocumented → now covered |
| Backend `BbPluginApi` members (17) and their methods | already
complete |
| Frontend slots (11) and hooks/components (17) | already complete |
| `experimental_` members vs `api_to_audit.md` | 1 missing → added |

The area map is checked against the 22 source interfaces: no invented
method names, no missing ones. Documentation only — no code or wire
changes.

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

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
SawyerHood and others added 29 commits August 14, 2026 17:05
Layer 3/4 of the plugin marketplace stack. Prerequisite: get-bb#1580 (official
marketplace catalog).

## Summary
- Git plugin sources can now specify a semver range resolved against
tags: `git ls-remote` listing with annotated-tag peeling,
`[tagPrefix]vX.Y.Z` filtering, highest-satisfying selection with
npm-parity prerelease rules. `tagPrefix` supports monorepo per-plugin
tagging.
- Records the resolved tag and its commit, and refuses any later
resolution where a recorded tag points elsewhere — a moved tag is a
security error naming both commits, applied to range tracking and
exact-tag pins alike (legacy rows without a recorded commit are handled
without false positives). Missing recorded tags stop updates.
- Direct-install syntax: `git:<url>@^1.2.0` resolves over tags when no
ref of that literal name exists; a collision fails loudly with
`@ref:<name>` / `@semver:[<prefix>:]<range>` escape hatches. Bare
version tokens (`v1`, `v1.2.3`) stay literal tags. `--tag-prefix` added.
- Persistence via generated Drizzle migration 0095 models the selector
as a union (ref pair XOR range trio) with corrupt-row rejection;
marketplace git entries gain the `range`/`tagPrefix` variant with
JSON-schema parity, generating explicit `@semver:` specs so a
coincidental branch name can never shadow a listing's intent.
- Fixes two latent bugs found en route: a crash on `*` ranges in
prerelease detection (affected `npm:pkg@*`), and silent 8 KB output
truncation that could resolve a range against an incomplete tag listing
(now a byte-bounded declared cap that fails past the limit).

## Validation
Standalone green: workspace typecheck; server/cli/db/integration suites
(known umask failure aside). Tests cover tag filtering/ordering,
prerelease in/out, moved-tag refusal for both selector kinds, legacy
exact-tag movement, ambiguity errors, and corrupt selector rows.

> AGENT GENERATED: by Claude Fable 5

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Top layer (4/4) of the plugin marketplace stack. Prerequisite: get-bb#1581
(git tag semver).

## Summary
- Adds the marketplace registry: `bb marketplace add | list | refresh |
remove` over new validated routes, accepting an https manifest URL,
`git:<url>[@ref]`, or `path:<dir>`. The manifest's own name is its
identity; collisions and the reserved `bb-official` are refused;
identity drift on refresh is rejected. Adding installs nothing.
- Install routing: `bb plugin install <entry>@<marketplace>`; a bare id
resolves across marketplaces (one match installs, several fail listing
qualified choices), with every existing source form untouched.
- Trust UX: a new install-plan endpoint reports the true resolved source
(npm package/range/registry, or git url/ref/range/subdir plus the exact
tag and commit) before anything runs; the CLI prompt and app dialog
render it, and the server verifies the approved facts — including the
git commit — at install time.
- Server-side fetch policy for third-party content: HTTPS on 443 only,
public DNS results, no credentials, no redirects; applied to manifests
and icons. Local marketplaces use real-path containment; git
marketplaces stage into a throwaway checkout that is cleaned up on the
next operation after a crash.
- Removal disposition: one transaction converts installed plugins to
`direct` provenance retaining full source intent and exact resolution —
update checks keep working afterward — then deletes catalog rows and
icons. Re-adding the same marketplace works.
- Browse groups by marketplace (official first) with tag-derived
sections; cards show authors and, for third-party entries, their
marketplace. Settings gains a Plugin marketplaces section mirroring the
CLI. SDK (`plugins.marketplaces.*`, `catalog.installPlan`), guide, and
skills updated in the same change.

## Validation
Standalone green: workspace typecheck and lint;
server/app/cli/db/integration suites (known umask failure aside).
End-to-end tests cover the add → install-with-plan → range update →
moved-tag refusal → removal → still-updates-as-direct lifecycle, icon
isolation, SSRF policy, and re-add.

No server↔daemon wire shape changes anywhere in the stack; protocol
version 119 is unchanged deliberately.

> AGENT GENERATED: by Claude Fable 5

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Summary

- add one shared new-thread composer that owns picker configuration,
drafts, attachments, project switching, and request construction for
both the root page and plugin SDK adapter
- add one shared secondary-panel layout that owns desktop sizing,
compact drawer realization, native browser readiness, and hosted-pane
registration for root compose and thread detail
- leave page-specific welcome, fork, machine setup, metadata, timeline,
and macOS chrome behavior in thin wrappers
- centralize behavior-heavy tests and remove the resolved
duplicated-assembly audit item

## Testing

- pnpm exec turbo run typecheck --filter=@bb/app
- pnpm exec turbo run test --filter=@bb/app --force (341 files, 2,704
tests)
- pnpm exec turbo run build --filter=@bb/app

> AGENT GENERATED: by GPT-5 Codex
Handle DA1 queries at the host PTY boundary so shells do not time out while the browser terminal is detached. Remove handled queries from replay output to prevent duplicate responses after reconnects.

Amp-Thread-ID: https://ampcode.com/threads/T-019ffee9-be44-75c0-bd8a-1c653b61f62a
Co-authored-by: Amp <[email protected]>
Answer at most 8 DA1 queries for each PTY output chunk with a single write.
A flooded chunk could otherwise fill the unbounded node-pty write queue.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Negotiate the unstable ACP fork capability, route session/fork through the existing thread fork path, and persist the returned child session identity.

Amp-Thread-ID: https://ampcode.com/threads/T-019ffeea-31bc-70de-833b-bf6045f8578d
Co-authored-by: Amp <[email protected]>
Reject a cross-provider fork at the server boundary, a checkpoint fork that
ACP session/fork cannot honor, and a fork result that reuses an active
session ID.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Report Codex native subagents as open thread work, isolate a failed release
from later candidates, refresh ACP restore support when a settings change
replaces the session, and state that the experiment extends existing Codex
release rather than gating it.

Protocol version 122 now also covers the terminal device-attribute handler and
the ACP fork route that ship in the same stack.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
## Summary

- remove the stale Claude-only gate for sticky thread model and
reasoning overrides
- validate every override against the thread provider's active model
catalog, while retaining the requirement to start a new thread when
changing providers
- add route coverage for Codex, Claude Code, Pi, and ACP and document
how sticky overrides differ from per-turn follow-up overrides

## Context

The original implementation explicitly gated Codex out for v1. That
policy became stale: follow-up requests already send changed model and
reasoning settings through the same next-turn/runtime reconfiguration
paths, and the Codex, Pi, and ACP resume adapters all apply those
settings today.

Deleting the now-always-supported capability avoids rejecting future and
dynamically configured ACP providers through a second provider
allowlist.

## Testing

- `pnpm exec turbo run test --filter=@bb/server --
test/public/public-threads.execution-override.test.ts
test/services/threads/thread-execution-override.test.ts`
- `pnpm exec turbo run test --filter=@bb/agent-providers
--filter=@bb/templates`
- `pnpm exec turbo run typecheck --filter=@bb/server
--filter=@bb/agent-providers --filter=@bb/templates`

> AGENT GENERATED: by GPT-5
## Summary

- preserve the complete text of delta-only assistant, plan, and
reasoning items when an active turn crosses the timeline event budget
- supersede in-flight timeline reads and cancel paced trailing refetches
when `turn/completed` arrives, preventing an active-turn projection from
landing after the canonical completed projection
- snap the authoritative active-to-completed timeline height replacement
while preserving normal streaming height transitions and observer state
- add provider-shaped regression coverage for the sequence-window
closure and client completion handoff

## Problem

Pi, Claude, and ACP can begin assistant text with
`item/agentMessage/delta` and never emit `item/started`. When an
unfinished turn crossed the event budget, whole-item closure only
recognized buffered text through a backfilled `item/started` row. A
window cut inside a delta-only message therefore projected only the
suffix inside the budget instead of carrying its earlier deltas forward.

Completion then replaced that suffix with the canonical full
`item/completed` text. The normal streaming invalidation path
deliberately avoids cancelling active reads and schedules a paced
trailing refetch, so an older suffix projection could also land around
the terminal boundary before the trailing fetch restored the completed
shape. Animating the whole timeline height made these replacements look
like the response was streaming in reverse.

## Fix

Whole-item closure now identifies unfinished buffered text from either
its lifecycle row or its in-window delta event type, then uses the
existing prefix query to reconstruct the complete item. This is
provider-independent and also handles already-stored delta-only threads.

The client keeps its non-cancelling behavior for ordinary stream events.
Only the authoritative `turn/completed` boundary cancels obsolete work
and immediately requests the terminal shape. The completed-turn topology
replacement snaps through the existing zero-duration height path without
reinstalling the `ResizeObserver`, so settle and resize state remain
intact.

## Testing

- full `@bb/app` suite — 341 files and 2,707 tests passed
- full `@bb/server` suite — 166 files and 1,506 tests passed
- focused regressions after the final rebase — 46 app tests and 22
server pagination tests passed
- `pnpm exec turbo run typecheck --filter=@bb/server`
- `pnpm exec turbo run typecheck --filter=@bb/app`
- `git diff --check`

> AGENT GENERATED: by GPT-5.6
## Summary

- enrich ordinary untracked workspace status with exact line counts when
the snapshot fits both a 50-file and 8 MiB budget
- keep watcher invalidation cheap and content-free while retaining rich
file paths and statuses for larger snapshots
- return an exact bounded leading slice for diffs above 500 files, with
an explicit truncated signal instead of rejecting the diff
- preserve full-diff rename classification while bounding both
name-status and numstat streams
- keep tracked and untracked stats independent, enrich eligible files
around nested repositories, and cap optional status enrichment with a
10-second deadline
- surface exact line counts for the shown truncated slice in the app and
preserve truncation in the CLI
- bump the host daemon protocol to 123 and the plugin SDK to 0.4.6 after
rebasing over the versions already claimed on main

## Why

2292db1 correctly bounded process count, output buffers, and untracked
content work, but it removed useful line stats from every untracked
status and made all diffs above the ceiling unavailable. This keeps
those resource guarantees while restoring exact presentation for
ordinary cases and useful partial results for oversized diffs.

## Verification

- affected typechecks across app, CLI, host daemon, server, contracts,
host workspace, domain, plugin SDK, and templates
- app: 2,722 tests passed
- host daemon: 562 tests passed
- host workspace: 213 tests passed
- CLI: 449 tests passed
- plugin SDK: 86 tests passed
- domain: 141 tests passed
- templates and targeted host-daemon contract suites passed
- git diff --check

> AGENT GENERATED: by GPT-5.6
## Summary

- find Pierre source lines inside the renderer's open shadow root
- rerun target-line scrolling when the worker-backed code view mounts or
swaps to highlighted output
- center the target through the panel's vertical scroll offset without
touching Pierre's horizontal code scroller
- scope target lookup and cleanup to the active file preview
- add regression coverage for delayed worker readiness, shadow-root line
markup, and horizontal-scroll preservation

## Testing

- `pnpm exec turbo run test --filter=@bb/app --force -- --run
src/components/secondary-panel/FilePreview.test.tsx` (14/14)
- `pnpm exec turbo run typecheck --filter=@bb/app`
- `pnpm exec turbo run lint --filter=@bb/app` (passes with existing
warnings)
- SawyerHood/dev-browser against the real dev app: clicked an assistant
`file://.../FilePreview.tsx#L1100` link with Pierre's inner code
scroller preset to `scrollLeft=240`; confirmed line 1100 was selected
and fully visible after vertical scrolling to `scrollTop=19417`, while
horizontal scroll remained exactly `240`

> AGENT GENERATED: by GPT-5.6 Codex
Delay local helper discovery until the user explicitly enables local editor integration, improve state-specific guidance, and document remote-browser setup and troubleshooting.
A marketplace listing declared `engines.bb` and `engines.bbPluginSdk`, and
bb judged an entry's compatibility from those ranges before it fetched
anything. A listing's copy of a range is a second source of truth: it goes
stale the moment the plugin publishes a new version, and a stale range hides
a plugin that this bb can in fact run.

Drop `engines` from the marketplace schema, the published JSON schema, and
the bundled seed. The store now offers every listed entry, and the install
pipeline reads `engines.bb` and `engines.bbPluginSdk` from the fetched
plugin's own package.json and refuses there. That check already ran on every
managed git and npm install; catalog installs use the same paths.

This also fixes an empty first-run catalog: both seed entries declared
`bbPluginSdk: "^0.5.0"` while PLUGIN_SDK_VERSION is 0.4.5, so both evaluated
as incompatible and the Browse tab filtered them out.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`registerInstalled` skipped `validateInstallDir` whenever a caller passed
`validated: true`, and every cache-hit path does. The engine and SDK checks
live inside that call, so `refuseEngineMismatch: true` was silently ignored
on exactly those paths: a cached artifact bb accepted before a version change
could register again even when this build cannot run it.

Move the check to `registerInstalled` itself, the one chokepoint every
managed registration passes through, so the plugin's package.json is read on
every path rather than only on a fresh materialization.

Found by SlopCop on get-bb#1617.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…pace (get-bb#1565)

A path-sourced plugin installed from inside a bb-managed workspace
(<dataDir>/personal-workspaces/env_*/ or <dataDir>/worktrees/) is silently
deleted when that environment is destroyed (e.g. when the owning thread is
archived). The env teardown path in packages/host-workspace/src/provision.ts
recursively removes the workspace directory with no awareness of registered
plugins whose source_path lives beneath it, leaving the plugin permanently
"missing (reinstall)" with its source gone.

This is the cheapest of the three fixes proposed in get-bb#1565: emit a logger.warn
at install time so users know the source is ephemeral and can reinstall from a
stable path. It reuses the existing isBbManagedWorkspacePath predicate already
used for thread path-claims, and does not change install behavior.

Tested: new case in plugin-service.test.ts asserts the warning fires for an
install under <dataDir>/personal-workspaces/env_*.

Refs get-bb#1565
## Summary

PR get-bb#1137 moved the macOS desktop job to a `macos-15-intel` runner and
made one Electron Builder invocation package both arm64 and x64. Desktop
release time went from about 12 minutes to about 40 minutes. Every step
paid the slower Intel runner, and notarization ran twice.

We do not want Intel Mac artifacts, so this reverts to arm64-only.

- macOS jobs in `build-desktop.yml` and `publish-bb-app.yml` return to
`macos-15` and verify arm64.
- DMG and ZIP targets return to `["arm64"]`.
- `desktop:build` and `package` pass `--arm64` again.

The Linux job stays as it is. It runs in parallel and does not extend
the critical path.

## Beyond a plain revert

A plain `git revert` was not sufficient, because get-bb#1501 added the Linux
job after get-bb#1137 landed.

1. The revert conflicted in both workflows and in
`apps/desktop/package.json`. The auto-merge also renamed the nightly
macOS **upload** artifact without renaming its matching **download**,
which would have broken the nightly publish job. All four
upload/download artifact-name pairs now agree.
2. `README.md` said Intel Mac and Linux users should run `npx`. PR get-bb#1501
never updated it, so the revert restored a sentence that is now wrong
about Linux. It now names macOS arm64 and marks the Linux AppImage
alpha. `apps/desktop/README.md` claimed "macOS-only", which contradicted
its own Linux section; the arm64 claim is now scoped to the macOS build.

## Test coverage

`electron-builder-config.test.ts` asserted the Linux arch but not the
macOS arch, so no test caught this regression. This PR adds the macOS
arm64-only assertion to the schema and a test that names the
release-time cost.

## Validation

```
pnpm exec turbo run test typecheck --filter=@bb/desktop --filter=bb-app --force
```

- Typecheck passes for `@bb/desktop` and `bb-app`.
- 191 desktop tests pass, including 22 in
`electron-builder-config.test.ts`.
- Four desktop test files fail on this Linux machine with "Electron
failed to install correctly": `desktop-window-factory`,
`existing-server-dialog`, `window-state`, `preload-build`. I confirmed
via `git stash` that the identical four fail on the unmodified base, so
this is a missing Electron binary in the local worktree, not a
regression.
- Both workflow files parse as YAML. `actionlint` is not installed
locally, so CI is the first real lint.

## Risks

The macOS artifact name changes from `bb-desktop-macos-arm64-x64` back
to `bb-desktop-macos-arm64`. Upload and download are updated together in
the same workflow run, so there is no cross-run dependency. Anyone on an
Intel Mac who installed the x64 build from a release this week will stop
receiving updates and should switch to `npx`.

> AGENT GENERATED: by Claude Opus 5

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…ommunity (get-bb#1628)

## What

The marketplace BB curates now lists as **BB Community**, and the store
says who published each plugin instead of calling everything "BB
Official".

The companion change is in `get-bb/marketplace`
([e4b9894](get-bb/marketplace@e4b9894),
already on `main`), which renames the manifest and credits Bersabel
Tadesse for Prompt Improver and Thread Hover Cards.

## Publisher, not "official"

The server sends a `publisherLabel` and every surface renders that one
value:

| Plugin | Label |
| --- | --- |
| Bundled with the app | `BB Official` |
| Installed from the curated marketplace | `BB Community` |
| Listed by a third-party marketplace | that marketplace's display name
|
| Installed from a source by the user | none — no pill |

It shows beside the plugin name in Browse, on the detail page **before**
installation, in the installed list, and on the installed detail page.

The installed **Type filter** follows the same field, so its facets are
the publishers that actually installed a plugin plus `User`. Adding a
marketplace adds its facet with no list to update, and a selection is
intersected with the facets on offer so uninstalling the last plugin of
one cannot strand an empty list with no menu row left to clear.

Browse groups by publisher rather than by marketplace. Grouping by
marketplace filed all 13 bundled plugins under the curated marketplace's
heading and told the user BB Community wrote plugins that ship in the
build.

## `bb-official` → `bb-community`

The reserved name is the key BB registers the marketplace under, and it
must equal the `name` in the published manifest. **No released BB
registers this marketplace** — the feature commit is an ancestor of
neither `desktop-v0.37.0`, `desktop-latest`, nor `desktop-nightly` — so
the rename breaks no installed client. Renaming after release would have
permanently broken catalog refresh everywhere.

Development databases do have the row, because BB registers it on
startup. Migration `0098` moves the marketplace row, its cached icons,
and every catalog install together; a partial move would leave installs
naming a dead key and the store would list every entry twice. I hit
exactly that locally before writing it.

The `OFFICIAL_*` constants held the string `"bb-community"`, so they are
now `CURATED_*` and `official-marketplace.ts` is
`curated-marketplace.ts`. The `official` boolean keeps its name — it
means the reserved marketplace BB reviews, which is still true of this
one.

## Install confirmation

It called every catalog entry official, including community and
third-party listings. It now names the publisher, and a bundled plugin
drops the claim rather than repeating it. The full-trust note now names
what the trust covers — the computer, not just local bb data — and a
long git ref scrolls on one line instead of wrapping across three and
shoving the buttons down.

## Tests

- `turbo run typecheck` — 58/58 pass
- `@bb/app` 347 files, `@bb/cli` 49, `@bb/db` 29, `@bb/server-contract`
6 — all pass
- `@bb/server` 174/175 — `test/internal/internal-skill-trees.test.ts`
fails, verified failing identically on a clean `main` checkout by
stashing; pre-existing and unrelated
- New: publisher-label resolution (`marketplace-publishers.test.ts`),
migration 0098, the vanished-facet case in `PluginsOverview.test.tsx`
(confirmed non-vacuous — it fails without the fix)
- Manually verified in the dev app via headless browser: Browse
grouping, both install dialogs, and the scrolling source line

## Risks

- Requires the registry rename to be live, which it is. A BB built from
this branch talking to a manifest still named `bb-official` would refuse
the refresh on the name check, and vice versa.
- `bb marketplace list` widened its Name column from 22 to 24;
`bb-community (official)` is 23 characters and was being truncated.

> AGENT GENERATED: by Claude Opus 5

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Summary

- bump bb-app and the desktop app to 0.38.0
- add release notes for the Extensions Page, plugin marketplaces,
community plugins, and Linux Alpha
- add the August 15 website changelog metadata

## Validation

- `node .github/workflows/check-version-lockstep.mjs`
- `node packages/plugin-sdk/scripts/check-npm-version-guard.mjs`
- `umask 022 && pnpm exec turbo run typecheck test --filter=@bb/config
--filter=@bb/server --filter=bb-app --filter=@bb/web`
- `umask 022 && pnpm exec turbo run smoke:tarball --filter=bb-app
--force`
- `git diff --check`

## Release note

`@get-bb/[email protected]` is not on npm yet. The release workflow will
publish it with bb-app 0.38.0.

> AGENT GENERATED: by Codex GPT-5
## Summary

- default line-linked HTML files to rendered Preview
- preserve Raw access and source targeting for ordinary code files
- add regression coverage for HTML previews carrying a line range

## Testing

- `pnpm exec turbo run test --filter=@bb/app --force -- --run
src/components/secondary-panel/FilePreview.test.tsx`
- `pnpm exec turbo run typecheck --filter=@bb/app`
- `git diff --check`

> AGENT GENERATED: by GPT-5.6 Codex
## Summary

- reload the sandboxed HTML iframe when the fetched source revision
changes
- keep the iframe stable across unrelated renders and Preview/Raw
visibility toggles
- add regression coverage for both reload and stability behavior

## Root cause

Realtime invalidation refetched the HTML source, but the iframe raw URL
stayed stable, leaving the existing rendered document mounted.

## Tests

- `pnpm exec turbo run test --filter=@bb/app --
src/components/secondary-panel/FilePreview.test.tsx` (15 tests)
- `pnpm exec turbo run typecheck --filter=@bb/app`
- `pnpm exec turbo run lint --filter=@bb/app` (0 errors; existing
warnings only)

> AGENT GENERATED: by GPT-5 Codex
Completes the inline-visualization two-step: the in-thread icon still opens
the file in the sidebar, and the sidebar preview header now offers an
"Open in external browser" action that loads the rendered page full-page in
the user's default browser.

The button appears only for the rendered-HTML preview states (`html` and
`iframe`) — every other state is text the app renders itself, with no page a
browser could open.

Two details worth keeping:

- It resolves the preview URL to an absolute address first. The preview route
  is an app-relative path, and the desktop main process validates for
  `http:`/`https:` and silently returns on anything else, so handing it the
  relative path would be a dead button with no error. A test pins this.
- It uses `openUrlInExternalBrowser` rather than `useOpenUrlByPreference`.
  The latter honours the "open links in the in-app browser" preference and
  would route the visualization back into bb's own browser panel, which is
  not the external browser the action promises.

The icon is `Globe`, not `ExternalLink`: the adjacent OpenInEditorButton
already spends `ExternalLink` on a different destination, and reusing it put
two identical icons side by side in the same toolbar.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@brsbl brsbl closed this Aug 15, 2026
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.