Skip to content

Sync upstream desktop-v0.48.0 - #360

Merged
albrand merged 166 commits into
oursfrom
sync/upstream-0.48.0
Oct 29, 2026
Merged

albrand merged 166 commits into
oursfrom
sync/upstream-0.48.0

Conversation

@albrand

@albrand albrand commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

ours was based on upstream desktop-v0.47.1. Upstream main at 64248c32fa (desktop-v0.48.0) carries about 150 commits the fork lacks, including the "one thread screen" restructure, the Git plugin extracted to plugins/git, scroll-keeper floor elements and unread-divider anchors, HostToolchain/spawnHostProcess, batched PR status reads, and a data-only migration. A merge hit 121 conflicts, so the scheduled sync run failed without touching ours. This PR is the hand-resolved merge, with fork behaviour winning wherever the two sides disagree.

No issue: issues disabled.

What changed

Merge of upstream/main @ 64248c32fa into ours @ 9571e64f78, then origin/ours merged again, last at 46fbf5fa02. No upstream commit after 64248c32fa is taken (upstream/main has since moved).

Bundle budget: apps/app/bundle-budget.json boot caps rose to 1,610,000 raw / 394,500 Brotli bytes (from 1,592,519 / 390,656). The merge CI build measured 1570.6 KB / 384.6 KB; clean builds on one host measured ours 92a7c2d5e3 at 1545.5 / 376.0 KB and upstream desktop-v0.48.0 alone at 1479.5 / 373.2 KB. The ThreadPage closure shrank 69 KB raw, so boot plus ThreadPage fell from 3203.9 to 3160.2 KB. The note in the file records this; the moved code was not individually attributed.

Protocol: HOST_DAEMON_PROTOCOL_VERSION = 258 (upstream 257, ours 255, so max+1).

Dependencies: none added beyond upstream's own (expo 58 set, @bb/async-cache, @bb/file-transfer, @bb/process-utils and @bb/plugin-build workspace links, bb-plugin-bb--git, version 0.48.0). pnpm-lock.yaml started from upstream's lockfile and pnpm install --lockfile-only added the fork's dependencies only.

Database: fork migration 0147_fork_reconciled_schema kept; upstream's data-only migration is renumbered 0148_git_and_pr_status_plugin_show_settings (when after the live last-applied migration) with a snapshot chained from the fork's 0147.

.github/workflows/ci.yml (all upstream hunks rejected, file identical to ours; 15 hunks counted at -U1 against the merge base):

  1. new windows-dependency-cache job (Warm Windows dependencies)
  2. to 5. "Restore Windows dependency disk" step in four Windows jobs
  3. "Restore npm package downloads" step in package smoke
  4. "Save newly populated npm downloads" step
  5. PLUGIN_SHARD and TEST_FILTERS env in Windows tests
  6. plugin-shard --filter selection logic in Windows tests
  7. VITEST_MAX_WORKERS for app- shards
  8. setup-bun condition startsWith(matrix.shard, 'plugins-')
  9. VITEST_MAX_WORKERS expression for server/integration shards
  10. VITEST_MAX_WORKERS: "2" in check-plugin-forks
  11. "Package Linux artifacts and smoke bb-app tarball" step (and the non-Linux condition on the old step)
  12. removal of the separate "Package Linux AppImage" step

mobile-e2e.yml: runner macos-15 to macos-27 and Xcode 27.1 rejected (runner policy); file restored from ours. Taken from upstream (not workflows, unreferenced by fork CI): three .github/actions/* composite actions, check-plugin-sdk-version.mjs, APPROVED_CONTRIBUTORS.

Conflict resolution by area (fork wins):

  • Thread screen (ThreadScreen.tsx replaces ThreadTimelinePane, ThreadTimelinePanelContent, EmbeddedThreadChat, which are deleted). Re-sited into it: threadIsActive, native-terminal ongoing indicator, pending-interactions query gate, scrollAnchorMode latest/restore, content-measure width, side-chat consumer actions, workspace sharing count.
  • Scroll keeper: upstream floor element, landmarks, remeasure and window-find taken. Fork behaviour kept by editing upstream code: passive shrink clamp stays detached (persistent attachHold), a restored saved reading position stays detached for 1 s then attaches, wheel/key/touchmove attach-on-intent restored. Upstream's private attachIfAtEnd is renamed attachDetachedAtEnd to coexist with the fork's public one.
  • Unread divider: fork snapshot machine kept (ready waits for non-placeholder data, so mark-read needs fresh data). Unread threads open at latest (fork). Upstream's landing on the divider applies only while opening, via a new landOnDivider flag plumbed through timelineHost.unreadDividerAutoScroll, ThreadTimelineSurface and Rows.
  • Terminal find: fork TerminalSearch (search add-on) replaces upstream TerminalFindBar; the terminal.find command opens it. Search selections no longer trigger copy-on-select or the selection menu while search is open (upstream behaviour, applied to the fork's search). Upstream file links, OSC7 cwd and link activation kept.
  • Server: server.ts, hub.ts, plugin-api.ts, plugin-runtime.ts, plugin-service.ts, public-api.ts: union with fork routes (device handoff, native terminal, spend, writing assistance, thread row state), fork resize-echo websocket protocol, event-loop labels, registerClient(socket, isAppClient). Upstream tag-notification timeline deltas are gone upstream, so the fork-only packages/server-contract/test/payload-size.test.ts is deleted with them.
  • Host daemon / process utils: upstream spawnHostProcess/execHostFile/HostToolchain taken; fork /proc readers, group live members, bounded log append, agent-session env strip kept. desktop-shell-path deleted upstream; the fork's 10 s login-shell probe timeout is ported to PROBE_TIMEOUT_MS and the upstream stuck-shell test bound is loosened for the two probes.
  • Desktop main/preload/update-ipc: union of fork sign-in window and upstream channels.

Upstream code edited to keep fork behaviour (files that differ from upstream with no fork delta on ours, 22): mobile-e2e.yml, PluginThreadChat.tsx (passes hasUnseenTimelineEvents), PendingInteractionsQueryBanner.tsx, TerminalFindBar.tsx (removed), RootComposeHome.tsx, ThreadScreen.tsx, useThreadDetailThread.ts, useSideChatConsumerMessageActions.ts, thread-runtime-mutations.ts (useCreateThreadQueuedMessage kept for send-to-main), plugin-hook-registry.ts (invokeHook takes any registration object), drizzle 0148 + snapshot, host-toolchain.ts and its test, and the test files listed below.

Fork tests adapted to upstream changes: provider-claude-code execHostFile mock and resolved claude path; github-pr-status tests move to the batched views RPC and wait for the stale-while-revalidate refresh; ThreadRow display-contents wrapper; cache-owner registry sync; sidebar navigation tests await the lazy plugin mount; ThreadActionsMenu expectations follow the fork menu (Open beside, Open above or below, Move to project); scroll-keeper passive-shrink tests run with floor: false; the restored-row-at-end test now expects detached (reason in test title); thread-opening model test mocks AutoHeightContainer as a passthrough (the fork wrapper's fixed pixel height deadlocks upstream's fake flow layout); terminal command tests use the fork search UI; cold-load renderer test waits up to 10 s for the first module transform.

How you verified

On hsrpc via remote-heavy.sh, on the merge before the final origin/ours merge: turbo typecheck (117 tasks) and turbo lint green; @bb/app 739 files, 7451 tests, 1 timing flake that passes alone; @bb/server four shards, 1 load timeout in install-machine-script (fails the same way on upstream 3bacfac9ed on this host); @bb/db 776 tests; @bb/app build; @bb/web plugin-guide. protocol-self-update "finds npm beside the running Node executable" fails on hsrpc on upstream too (host PATH). After merging origin/ours @ 92a7c2d5e3: turbo typecheck lint 173/173 tasks green (the first run caught a missing CreateQueuedMessageRequest import, fixed in 649c5c3f2a); @bb/app thread, thread-detail and lib tests 283 files green; @bb/server hosts/public/internal/threads/ws 153 files green; cli, sdk, server-contract, db, provider-claude-code green. On hsrpc plugins/account-pool/src/thread-tokens-suspend.test.ts runs out of heap in its worker (95 of 96 tests pass first); the packages shard passes it in CI.

CI at head 4b02eb3ebb: all checks pass (Checks, Package Smoke ubuntu and macOS, Plugin Fork Check, Tests app-1/2/3, integration, packages, server). Tests (packages) failed once on a 15 s timeout in @bb/host-daemon src/injected-skills.test.ts (passes alone and passed on the previous head) and passed on the re-run of that job.

Both-parents loss scan (~/projects/bb-fork-tools/merge-both-parents-loss.sh, lines present in both parents and absent from the result): at the head, 0 files and 0 lines lost, with 18 allowlisted lines in 6 files, each with a reason (intended fork-wins reshaping). It found one real drop: history.back and history.forward had lost the browserFocus guard (mainWithoutModalOrBrowser) in app-keybindings.ts; restored in 7338af0570, with the existing server test expectation brought back to upstream's and a new test for it (95eede79d1). At 7c6e5eca68 the test file fails 2 tests (the new one and the existing defaults test); at the head all 28 pass.

Hermes finding "merge dropped tag notifications (notifyTags, pendingTags, ui-preferences.ts)": not a loss. Upstream get-bb#6466 (a2829ad9df, before 64248c32fa) removed hub.notifyTags, the tags websocket message, CORE_TAG_SCOPE and route-tags.ts; UI preferences now notify through ui-preferences-changed via hub.notifySystem. The scan reports those lines only when the pre-get-bb#6466 tag desktop-v0.48.0 (1a4a1d254c) is used as the second parent; this PR merges 64248c32fa, 33 commits past that tag, as the brief set.

fork-features-check.sh at the head: all 99 rows present. Leftover scan (files differing from upstream with no fork delta): the 22 files above and nothing else; no upstream revert commits in the merged range.

Review round 2 (EmbeddedThreadChat and the one-sided scan):

  • Upstream b28bbc2c19 (Use one thread screen for the main view, side chat and plugin ThreadChat get-bb/bb#6387) deleted EmbeddedThreadChat, ThreadTimelinePanelContent and ThreadTimelinePane; ThreadScreen.tsx is their successor. Every fork change to those files is carried: Keep unseen thread openings on the latest content #109 scroll anchor (scrollAnchorMode, ThreadScreen.tsx:753), content width (CONTENT_MEASURE_MAX_WIDTH_CLASS, :810), native activity indicator and active indicator (:599-667), pending-interactions gate (:533, :678). ThreadScreen.test.tsx and ThreadDetailPromptArea.test.tsx gained tests for each (anchor mode, panel width, activity flag, gate banner/retry/composer hiding); each was shown to fail when its behavior is mutated.
  • Other upstream deletions that the fork had changed (10 files): the three above with their tests, apps/desktop/src/desktop-shell-path.ts and its two tests (probe now in packages/process-utils/src/host-toolchain.ts; the 10 s timeout and stdin-ignore bounds gained two tests), and packages/server-contract/test/payload-size.test.ts (no successor: upstream Shrink timeline pushes and diff idle windows against active ones get-bb/bb#6220 removed computeTimelineRowDelta).
  • The unread-divider hook dropped three upstream tests when the fork's snapshot machine replaced hasFreshThread; they are ported to the fork's API (7 tests in useThreadUnreadDividerState.test.ts).
  • merge-both-parents-loss.sh now also scans one-sided adds (exit 3), follows renames, treats a 20+ character line re-added elsewhere as relocated, prints skipped files with a count, and has a fixture test (merge-both-parents-loss.test.sh, 16 cases) and an allowlist evidence script. At the head: section 1 clean; one-sided hits (parent1 51 files/398 lines, parent2 44 files/312 lines, 128 and 20 relocated) are each explained as a deleted/renamed file whose job moved, a fork-wins line, an upstream refactor that reshaped the same code, or a union of list lines.

Review round 3: the fork's timeline payload-size gate has a successor, packages/server-contract/test/payload-size.test.ts, on the tag-based delta (computeThreadTimelineDelta): recorded budgets for a streamed row update and an appended row at 1, 20 and 100 rows, a size-independence check, a delta-versus-full check and an over-budget case that must throw. Three bloat mutants (full row order, every field, every row as an upsert) each fail it; it passes at the head. merge-both-parents-loss.sh no longer treats a line re-added in another file as relocated: such lines are listed in a section 3 with the destination file, count as hits (exit 3) and need an explanation or allowlist row; the fixture test has 18 cases, 4 of which fail against the previous script.

Review round 4: payload-size.test.ts now applies each computed delta to the previous window with applyThreadTimelineDelta and requires the result to deep-equal the expected next window (updated row content for a streamed update; appended row in order for an append), so a delta that is small but wrong fails. A fourth mutant (the delta never carries an upserted row) fails those assertions; the three size mutants still fail. merge-both-parents-loss.sh exits 4 with unsupported: no merge base when the parents share no history and the one-sided sections cannot run; --no-one-sided scans section 1 only and prints that sections 2 and 3 were skipped. The fixture test has 21 cases, 3 of them new.

AGENT GENERATED

ymichael and others added 30 commits October 24, 2026 07:33
## Human comments

## What was wrong

Windows CI repeatedly materializes pnpm's dependency tree on fresh
runners. A normal store cache is slower than downloading again:
controlled app installs took 24–32 seconds fresh versus 34–49 seconds
restoring and linking a store archive. Installed `node_modules` archives
also broke native dependency links. Research into T3 Code, Orca, and VS
Code and the measured alternatives are recorded in
[docs/ci-performance.md](docs/ci-performance.md).

## What changed

Restore an exact-key NTFS dependency image containing pnpm's content and
virtual stores, then retain every existing frozen install, install
filter, test shard, and packaging smoke. Restoring one file avoids
per-file archive extraction and preserves internal dependency links.
Missing or unusable images fall back to normal installs within a
separate one-minute restore budget.

A separate optional job on main/manual runs warms missing images and
saves them detached, before builds can modify dependencies. Consumers
never rewrite the cache or wait for the warmer. Keys cover dependency
manifests/configuration/patches, setup code, Node/pnpm,
Windows/architecture, and workspace paths. The small wrapper uses
`diskpart` because the maintained Dev Drive action requires Hyper-V
commands absent from Blacksmith's image.

## How you verified

- [Final PR CI](https://github.com/get-bb/bb/actions/runs/40068161773)
passed; all 45 PR checks are green. This also exercises normal
installations when the dependency image is absent.
- [Forced Windows
validation](https://github.com/get-bb/bb/actions/runs/40068075687)
passed all 16 Windows checks with Turbo hits disabled, including both
packaging smokes. Its real-disk checks also verified
create/detach/remount, preserved contents, and fresh-install fallback
for an occupied drive, missing stores, and a corrupt image. The
production action files are identical to the PR's final files.
- [Production-action
measurements](https://github.com/get-bb/bb/actions/runs/40067670163):
restore/mount plus frozen install took a median 14 seconds across all 16
Windows checks, ranging from 10–25 seconds.
- Controlled comparisons: [app
installs](https://github.com/get-bb/bb/actions/runs/40065422778)
improved from median 25 to 11 seconds; [broad
installs](https://github.com/get-bb/bb/actions/runs/40065673929)
improved from 30–44 to 15 seconds. All forced app/build-package tests
passed. Fresh ReFS alone provided no setup improvement.
- `pnpm exec turbo run test --filter=@bb/scripts
--output-logs=errors-only` passed (7 tasks). Actionlint, YAML parsing,
formatting, and `git diff --check` passed.

These measurements isolate dependency setup. They do not claim to
eliminate runner queues or uncached test execution time. The first run
after dependency changes remains a normal install while main warms the
new image.

> AGENT GENERATED
## Human comments

## What was wrong

Windows usually finishes last, but Linux plugin and standalone fork
checks also constrain PR latency. Pi's scripted subprocesses repeatedly
loaded its whole runtime entry point, Connect's server-move integration
test accidentally waited for an existing 25-second long poll, and
several app tests spent seconds on mock-query polling and real
enrollment timers. Repeated Markdown reference rendering and the single
Linux plugin group added further work and a long completion tail. Full
validation also exposed a real-clock account-test race and unnecessary
skill-scanner metadata lookups.

## What changed

Stacked on get-bb#6222, which adds Windows dependency-image reuse.

- Load the real pinned Pi SessionManager directly in the scripted
fixture; retain real CLI, public SDK persistence, settlement, and Bun
checks.
- Synchronize the Connect fixture's simulated RPC transport before
enabling the server-move freeze. Both real plugins, the real tunnel
socket, retry/resume assertions, and separate account timeout coverage
remain.
- Reuse identical independent Markdown reference renders; retain every
incremental render/assertion. Reduce polling intervals only in the
sequential mock-query helper and advance enrollment timers inside React
`act`.
- Skip ordinary supporting files before skill-scanner metadata lookups,
preserving actual skill, link, boundary, and command handling. This
removes 2,010 redundant calls from the existing 1,005-file fixture. Bump
the bundled SDK runtime to **0.6.80**, as required by the npm content
guard.
- Advance the account API malformed/null-response test with fake time
and fixed retry jitter through its unchanged 300ms deadline. A random
value of 0.66 reproduced the old error-classification failure
deterministically by landing a retry exactly on the deadline; the fixed
value of zero passes. The neighboring stale-answer test also uses fake
time through its unchanged 50ms deadline and background-refresh windows,
retaining expiry, retry-suppression, and recovery assertions.
- Start the slow Pi fork first within its existing shard and cap each
fork at two Vitest workers.
- Split Linux plugins into two balanced groups. **Windows app shards
remain at four**, now with four Vitest workers each. The net addition is
**one Linux job and zero Windows jobs**. All existing blocking coverage
remains.

The initial eight-Windows-shard experiment was removed: 15–19 seconds
earlier completion cost approximately 31% more app runner time. Fewer
shards with more workers were measured rather than assumed faster. No
test cases were deleted and no timeouts were increased. The scanner
optimization preserves discovery behavior; no wire or public API
contracts changed.

## How you verified

[Wait-removal
comparison](https://github.com/get-bb/bb/actions/runs/40075320364)
passed all eight jobs, including before/after replicas on each OS, with
identical test identities/counts/statuses:

| Test step | Before | After |
| --- | --- | --- |
| Windows Connect, 143 tests | 36, 37s | 12, 14s |
| Linux Connect, 143 tests | 34, 34s | 9, 11s |

Windows query-file execution fell from 4.66–4.69s to 1.31–1.47s (30
tests); enrollment-file execution fell from 3.37s to 0.39–0.59s (8
tests). Local Connect freeze-case timing fell from 25.2s to 0.19s while
preserving its assertions.

[Windows worker
comparison](https://github.com/get-bb/bb/actions/runs/40074965277),
using the same 6,303 app test identities:

| Arrangement | Longest test step | Result |
| --- | --- | --- |
| Four 4-vCPU shards, 3 workers each | 82s | Passed |
| Four 4-vCPU shards, 4 workers each | 73s | Passed; retained |
| Two 4-vCPU shards, 4 workers each | 137s | Passed |
| One 4-vCPU shard, 4 workers | 374s | Passed |
| One 16-vCPU shard, 12 workers | 160s | Passed |
| One 4-vCPU shard, 8 workers | 353s | Retry-button assertion failed;
rejected |

Actual CPU allocations were logged. The retained layout completed
including queue/setup/teardown in 122s versus 131s for three workers,
and consumed 392 versus 426 aggregate runner-seconds. These are
individual-run measurements with runner variability.

[Windows package-group worker
comparison](https://github.com/get-bb/bb/actions/runs/40077498353)
passed all four replicas with identical 41-task inventories on measured
4-vCPU runners. Two workers took 97–101s; three workers took 98–136s.
The slow three-worker replica also spent 56s building SDK types versus
23–35s elsewhere. This does not establish a consistent worker-count
improvement, so that setting remains unchanged. An earlier attempt
omitted required mobile dependencies and was excluded from the
comparison.

Earlier controlled measurements retained by this change: [Windows Pi
61–62s → 34–39s](https://github.com/get-bb/bb/actions/runs/40072329816),
[prepared Linux fork shard 84–85s →
60–72s](https://github.com/get-bb/bb/actions/runs/40072767336), and
[balanced Linux plugins 136s →
68s](https://github.com/get-bb/bb/actions/runs/40073666331). Group
savings are not additive whole-workflow savings.

[Timing-fix
comparison](https://github.com/get-bb/bb/actions/runs/40076120786)
passed both Windows control and candidate replicas with identical
inventories/statuses (2 skill-index tests; 39 passing and 51 existing
skipped Connect Next cases). Skill-index execution fell from 275–432ms
to 179–184ms. An earlier full run hit timing failures in those unchanged
tests; its remaining work was cancelled while these fixes were prepared.
Controlled baselines passed, so this is not presented as a deterministic
baseline correctness failure.

Local Turbo tests, CI-selection tests, lint/typecheck, actionlint, and
diff checks passed, including 14 SDK/skill-index/Connect Next
build/test/lint/typecheck tasks and the npm content guard. [Final full
CI 40077183131](https://github.com/get-bb/bb/actions/runs/40077183131)
passed on `42bf4d4e8f`: **42 successful jobs, including all 16 Windows
jobs**, with 2 jobs skipped by existing conditions. Workflow creation to
final completion was **3m12s**. This is an integration result, not a
controlled whole-workflow speedup measurement. Reviewed against the
repository code-review guide and test-audit/deslop guidance.

> AGENT GENERATED
## Human comments

## What was wrong

Linux server shards used only two Vitest workers on four-vCPU runners
while each shard ran one package, leaving parallelism unused. Windows
package smokes downloaded npm packages and native prebuilds again on
every job. Provider parity launched 70 real bridge replays for 48
scenarios because separate conformance tests repeated 22 scenarios
already covered by the self-suite. The update-resolver tests
independently constructed the same eight-commit Git repository seven
times, starting 245 Git setup processes. Both repeated work on the
Windows CI path after get-bb#6222 and get-bb#6225.

## What changed

- Cache only npm `_cacache` and `_prebuilds` for the Windows app smoke,
with exact dependency/Node/OS keys. Fresh npm/npx installations,
scripts, metadata refreshes, and assertions remain. Installed `_npx`
trees and consumer directories are excluded. Hard restore
failure/timeout leaves npm on its default cache; misses and suppressed
restore errors clear partial downloads before activation. Successful
misses save once, and exact hits remain immutable.
- Give each existing Linux server shard four Vitest workers. Other Linux
package groups retain two workers per package because several Turbo
tasks run concurrently. No extra shards or larger runners.
- Apply all five independent recorded conformance checks to the
self-suite's existing Claude, Codex, and Pi replay results before
event/timeline comparison. Keep the provider inventory assertions, all
48 replay scenarios, and all 59 test cases; remove 22 duplicate bridge
launches and 77 repeated runtime requests. Preserve startup throttling
and exported conformance helpers.
- Build the real Git fixture once, then copy its entire repository and
commit map per test. All 15 tests and assertions remain; moved and
deleted tags still affect independent repositories. This removes 210
repeated Git setup processes.
- Document the measurements and conformance ownership. No production
code, public API, protocol, dependency, SDK version, or shard-count
changes.

An SDK compiler-reuse experiment produced identical declarations but
inconsistent timing improvements, so it is excluded from this PR.

## How you verified

[Windows npm-cache comparison
40106037278](https://github.com/get-bb/bb/actions/runs/40106037278)
passed cold → restored-download → cold-again smokes on two runners:
**50.9 → 37.3 → 43.0s**, and **74.3 → 43.9 → 60.6s**. Local archive
creation took 1–3s and extraction 0–1s. On the final PR commit, the
[cold-cache
job](https://github.com/get-bb/bb/actions/runs/40107142996/job/120911379596)
passed its package smoke in **36.8s** and saved the cache successfully.
The [exact-hit
rerun](https://github.com/get-bb/bb/actions/runs/40107142996/job/120912184625)
restored the **68 MB** archive in **0.8s**, passed the fresh-install
smoke in **30.7s**, and correctly skipped saving. The smoke steps
including Turbo took 38s cold and 32s warm; the warm restore adds about
1s. These two jobs are an integration confirmation, with the repeated
controlled comparisons above providing the broader timing evidence.
Actual action code passed a local exact-hit/miss/suppressed-error check,
including removal of simulated partial prebuild archives. Turbo dry-run
confirmed that only the smoke receives the cache variable and the smoke
remains uncached. CI selection/workflow tests passed (30 tests), and
actionlint passed.

[Server worker comparison
40104954325](https://github.com/get-bb/bb/actions/runs/40104954325) ran
both existing shards twice per worker setting on four-vCPU Linux
runners. All four candidate jobs passed. The actual server test tasks
took **66–79s with two workers versus 46–60s with four**, excluding SDK
prerequisites. Whole steps took 85/95s versus 63/70s for shard 1, and
99s versus 72/81s for shard 2. One additional two-worker baseline failed
the unchanged bundled-dependency rebuild assertion and is excluded from
successful timings. All arrangements discovered the same **3,681 cases**
(3,680 passing and one existing skip in passing runs); only generated
timestamps in test names were normalized for inventory comparison.

Two controlled comparisons,
[40104010818](https://github.com/get-bb/bb/actions/runs/40104010818) and
[40104177343](https://github.com/get-bb/bb/actions/runs/40104177343),
each passed all eight jobs: two baseline and candidate replicas on each
of four-vCPU Windows and Linux runners.

| Measurement | Before | After |
| --- | --- | --- |
| Windows provider-parity test step, four replicas each | 31–33s; median
32s | 25–31s; median 26s |
| Linux provider-parity test step, four replicas each | 25–26s | 21–22s
|
| Windows update-resolver file, two replicas each | 4.00–4.02s |
1.76–3.32s |
| Linux update-resolver file, two replicas each | 0.79–0.94s |
0.41–0.55s |

The Git file measurements include shared fixture setup. The original
busy main run took 14.5s for this file; the table uses the controlled
comparison instead. These are component measurements, not additive
whole-CI savings. The benchmark also tried the excluded compiler change;
emitted declarations were byte-identical across both platforms, and
compiler prerequisites are excluded from the Git file measurement.

Independent mutation verification made all five Pi conformance checks
fail in both the old aggregate test and retained replay: dropped reply,
invalid event schema, duplicate turn start, missing completion, and
empty output. Dropped replies also failed both old and retained
Claude/Codex tests at the intended check. All mutations were restored
byte-for-byte; independent review found no issues.

Local Turbo validation passed: provider parity (59 tests), update
resolver (15 tests, also shuffled with seed 104), SDK (402 tests during
the rejected experiment), and lint/typecheck for server, provider
parity, and SDK. Formatting and diff checks passed. [Initial full PR CI
40104525770](https://github.com/get-bb/bb/actions/runs/40104525770)
passed all 41 selected jobs, including all 16 Windows jobs, on
`ae0c029fb0`. [Worker-allocation full PR CI
40105491281](https://github.com/get-bb/bb/actions/runs/40105491281)
passed all 41 selected jobs, including all 16 Windows jobs, on
`85a4a88ce2`, in **2m14s** from workflow creation to final completion.
Linux server steps took 74s and 56s; the previous PR run took 99s and
94s. Whole-workflow timing also includes cache and runner variability,
so the controlled component comparison above is the evidence for the
optimization. [Final full CI 40107142996, attempt
1](https://github.com/get-bb/bb/actions/runs/40107142996/attempts/1)
passed all **41 selected jobs, including all 16 Windows jobs**, on
`d6831a1d4e`. That run took 4m17s from workflow creation, including 70s
before the first job started; Windows host packages finished last. The
exact-hit Windows app smoke rerun also passed on the same commit. No
checks remain pending.

> AGENT GENERATED
## Human comments

## What was wrong

The Windows host-package job finished last in the previous full CI run.
Its ACP suite spent 30 real seconds waiting for a command timeout, and
the process-identity test ran three expensive Windows identity lookups
sequentially even though its two refusal checks are independent.

## What changed

- Advance the ACP command timeout with fake timers after the real hung
child reports readiness. Preserve the error and missing-result
assertions, and verify that the child exits. Always advance the deadline
during cleanup, including readiness/assertion failures, and restore real
timers in `finally`.
- Run the wrong-command and wrong-start-time refusal checks
concurrently, preserving their individual results and liveness
assertions. Wait for both before the real successful stop. All three
fresh OS identity reads remain.

Only two test files change. No production behavior, mocks, test-only
production hooks, shard counts, or worker counts change. Existing test
cases remain.

## How you verified

Local baseline and candidate runs through Turbo reduced the three ACP
failure cases from **30.09s to 0.167s**. The process-identity test was
unchanged at roughly 0.13s on macOS; its benefit is Windows-specific.

Full local package suites passed: ACP **538 passed / 4 existing skips**,
config **101 passed / 1 existing skip**. Lint/typecheck passed (five
Turbo tasks), formatting and diff checks passed. Reviewed against
CODE_REVIEW and deslop guidance.

[Windows comparison
40113506162](https://github.com/get-bb/bb/actions/runs/40113506162)
passed all four jobs: two baseline and two candidate replicas on
four-vCPU runners, with the same nine packages and Turbo concurrency of
two. Every run passed **2,265 tests with 24 existing skips**.

| Measurement | Baseline replicas | Candidate replicas |
| --- | --- | --- |
| Entire host-package Turbo command | 120.4s / 91.5s | 80.1s / 81.0s |
| ACP bridge test file | 83.6s / 69.1s | 44.1s / 40.8s |
| Real process-identity test | 43.6s / 33.7s | 26.1s / 24.6s |

The whole-command range improves by approximately **11–40s** across
these samples; components overlap, so their gains are not additive. This
measures the host-package command, not total workflow duration. Both
variants started with an empty task-cache directory. The benchmark
predates only the failure-cleanup refinement; that refinement passed
focused tests and lint/typecheck. A simulated readiness failure also
failed promptly (1.38s including Turbo) without a pending-request
teardown timeout, then was restored byte-for-byte.

Independent review and re-review of the cleanup refinement found no
issues. [Final PR CI
40113800821](https://github.com/get-bb/bb/actions/runs/40113800821)
passed all **37 selected jobs, including all 14 selected Windows jobs**,
on `1fcb0d9950`. The final Windows host-package command took **82.0s**,
and its formerly 30-second timeout case took **396ms**. Packaging checks
were not selected for these test-only changes. All PR checks are green.
Benchmark harness changes live on a separate branch and are excluded
from this PR.

> AGENT GENERATED
)

## Human comments

## What was wrong

Since get-bb#4764 (0.47), the Claude Code bridge forwards every `canUseTool`
request in Full Access to the user, so that `permissions.ask` rules
prompt. That PR assumed Claude Code asks only about ask rules and
PreToolUse hooks that answer "ask" in `bypassPermissions`. It also asks
on some of its own built-in safety checks. On CLI 2.1.309, `W=/tmp/x;
for d in a b; do echo $d; done; rm -f $W/*.log` reaches `canUseTool`
with "Dangerous rm operation on possibly-empty variable path…", although
the same `rm` alone does not. Full Access threads and automations now
stop for approval on these. A user reported this on Discord ("A variable
in this command can't be checked before it runs", "This command changes
directory before running a version-control command…"), and it hit one of
our own Full Access threads too.

bb can't approve only the safety checks while keeping ask-rule prompts.
The SDK drops the control request's `decision_reason_type` before
calling `canUseTool`, so a plain ask rule, a hook "ask", and a safety
check differ only in free-form `decisionReason` text.

## What changed

- New Claude Code provider setting **Approvals in Full Access**
(`fullAccessApprovalsEnabled`), off by default.
- Off: Full Access approves every request Claude Code sends, as before
0.47.
- On: keeps get-bb#4764's behaviour and shows ask rules, hook "ask" answers,
and safety checks.
- Running as root: Full Access still always approves, since Claude Code
refuses `bypassPermissions` there.
- The value travels in `providerOptions` like `sandboxEnabled` and sits
with the bridge's live session settings, so a change applies from the
next turn without restarting Claude. `HOST_DAEMON_PROTOCOL_VERSION` is
unchanged.
- Docs: `docs/configuration.md`, the providers guide, and the
claude-code-provider skill.

## How you verified

- `pnpm exec turbo run typecheck test lint
--filter=bb-plugin-provider-claude-code`: 406 tests pass. `pnpm exec
turbo run test --filter=@bb/server --
test/threads/thread-runtime-config.test.ts`: 33 pass.
- New bridge test: in Full Access a safety-check request is approved
without a prompt by default, and is forwarded after a turn turns the
setting on. It fails without the bridge change.
- Reproduced the cause against the Agent SDK directly with bb's launch
options (CLI 2.1.309, streaming input, `bypassPermissions`). The
compound `rm` command reached `canUseTool`, and the simpler variants did
not.
- Manually QA'd in a source dev app, with a real Full Access Claude Code
thread running the command above:
  1. Setting off: the command ran with no prompt.
2. Setting turned on with the CLI: the next turn showed the "Dangerous
rm…" approval card, and Deny worked.
3. Setting toggled off in Settings → Plugins → Claude Code provider
(still off after a reload): the command ran with no prompt again.

> AGENT GENERATED

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
## Human comments

## What was wrong

iPhone Duo (released Oct 23) only gives an app its full screen area,
resizing, and fold/vertical-bar handling when the app is built with the
iOS 27 SDK. bb's mobile app was on Expo SDK 57 / React Native 0.86. Expo
SDK 58 (React Native 0.88) is the release that supports iOS 27 and
iPhone Duo.

## What changed

- `apps/mobile`: Expo 58.0.19 and the SDK 58 package versions (React
Native 0.88.0, React 19.3.0, gesture-handler 3.3, reanimated 4.7,
screens 4.30, webview 14.0.1, safe-area-context 5.10, …). The lockfile
resolves React 19.3.0 for the whole monorepo; package specifiers outside
`apps/mobile` are unchanged.
- NativeWind 5.0.0-rc.0 / react-native-css 3.1.0-rc.0. react-native-css
3.0.7's `react-native` re-export list has no `NativeComponentRegistry`,
which expo-modules-core 58 uses for native views, so the app threw
`Cannot read property 'get' of undefined` at startup and stayed on the
splash screen. Both are pre-release versions.
- Patches: dropped `expo-modules-jsi` and `react-native-screens` (both
fixed upstream). Ported the `react-native-webview` patch to 14.0.1, and
restored `WebView<P = {}>` in its typings: 14.0.1 declares `P =
undefined`, so its props become `never` and every `<WebView ref>` fails
to typecheck.
- Removed `newArchEnabled` from `app.json`; SDK 58's config schema
rejects it.
- RN 0.88 types: refs use `TextInputInstance`, `InputProps` omits the
overlapping `TextInputProps` keys, and `AppStateLike.currentState`
accepts `string | null | undefined`.
- Mobile README and the Mobile E2E workflow now prefer Xcode 27.1 /
27.x, falling back to 26.x.

## How you verified

- `pnpm exec turbo run typecheck test lint --filter=@bb/mobile`:
typecheck and lint pass, 341 tests pass.
- `pnpm exec turbo run typecheck` across the repo: 112/112 tasks pass.
- `turbo run test` for `@bb/app`, `@bb/core-ui`, `@bb/shared-ui`,
`@bb/thread-view`: all pass.
- Release build on Xcode 27.1 for the iPhone Duo simulator (iOS 27.1).
Paired it to the mobile E2E backend with the `pair-direct-server`
Maestro subflow, then folded and rotated the simulator: closed (outer
screen), open, half-folded and landscape all render.
- Not yet checked: whether the Mobile E2E runner image (`macos-15`) has
Xcode 27.x, and whether the EAS build image does.

> AGENT GENERATED

---------

Co-authored-by: Sawyer <[email protected]>
## Human comments

## What was wrong

Five host plugin lifecycle tests spent about 31 seconds waiting for real
cancellation grace periods and survivor calls. A directory-merge
regression also created and deleted 150,000 empty files just to exercise
merging a large listing. Host fixtures also spawned Git three times per
repository to set fixed configuration values and rebuilt the same
three-file Git reader fixture repeatedly. Faster setup exposed an
existing fixture collision: independent squash-check tests could create
identical commits within one second, allowing an earlier
content-addressed result to bypass a later test's injected timeout.

## What changed

- Hold survivor calls in the real child worker until an explicit fixture
RPC releases them. Advance only the parent manager's deadline/grace
timers; retain real worker startup, IPC, cancellation, process exits,
PID checks, and environment assertions. Restore clocks in `finally`. The
1500ms cold-start regression remains unchanged.
- Append the fixed test identity and autocrlf settings to Git's
initialized config, removing three subprocesses per `initRepo` call
while preserving platform/template settings. Build the Git reader
fixture once and copy the full repository for each test, with
independent refs, objects, index, worktree, and cleanup.
- Expand one real leaf-directory entry into 150,000 distinct entries at
the filesystem boundary. The real traversal, path normalization, and
merge still run; the other nine filesystem cases remain unchanged.
Assert total and distinct counts plus first/last paths, restore the
scoped spy in `finally`, and remove the large disk-fixture timeout.
- Give diverged squash-check fixtures unique commit subjects using their
temporary directory names, preserving patch contents and timeout/resume
assertions.

Only tests and test support change. No production, cache invalidation,
CI selection, shard count, or worker count changes.

## How you verified

[Combined host execution
benchmark](https://github.com/get-bb/bb/actions/runs/40129208375): two
baseline/candidate replicas on four-vCPU Linux and Windows runners, Node
22, with an empty Turbo cache. It compares all changes against the PR
base and runs the daemon and CLI with Turbo concurrency 1, the same
package selection and concurrency as the Windows host test job. All
eight runs passed with unchanged inventories: Linux 1,699 passed/9
existing skips; Windows 1,667 passed/40 existing skips.

| Platform | Baseline command, two runs | Candidate command, two runs |
Mean reduction |
| --- | --- | --- | --- |
| Windows | 80.84s / 118.55s | 60.93s / 43.38s | 99.7s → 52.2s, about
48% |
| Linux | 63.96s / 59.00s | 58.31s / 44.27s | 61.5s → 51.3s, about 17% |

Windows daemon task alone fell from 50.3–79.9s to 23.2–31.5s. The
path-listing file fell from 32.8–69.7s to 1.10–1.69s; the lifecycle file
from 41.1–47.8s to 8.2–10.1s. Runner variability is substantial,
especially for the disk-heavy baseline. These are measured
package-command gains from two runs per variant, not a claim that the
whole CI workflow becomes 48% faster.

[Git fixture
benchmark](https://github.com/get-bb/bb/actions/runs/40121057803): all
eight runs passed. Windows workspace task improved from 25.4–26.2s to
22.6–24.2s; Git reader file from 9.49–9.71s to 7.11–7.49s. This smaller
change did not consistently improve the combined three-package command.

Local verification through Turbo:
- Full host workspace (160 passed), watcher (59 passed/4 existing
skips), and daemon (816 passed/12 existing skips) suites passed. Final
lifecycle file: 33 passed; the five affected cases: 31.69s → 0.905s. Git
reader file also passed shuffled execution. After the directory fixture
change, the full daemon suite passed in 7.72s locally, and the 10-case
path-listing file improved from 8.53s to 0.606s.
- Independent mutation proof: omitting the real abandon message failed
both old and new tests on the rotated-environment assertion; disabling
stale cancellation-timer guards failed all three old and new survivor
cases after a real SIGKILL. Reinstating `results.push(...childResults)`
failed both old and new directory tests with the same `RangeError:
Maximum call stack size exceeded`; the restored candidate passed all 10
cases. Restored focused tests passed; production sources were restored
byte-for-byte.
- Real Git checks confirmed equivalent effective config, main branch,
clean state, tracked files, and author, including template settings and
empty-repository mode. Fixed commit dates reproduced the squash fixture
collision before correction (17 pass/1 fail), then all 18 cases passed.
- Lint/typecheck passed for all affected packages, formatting/diff
checks passed, and independent review found no issues. Final-head [PR
CI](https://github.com/get-bb/bb/actions/runs/40129273109) passed on
`03af7872cc5eb770d04c08bd6acb3a1de43f3324`; all checks are green or
non-applicable skips.

Benchmark workflows live on separate branches and are excluded from this
PR.

> AGENT GENERATED
## Human comments

## What was wrong

Every integration harness reran database migrations and rebuilt the same
scripted-echo provider artifact. The Linux integration job also used
only two Vitest workers on its four-vCPU runner. Together these repeated
setup costs and limited concurrency lengthened a job that was among the
remaining CI bottlenecks.

## What changed

- Build one SQLite template with the real migrations, copy a fresh
database for every harness, and initialize its personal project
separately. Global setup returns the template cleanup callback.
- Reuse the immutable scripted-echo build promise per worker. Each
harness still creates a fresh registry, server, daemon, provider
processes, and sessions.
- Use four workers in the existing Linux integration job. Keep the
Windows worker count unchanged because the measured four-worker variant
was slower.

These are test-support and CI changes. No production code, assertions,
test selection, cache invalidation rules, shard counts, or timeouts
change.

## How you verified

[Controlled
benchmark](https://github.com/get-bb/bb/actions/runs/40137507494):
baseline, fixture reuse, and fixture reuse with four workers; two
replicas on each four-vCPU Linux/Windows runner type, Node 22, empty
Turbo caches. All 12 jobs passed the same 77 tests across 28 files.

| Integration test task | Baseline, two runs | Fixture reuse | Fixture
reuse + four workers |
| --- | --- | --- | --- |
| Linux | 46.53s / 39.16s | 34.40s / 33.11s | 27.13s / 24.77s |
| Windows | 65.66s / 42.54s | 42.92s / 41.64s | 54.23s / 68.06s |

Linux mean test-task time falls from 42.8s to 26.0s, about 39%. The
complete Linux command, including upstream tasks, falls from 40.5–48.1s
to 26.0–28.4s. Windows timings are noisier, so these runs do not
establish a precise percentage gain; its current worker count is
retained. These are integration-job measurements, not whole-pipeline
percentages.

Local full integration runs with three workers passed 77/77 in 39.39s
baseline, 36.36s with database reuse, and 34.28s with database plus
provider fixture reuse. Turbo lint/typecheck, formatting, diff checks,
and actionlint passed (excluding existing custom Blacksmith runner
labels). Real-provider suite setup/discovery passed; all 11
live-provider cases were deliberately filtered out, so no live-provider
execution is claimed.

Independent review found no issues: the database helper preserves
connection defaults and real schema, existing database tests cover
template-copy isolation, direct server initDb coverage remains, and no
tests/assertions were removed. The first final-head CI attempt passed
every check except Linux server shard 2, which hit
`queued_message_claim_lost` in the unchanged `keeps queued choices
separate until dispatch and preserves the next row` test. Its server
worker count and executed provider-registration path are unchanged. All
39 cases passed against the baseline helper in 11 focused runs; the
separate CI reliability thread then reproduced the production race
deterministically on the baseline by pausing the older send while a
competing drain claims the newer row. That fix is tracked in
[get-bb#6247](get-bb#6247). Only the failed shard
was rerun on the unchanged head. Final-head [CI is
green](https://github.com/get-bb/bb/actions/runs/40137789809/attempts/2)
on `46241a7b06c7572dee5530707e0243e804a9918d`; the passing retry does
not fix the queue race. The benchmark workflow lives on a separate
branch and is excluded from this PR.

> AGENT GENERATED
## Human comments

## What was wrong

Pi's real-child tests spent eight seconds waiting for shutdown
escalation and five seconds waiting for a hung model refresh. Tasks also
started late in its existing standalone fork-check shard, extending the
tail after shorter plugins finished.

## What changed

Advance the parent timeout clock after real child readiness and RPC
receipts, retaining the actual processes, stop acknowledgement,
process-exit checks, replacement generation and fresh model assertions.
Restore clocks before teardown and preserve explicit real-I/O wait
budgets. Node's internal 15-second version-probe test remains unchanged.

Start Tasks early alongside the existing Pi priority. No production
runtime changes, added shards, reduced coverage, cache invalidation or
selection changes. A measured Codex-priority experiment regressed its
shard and was discarded.

## How you verified

- Full Pi suite: 319 passed, seven existing skips. Local reported suite
time fell from 31.05 to 24.40 seconds. Shutdown case: 8.13 to 0.22
seconds; hung refresh: 5.21 to 0.26 seconds.
- Turbo Pi lint/typecheck passed; formatting, script syntax and diff
checks passed. All three fork shard selections match the baseline byte
for byte.
- [Controlled standalone fork scheduling
experiment](https://github.com/get-bb/bb/actions/runs/40139306094):
shard 2 baseline 86.47/95.05 seconds, candidate 69.74/83.11 seconds;
means 90.76 to 76.43 seconds (16%). Four concurrent forks and two Vitest
workers per fork unchanged; each run includes fresh dependency
resolution, installation, typecheck, tests and build after SDK/CLI
preparation. These are command timings, not end-to-end CI gains.
- Controlled two-repetition comparisons, same runners and worker limits:

  | Command | Baseline runs | Candidate runs | Mean improvement |
  | --- | --- | --- | --- |
  | Linux complete Pi suite | 44.47 / 37.89s | 32.36 / 27.33s | 28% |
  | Windows complete Pi suite | 49.75 / 39.45s | 34.29 / 34.21s | 23% |
| Linux standalone fork shard 1 (Pi) | 101.02 / 86.40s | 84.20 / 76.02s
| 15% |

[Linux
benchmark](https://github.com/get-bb/bb/actions/runs/40139809976): all
four Linux jobs passed; that experiment's Windows setup failed before
tests because its tool action supports Linux/macOS only. [Corrected
Windows
benchmark](https://github.com/get-bb/bb/actions/runs/40139957845): all
four jobs passed using the normal Windows CI tool setup. Linux retains
319 passes/seven existing skips; Windows retains 324 passes/two existing
skips. These are suite/command gains, not a measured whole-pipeline
reduction.
- Independent old/new mutation audit: all three mutations fail both
original and accelerated tests—omitted SIGKILL escalation (same
live-child assertion), refresh timeout extended from 5s to 120s (same
60s test deadline), and omitted replacement kill (same 60s test
deadline). The final unmodified candidate then passed all 17 tests in
the two affected files; audit worktree restored byte for byte, with no
owned child processes left running.
- [Final-head CI](https://github.com/get-bb/bb/actions/runs/40139912765)
passed at `878cfeec6a5ccb936085cfcc116272f390358d55`, including
Linux/Windows tests, all three standalone fork shards, lint/typecheck
and packaging checks.

> AGENT GENERATED
## Human comments

## What was wrong

The dropped-tunnel recovery test on [main run
40131112983](https://github.com/get-bb/bb/actions/runs/40131112983/job/120982890510)
received 503 instead of 200. A real gate race ended the return grace
early: the delayed CloseProxy callback treated server addresses as
removable shares, and a newly connected client could trigger that
callback before its replacement route was ready. Share routes already
accepted by NewProxy could also be interrupted during their routing
settle period.

## What changed

Production change: keep server addresses within the normal tunnel-return
grace, and remove a share early only when no replacement proxy for that
subdomain is registered. Add deterministic regressions through the real
hook HTTP server and directory, including a check that explicit share
removal still ends its wait.

No daemon wire, public API, CLI, CI selection, cache, shard, timeout, or
coverage reductions. The separate Windows runtime shutdown failure
remains under investigation; this PR does not claim to resolve it.

## How you verified

- Both new regression cases fail on the original implementation because
their pending request is settled at the 500 ms removal deadline, before
reconnect can finish; both pass with the fix.
- `VITEST_MAX_WORKERS=2 pnpm exec turbo run test typecheck
--filter=@bb/connect-next`: all 92 tests pass, including real FRP
single-region and multi-region end-to-end tests; typecheck passes.
- Formatting and `git diff --check` pass. This package has no lint task.
Reviewed against `docs/CODE_REVIEW.md` and the deslop guidance.
- [Final-head CI
40138038987](https://github.com/get-bb/bb/actions/runs/40138038987)
passes on `b9751506cb`, including Linux packages-other, Windows
packages-other, Windows host packages, lint/typecheck, and checks.

> AGENT GENERATED
…-bb#6247)

## Human comments

## What was wrong

[CI
40137789809](https://github.com/get-bb/bb/actions/runs/40137789809/job/121002959146)
failed while dispatching an older queued message: `Queued message claim
expired before it could be sent`. The claim had not expired. While that
message prepared its command asynchronously, an automatic drain skipped
its claimed row, claimed a later message, and activated the thread
first. The older send then failed its lifecycle transition. This can
reorder queued messages and produce a spurious send conflict in
production.

## What changed

Production change: inside both immediate automatic-claim transactions,
reuse the existing per-thread claimed-message query to decline another
automatic claim until the current dispatch finishes or releases its
claim. Explicit send-now policy is unchanged. No schema, wire, SDK, CLI,
timeout, CI selection, cache, or shard changes.

Extend the existing service-tier regression to hold real command
preparation, run a competing next-group or targeted automatic claim, and
then release preparation. It retains the queue snapshots and
execution-tier assertions and checks that exactly one command was
dispatched. The edit-hold database fixture now consumes its first
claimed dispatch before checking the second row's expired hold; its
existing assertions remain intact.

## How you verified

- Both controlled competing-claim cases fail against the original
production code at `queued-messages.ts:605`, matching CI, and pass with
the fix.
- All 40 thread-send-dispatch tests and all 633 database tests pass
through Turbo.
- Server and database typechecks pass; neither package has a lint task.
Formatting and `git diff --check` pass. Reviewed against
`docs/CODE_REVIEW.md` and deslop guidance.
- Full server run: 3,659 passing tests; 22 failures in npm cache writes
denied by the local sandbox and filesystem watcher tests. All seven
affected files pass with normal host permissions (172 tests), including
both watcher cases and the installer process-identity case. The
install-script failure was an inability to inspect its owned process
inside the sandbox.
- [Final-head CI
40138842962](https://github.com/get-bb/bb/actions/runs/40138842962)
passes on `0e449d8b5a`, including both Linux server shards, all three
Windows server shards, Linux/Windows integration, foundation packages,
lint/typecheck, and checks.

> AGENT GENERATED
## Human comments

## What was wrong

[Windows main CI
40136960806](https://github.com/get-bb/bb/actions/runs/40136960806/job/121000465335)
reported the replacement process alive immediately after shutdown in
`does not wait for stalled replacement initialization during full
shutdown`.

The test queried a numeric PID after the managed child had exited. PID
reuse makes that an ambiguous identity check. Managed stop already
rejects unless its own child has observed an exit, so the test should
observe that same child. The original incident was not reproduced in 30
focused Windows repetitions or 20 complete lifecycle-file repetitions;
PID reuse is a plausible explanation, not a captured cause, and this PR
does not claim a production process leak was fixed.

## What changed

Test-only: listen for the owned replacement child's exit before starting
full shutdown, then require that event to have arrived when shutdown
completes. Preserve the real stalled child, the initialization-ready
signal, and the existing one-second shutdown bound. Register owned-child
cleanup for a failed test.

No production, timeout, fixture-delay, CI selection, cache, shard, or
skipped-coverage changes.

## How you verified

- With termination deliberately omitted from
`RuntimeProviderProcessManager.shutdown()`, the original assertion fails
(`expected true to be false`) and the revised assertion fails (no
owned-child exit). Both use the real child. Restored production source
byte for byte afterward.
- `VITEST_MAX_WORKERS=2 pnpm exec turbo run test typecheck
--filter=@bb/agent-runtime`: all 313 tests across 23 files and typecheck
pass.
- Formatting and `git diff --check` pass. Reviewed against
`docs/CODE_REVIEW.md` and deslop guidance.
- Baseline Windows diagnostics: [30 focused
repetitions](https://github.com/get-bb/bb/actions/runs/40137910461) and
[20 complete lifecycle-file repetitions / 640
cases](https://github.com/get-bb/bb/actions/runs/40138433570) pass.
[Five complete package repetitions under CI worker concurrency / 1,565
cases](https://github.com/get-bb/bb/actions/runs/40138946275) also pass.
- [Final-head CI
40139155349](https://github.com/get-bb/bb/actions/runs/40139155349)
passes on `5fd5b0c840`, including Windows host packages (the changed
test), both Linux server shards, all three Windows server shards,
Linux/Windows integration, lint/typecheck, model listing, and checks.

> AGENT GENERATED
…-bb#6255)

## Human comments

## What was wrong

`buildFrpcConfig` (`packages/frp-client/src/config.ts`) never set
`transport.poolCount`, so it defaulted to 0 and frps kept no idle work
connections for bb connect next. In frp v0.71.0 (the version pinned in
`packages/tunnel-contract/src/next.ts`), `server/control.go`
`GetWorkConn` handles an empty pool by sending `ReqWorkConn` and waiting
for frpc to dial a connection, which costs an extra round trip. After
every take it sends another `ReqWorkConn` to replenish. frps's vhost
HTTP proxy keeps only `MaxIdleConnsPerHost: 5`, so a burst of more than
5 parallel requests needs new work connections. One example is the web
app refetching every active query when a tab resumes. Each of those
requests waits a round trip, and the replenish requests then overflow
the `poolCount + 10` work-conn channel. `RegisterWorkConn` rejects the
extra connections, and frpc logs this as `StartWorkConn contains error:
work connection pool is full, discarding`. The user's server log showed
16–21 of these per burst on 2026-10-23.

## What changed

- `buildFrpcConfig` now sets `transport.poolCount: 10`. That is the
gate's `maxPoolCount` (`apps/connect-next/src/frps.ts`), so frps uses
the full value instead of clamping it. frps now pre-requests 10 work
connections at login and keeps the pool full, and the channel capacity
grows to 20, which covers the bursts we observed. frp multiplexes work
connections as streams over the existing control connection by default,
so idle pooled connections are cheap.
- Logging is unchanged. The plugin already forwards every frpc line at
`info` level (`packages/frp-client/src/supervisor.ts` `onLine`). Fewer
of these lines should appear now, and lowering the level for one benign
message doesn't seem worth a special case.
- No wire or CLI changes.

## How you verified

- `pnpm exec turbo run test typecheck --filter=@bb/frp-client
--filter=./plugins/connect-next`: all passing (frp-client 40 tests;
connect-next 28 tests, including `frp-e2e.test.ts`, which launches the
real frps/frpc binaries with the generated config and tunnels requests
through it).
- Updated the exact-config assertion in
`packages/frp-client/test/config.test.ts`.

> AGENT GENERATED

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
## Human comments

## What was wrong

Linux packaging was the last job in the latest full CI run (2m47s). It
serialized the bb-app tarball smoke and AppImage build even after their
shared prerequisites were ready. The smoke also serialized independent
installs and runtime checks. Simply overlapping the packaging tasks was
unsafe because the tarball regression fixture temporarily inserted and
pruned files in the source package that Electron reads.

## What changed

Run the Linux tarball smoke and AppImage build in one Turbo graph with
shared prerequisites and a four-task concurrency limit. Independent
branches finish even when a sibling fails; failed prerequisites still
block their dependents. The existing AppImage mount lifecycle check
follows packaging.

On Linux, copy the package into a private temporary fixture before
inserting the stale CLI chunk and invoking real npm packing. Keep root
dependencies out of the fixture while retaining nested vendored files.
This leaves the build output immutable for concurrent Electron
packaging. Also overlap the independent npx/SDK installs and
full-stack/daemon-join checks, waiting for both operations and their
process cleanup before removing temporary files. Preserve the
installed-repack barrier.

No product runtime changes, added jobs or shards, skipped checks, or
cache/invalidation changes. macOS scheduling is unchanged; Windows
retains its existing parallel installs.

## How you verified

- Turbo bb-app tests/typecheck: 216 tests across 23 files passed.
Formatting, script syntax, actionlint and diff checks passed. Dry-run
confirms the shared build graph and two intended packaging tasks.
- [Paired same-runner
benchmark](https://github.com/get-bb/bb/actions/runs/40156939260),
alternating order on four identical four-vCPU Linux runners:

  | Order | Sequential baseline | Concurrent candidate | Saved |
  | --- | --- | --- | --- |
  | Baseline first, 1 | 53.84s | 33.76s | 20.08s |
  | Baseline first, 2 | 58.05s | 33.24s | 24.81s |
  | Candidate first, 1 | 46.78s | 28.19s | 18.59s |
  | Candidate first, 2 | 44.79s | 28.06s | 16.73s |

Mean packaging-stage time: **50.87 to 30.81 seconds, saving 20.05
seconds (39%)**. These measurements include real tarball smoke and
AppImage packaging, with shared builds/Electron tool downloads prepared
beforehand, fresh npm caches for each variant, and release outputs
cleared between variants. They measure the affected tail of the
critical-path job, not a 39% whole-CI improvement.
- [Initial cold-build
benchmark](https://github.com/get-bb/bb/actions/runs/40156634222): all
four baseline/candidate jobs passed, including real AppImage mount
lifecycle checks. Full command means were 96.21 versus 92.84 seconds,
with substantial variation in unchanged prerequisite build times; the
paired benchmark above isolates the scheduling change.
- [Independent smoke overlap
experiment](https://github.com/get-bb/bb/actions/runs/40156287713):
smoke means 33.3 to 27.5 seconds, with every real install and runtime
check retained.
- Independent staging audit: direct and staged tarballs are
byte-identical, including all 2,609 entries, contents, modes and links;
source snapshots across 2,980 entries are unchanged. Disabling prepack
pruning makes both versions fail the same stale-chunk assertion.
- Independent real-process failure injection: npx, SDK, full-stack and
daemon-join failures each wait for successful sibling completion,
preserve the intended failure and remove all owned processes and
temporary directories. Both `Promise.all` negative controls detect
premature cleanup. The Linux scheduling/staging branches were activated
temporarily on macOS for these isolated audits; the CI benchmark
exercises actual Linux.

- [Final-head CI](https://github.com/get-bb/bb/actions/runs/40156937744)
is green at `249bc428210df5c86304295436418c4ddf63aa87`, including
Linux/macOS packaging, Windows smoke checks, all selected tests, lint
and typecheck.

> AGENT GENERATED
…#6257)

## Human comments

## What was wrong

On compact viewports, `AppPageHeader` scrolls the page to the top when
its background is tapped (get-bb#4742). The thread actions menu renders its
drawer through a portal, but React bubbles synthetic events through the
component tree, not the DOM tree. A tap on the drawer's backdrop (or its
grab handle) therefore reached the header's `onClick`. The target was a
plain `div`, so it passed the interactive-element filter, and closing
the drawer smooth-scrolled the timeline to the top. get-bb#4742 listed this as
a deferred follow-up ("Ignore portaled menu-backdrop clicks in the
header handler").

## What changed

- `apps/app/src/components/layout/AppPageHeader.tsx`: the compact
tap-to-top handler ignores clicks whose target is outside the header's
DOM (`!event.currentTarget.contains(event.target)`). Taps on the header
itself behave as before.
- `apps/app/src/components/layout/AppPageHeader.test.tsx`: covers a
header tap (scrolls to top) and a click from a portaled child (does
not).

## How you verified

- Reproduced on an Android emulator (Pixel 9, Chrome) against the live
app with a scroll-write probe. Tapping the backdrop logged
`viewport.scrollTo({ top: 0, behavior: "smooth" })` from the
`PAGE_SCROLL_TO_TOP_EVENT` handler, called from React's click dispatch.
- Headless Chrome at 390×844: open the drawer at scrollTop 6000, then
click the backdrop. Main moves the timeline; this branch stays at 6000.
Re-checked on a `pnpm start:worktree` server for this branch: the
backdrop keeps the position, and the header "Scroll to top" button still
scrolls.
- The new test's portal case fails without the fix and passes with it.
- `pnpm exec turbo run typecheck --filter=@bb/app` and `pnpm exec turbo
run lint --filter=@bb/app` pass.

> AGENT GENERATED

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
get-bb#6258)

## Human comments

## What was wrong

The app sequencer started every isolated test file before its
shared-worker files. The expensive shared-worker markdown tests could
then occupy the last worker while the rest were idle, extending the
uncached Windows app test critical path.

## What changed

Start shared-worker projects first in the app suite. Preserve the
existing ordering within each project, shard assignment, worker counts,
test cases, and isolation rules. This changes only app test scheduling;
there are no runtime, cache, dependency, or CI matrix changes.

## How you verified

- [Windows all-shard
comparison](https://github.com/get-bb/bb/actions/runs/40158057500):
baseline/candidate × all four shards × two repetitions, all 16 jobs
passed. All 6,306 test cases and statuses match as multisets, including
the existing skip and duplicate-named cases. The slowest shard fell from
139.7s to 126.0s in one repetition and 163.2s to 120.9s in the other;
cross-runner variation is substantial.
- [Paired same-runner
comparison](https://github.com/get-bb/bb/actions/runs/40158546534),
uncached shard 2 with four workers and alternating baseline/candidate
order: all four pairs passed. Full Turbo test-task times were
115.04→109.55s, 74.24→65.60s, 73.04→65.73s, and 73.78→67.35s. Mean
**84.02→77.06s: 6.97s / 8.3% faster**. All 1,451 Windows cases and
statuses match in every pair. The slower host is included in these
results. These are test-stage measurements, not whole-workflow
reductions.
- Local shard 2: 1,450 tests passed, including a separate seeded-shuffle
run (20261025). `pnpm exec turbo run lint typecheck --filter=@bb/app`
passed. Formatting and diff checks passed.
- Final-head [CI](https://github.com/get-bb/bb/actions/runs/40159010742)
passed on `208cb59782c3e3ecf45a283a6365814b2ed8dbc8`, including all
selected Linux and Windows app shards.
- Independent review confirmed shard assignment, within-project order,
and worker isolation are preserved.

> AGENT GENERATED
…compiler (get-bb#6259)

## Human comments

## What was wrong

Public SDK declaration generation ran the JavaScript TypeScript emitter
inside Rollup over roughly 200 reachable workspace sources. This serial
stage sits inside the bb-app build used by packaging CI. Paired CI
measurements put it at 13.9 seconds on Linux and 9.0 seconds on macOS on
average.

## What changed

On supported Linux and Apple Silicon platforms, use the already
installed native TypeScript compiler (`tsrs`) to emit the reachable
workspace declarations into a temporary directory, then bundle those
declarations with the existing Rollup declaration bundler. Preserve
workspace package resolution and external dependencies. Compiler errors
fail the build and temporary files are removed on success or failure.

Windows, Intel macOS, and unsupported architectures retain the existing
JavaScript emitter. No dependencies, caches, shards, runtime behavior,
or public SDK API are intentionally changed. This does change how the
published SDK declaration artifact is generated; its textual declaration
ordering can differ.

## How you verified

- [Paired Linux/macOS CI
benchmark](https://github.com/get-bb/bb/actions/runs/40158961508): two
runners per platform, alternating ABBA/BAAB order, four fresh baseline
and candidate generations per platform. Linux averages **13.94→3.46s
(75% faster, 10.48s saved)**; macOS **9.04→1.99s (78% faster, 7.05s
saved)**. All four jobs also pass real tarball installation, packaged
SDK consumer checks, and runtime smoke for both declaration versions.
These are declaration-stage savings, not whole-workflow percentages.
- Exhaustive one-off TypeScript 6 compatibility checks cover all 512
type-only exports (including six universally parameterized generic
exports) and public runtime contracts in both assignability directions.
All 549 export names remain. The class with private nominal members has
identical complete declaration syntax. Route intersections retain all
185 branches and 220 unique endpoint/method signatures; there are no
duplicate endpoint/method overloads whose precedence could change.
- The candidate declaration SHA-256 is identical between local
compatibility proofs, installed consumer checks, and all eight
Linux/macOS CI emissions
(`49a82607fcc1b9fc5b81f48d7c1fca2b05477efd678044bc7a790e8139c0be77`).
- One-off platform-routing checks cover Darwin ARM64/x64, Linux
ARM64/x64/RISC-V, Windows x64, and FreeBSD x64. Only supported
combinations enter native emission; each fallback output matches the
original generator after order normalization. These are simulated
routing checks, not claims of execution on all seven platforms.
- A real source type-error mutation fails with TS2322, preserves the
existing output, and leaves no temporary directories. Source restored
byte-for-byte afterward.
- Final-head [CI](https://github.com/get-bb/bb/actions/runs/40159296836)
passed on `433773655484fb6a54994b25f74b88e89a05b999`, including
Linux/macOS tarball packaging, Linux AppImage lifecycle, Windows app
tarball and desktop smoke checks, and all selected package tests.
- `pnpm exec turbo run typecheck test --filter=bb-app`: all 216 tests in
23 files passed. Formatting, lint, and diff checks passed. Independent
review covered declaration compatibility, workspace resolution, cleanup
and platform routing.

> AGENT GENERATED
## Human comments

## What was wrong

The shared mobile E2E backend did not install the Composer plugin after
the composer moved out of core. Android reached the idle thread but
displayed “No composer plugin is enabled”; iOS flows also failed waiting
for composer text. Failed scheduled runs:
[Android](https://github.com/get-bb/bb/actions/runs/40199670922) and
[iOS](https://github.com/get-bb/bb/actions/runs/40199013729).

## What changed

Install the bundled Composer plugin when creating the mobile integration
harness. Both Android and iOS use this backend, so both regain their
message input without changing the existing E2E assertions.

## How you verified

- Started the mobile backend through Turbo on an isolated port; seeding
completed and Composer reported running with a compatible app bundle.
- Fetched its JavaScript and CSS assets successfully (HTTP 200).
- `pnpm exec turbo run typecheck --filter=@bb/integration-tests` passed.
- Formatting and `git diff --check` passed.
- Full Android and iOS flows were not run locally. The `mobile-e2e`
label enables both workflows on this PR for verification.

> AGENT GENERATED
…b#6260)

## Human comments

## What was wrong

The package smoke test passed an unnamed local tarball to both npx and
npm install. npm/pacote repeatedly extracted the entire application
archive merely to discover its manifest before doing the real
installation. On Windows this dominated the consumer-install portion of
packaging CI, despite cached package downloads.

## What changed

The npx check now installs the real packed bb-app through a private
loopback registry fixture. The fixture reads metadata from the tarball,
serves the unchanged archive with its SHA-512 integrity, and redirects
other package requests to the public npm registry. Each invocation uses
a random dist-tag: changing only the registry port would allow npx to
reuse a previous installed tree for the same version. The server closes
after success or failure.

The separate SDK check still performs a fresh local-tarball
installation, now with an explicit `bb-app@file:...` specification so
npm can skip name discovery. Native install scripts, dependency
resolution, TypeScript consumer compilation, installed-package
repacking, provider/worker checks, full-stack startup, and daemon
enrollment remain enabled. The npx check changes from local-file
resolution to registry resolution and real executable dispatch, matching
the advertised entry path; local-file installation remains covered by
the SDK check.

Only the smoke-test script changes. No application/runtime code,
published package contents, dependencies, cache keys, invalidation
rules, runner sizes, or shard counts change.

## How you verified

- [Windows paired
benchmark](https://github.com/get-bb/bb/actions/runs/40165069384): two
runners, ABBA/BAAB order, four baseline and four candidate full-smoke
executions, all passed. Mean **47.66→38.26s: 9.40s / 19.7% faster**,
including the slower first candidate. Baseline-first samples:
46.99/54.40s baseline versus 36.65/35.95s candidate; candidate-first
samples: 44.92/44.32s baseline versus 44.95/35.47s candidate.
- [macOS paired
benchmark](https://github.com/get-bb/bb/actions/runs/40165305845): same
ABBA/BAAB methodology, all eight executions passed. Mean **28.98→25.18s:
3.80s / 13.1% faster**. These are complete tarball-smoke task timings
after common build prerequisites, not whole-workflow percentages.
- Independent freshness/failure proof with real npm/npx: three different
tarballs at the same package version and one isolated npx cache. Old
valid package succeeds, new broken executable fails with intended exit
37, third valid package succeeds; each produces a distinct installed
tree. Repeated using a separate packing cache and confirmed each archive
was fetched over HTTP. The registry socket closes after every call,
including failure. This was one-off verification, not an added permanent
helper test.
- Local `pnpm exec turbo run smoke:tarball --filter=bb-app
--concurrency=4` passed. `pnpm exec turbo run lint typecheck test
--filter=bb-app` passed; formatting and diff checks passed.
- Final-head [CI](https://github.com/get-bb/bb/actions/runs/40165596890)
passed on `ea5316b328e23f46fda35b9373012947ef6bf2fe`, including
Linux/macOS package smoke, Linux AppImage lifecycle, Windows app and
desktop smoke, and all selected package tests. Windows coverage includes
archive paths with drive letters.

> AGENT GENERATED
…#6295)

## Human comments

## What was wrong

On cold new-thread and thread loads, essential plugin assets were
discovered after the plugin runtime loaded, and activation waited for
the toaster to mount. The SDK also eagerly imported Markdown and the
diff/source adapters even when the page only needed a composer. Delaying
the toaster module by 2.5 seconds reproduced a visible composer skeleton
on the previous build.

## What changed

- Start essential plugin boot when system config resolves and preload
priority plugin JavaScript/CSS alongside the runtime using the shared
plugin-list query.
- Remove the toaster activation gate. Queue normal, raw, and custom
startup notifications until attachment; honor dismissals before
attachment.
- Split the SDK Markdown, diff, and source components and warm them
through the existing idle queue. After plugin registration, warm
selected built-in renderers; skip those built-ins when a plugin
replacement is selected.
- Start selected built-in diff/source imports and worker requests
alongside SDK adapter loading; apply the same early loading to timeline
diffs. Idle warming does not initialize workers.
- Document the lazy-loading audit and add regression coverage for the
existing parallel route preloads. Route code and thread
bootstrap/timeline loading were already parallel; this PR does not
introduce a new route preparation layer.

Existing renderer-selection and worker-readiness boundaries remain.
Shared Pierre bindings stay eager for plugin compatibility.
Content-dependent Markdown loading still has a possible cold-path
waterfall, and the existing idle queue still drains its warmups
together. No public SDK contract, CLI, or server/daemon wire fields
change.

## How you verified

- `pnpm exec turbo run lint typecheck build --filter=@bb/app` passed
(existing lint and build warnings remain).
- 53 focused tests across plugin startup, notification startup, SDK
Markdown links, cold renderer ordering, renderer replacements and
skeletons, idle warming, route preloads, and bundle budgets passed. The
additional thread-query and route suite passed 31 tests.
- Mutation checks: removing early renderer loads fails the cold-load
regression; removing the existing route-preload effects fails the route
regression. The priority-plugin startup and queued-toast regressions
were also checked against their previous implementations.
- Ran `pnpm start:worktree`; used the source BB CLI against its isolated
server to inspect the thread, machines, and essential plugins. Used `bb
browser-automation` to check new and existing threads at 1440×1000 and
390×844 in light mode, capturing 16 before/after screenshots against a
separately built committed baseline using the same server data.
- With toaster code delayed, the baseline had no editable composer at
capture time; this branch had one on both routes at both sizes. Fully
loaded layouts remained stable, with no visible error alerts.
- Cold-cache mobile emulation at 2 Mbps down, 1 Mbps up, 100 ms latency,
and 4× CPU slowdown: typed and cleared unsent drafts on both routes. No
provider run was started. These were single-run smoke checks, not a
comparative benchmark; physical iOS Safari was not tested.

Temporary verification server: https://ymichael--19376.getbb.app/
(requires the owner's BB Connect access).

> AGENT GENERATED
## Human comments

## What was wrong

In the desktop app, the "Show right panel" button in the thread header
sometimes stopped responding. Dragging from it moved the window, it
showed no hover state, and only ⌘J or visiting the new-thread page
brought it back. While the button was stuck on a live bb Nightly, the
collapsed right panel (`#thread-detail-secondary-panel`, 0px wide) had
`scrollLeft=283`. react-resizable-panels sets an inline `overflow:
hidden` on every `Panel`, which overrides our `overflow-clip` class, so
every panel was scrollable from code. Once the collapsed panel was
scrolled, its hidden aside moved back into the window. Painting stayed
clipped to the 0px panel, but Electron's drag regions ignore overflow
clipping. The aside's title-bar chrome
(`thread-secondary-panel-top-chrome`, a drag region later in the DOM
than the header) therefore sat over the button. Reopening the panel
reset the scroll to 0, which is why ⌘J fixed it. We still don't know
what scrolls the panel in real use; the tab strip's `scrollIntoView` was
ruled out. This fix makes the scroll impossible, so the cause no longer
matters. get-bb#6105 fixed a different overlap of this toggle's drag region.

## What changed

Each of the five product `Panel`s now gets an inline `style={{ overflow:
"clip" }}`, which overrides the library's `hidden`. The dead
`overflow-clip` class is removed. `clip` paints the same as `hidden`,
but the element is not a scroll container, so neither `scrollIntoView`
nor setting `scrollLeft` can move a collapsed panel.

- `ThreadSecondaryPanel.tsx` (`SECONDARY_RESIZABLE_PANEL_STYLE`)
- `SecondaryPanelLayout.tsx` (main panel)
- `lazySecondaryPanelComponents.tsx` (inline placeholder)
- `SplitWorkspaceSecondaryPanelHost.tsx` (both panels)

No wire, CLI, or plugin API changes.

## How you verified

- `pnpm exec turbo run typecheck --filter=@bb/app` passes.
- `vitest run src/components/secondary-panel src/views/thread-detail` in
`apps/app`: 78 files, 795 tests pass.
- Packaged desktop app from this branch (`turbo run package
--filter=@bb/desktop`), launched against an isolated worktree instance
with `--remote-debugging-port`. In a real thread, I opened and then
closed the right panel, then forced the scroll over CDP with
`document.querySelector('#thread-detail-secondary-panel
[aria-label^="Hide right panel"]').scrollIntoView({inline:"nearest"})`
and `scrollLeft = 283`:

| | `scrollLeft` after scrollIntoView / set 283 | Drag-region model over
"Show right panel" (left, center, right) |
|---|---|---|
| This branch (`overflow: clip`) | 0 / 0 | no-drag, no-drag, no-drag
(the button) |
| Same window with main's inline `overflow: hidden` put back | 446 / 283
| hidden aside's Full Screen button, its icon, **drag** strip |

The second row reproduces the stuck state seen on the nightly. Not yet
covered: a person hovering and clicking the button in the packaged build
after the forced scroll. That check is with Michael on the M5.

> AGENT GENERATED

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
…-bb#6293)

## Human comments

## What was wrong

Removing an external worktree from Storage held an HTTP request open
until Git finished. Large checkouts could exceed BB Connect's 30-second
response deadline, and a separate 60-second Git timeout could interrupt
deletion. Moving removal into the background exposed another problem:
enabled cleanup controls submitted overlapping requests that the server
rejected with maintenance-lock errors. Bulk cleanup blocked individual
deletions and vice versa, with no queue.

## What changed

- Run external worktree removal in the background without Git's separate
60-second timeout. The host call retains its 30-minute deadline.
- Queue cleanup requests FIFO per machine instead of rejecting
overlapping work. Other machines run independently; duplicate pending
background requests reuse their job. Failures release the queue for the
next request.
- Recheck safety when each job executes. Treat targets already removed
by an earlier BB job as handled; queueing never grants force-removal or
stop-process permission.
- Show queued/running/result feedback in toasts and keep other controls
available. Preserve separate maintenance statuses for different cleanup
kinds.
- Submit thread and development-entry cleanup through
`startEntryCleanup` and poll `entryCleanup`, so queued UI requests do
not hit remote HTTP deadlines. Existing synchronous CLI/RPC commands
participate in the queue and return their final results.
- Update the plugin README and skill documentation. The queue and status
history are in memory and are canceled on server shutdown or plugin
reload. Queue changes are within the plugin server/UI contracts; they
introduce no new daemon wire fields.

## How you verified

- `pnpm exec turbo run typecheck test lint
--filter=bb-plugin-bb--storage-retention` passed; all 79 tests across 4
files passed in an uncached test run.
- Regression coverage exercises individual → bulk, bulk → individual,
duplicate pending requests, independent machines, failure recovery,
already-removed targets, and a worktree acquiring uncommitted changes
while queued. UI coverage checks the same toast moving through
queued/running/completed states and preserves stop-and-remove
confirmation.
- Ran the updated worktree regression against the pre-queue production
code: it failed with `This worktree is already being removed`; it passes
after the fix.
- Live browser verification against `pnpm start:worktree`: removed
disposable worktrees with 100,000 files each, queued an individual
removal behind bulk removal, observed queued → success without conflict
errors, and confirmed the dirty worktree remained. Checked the resulting
server statuses and inspected a screenshot.
- Server and daemon health checks and `git diff --check` passed. The
verification server remains available for manual testing.

> AGENT GENERATED

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
## Human comments

## What was wrong

The shared plugin keyed-query cache removed inactive rows when
refreshing visible rows. After switching threads, refreshing the current
thread's PR could evict the previous thread's cached PR, so switching
back hid the banner until another request completed. The same cache also
serves per-thread notification settings and third-party keyed RPC reads.

## What changed

Retain inactive rows and their key tags during refreshes, track their
invalidation separately, and refresh stale rows when consumers subscribe
again while displaying their last successful values. Inactive dirty rows
no longer suppress subsequent refreshes of active rows. Updated the
cache documentation and optimistic-update expectations to reflect
retained values. Bumped the Plugin SDK to 0.6.81 because its published
runtime bundles include the cache change.

## How you verified

- Added a table-driven regression for manual refresh, invalidate-all,
and key-tag invalidation. All three failed before the fix and pass
afterward; the cases also verify immediate cached values on
resubscription and repeated active-row refreshes.
- `pnpm exec turbo run test lint typecheck --filter=@bb/query-tags`: 45
tests passed, typecheck passed, lint had no errors and two existing
warnings.
- `pnpm exec turbo run test --filter=@get-bb/plugin-sdk --
src/testing/__tests__/rpc-keyed-store-contract.test.tsx
src/testing/__tests__/rpc-query-host.test.tsx`: 13 tests passed.
- Started an isolated `pnpm start:worktree` server and prepared two idle
PR threads for manual verification. Server/daemon health and both PR
lookups succeeded; browser switching has not been verified by the agent.

- `node packages/plugin-sdk/scripts/check-npm-version-guard.mjs`: passed
for SDK 0.6.81.

> AGENT GENERATED
## Human comments

## What was wrong

Accepted optimistic thread predictions were written into the stored
server row. If a turn finished or stopped before its mutation response
arrived, accepting the prediction could overwrite the server's idle
state with active or stopping. With realtime connected, nothing
necessarily refetched that row, leaving the sidebar spinner running.

## What changed

Keep accepted predictions as overlays until a server read started after
acceptance confirms them, or confirm them explicitly with a sufficiently
recent response row. Thread metadata mutations use their returned rows;
send, send-now, stop, and stale responses trigger a detail read-back.
Preserve pending predictions while confirming accepted ones and document
the keyed-store contract.

## How you verified

- Rebased cleanly onto origin/main.
- `pnpm exec turbo run typecheck test --filter=@bb/query-tags
--filter=@bb/app`: typechecks passed; all 48 query-tags tests passed;
app tests had 6,315 passes and one plugin-settings autosave assertion
failure. All changed-area tests passed.
- `pnpm exec turbo run test --filter=@bb/app --
src/components/plugin/PluginSettings.test.tsx`: all 20 tests passed on
rerun without changes.
- `pnpm start:worktree --dryrun` passed twice; the second run had 57/57
cache hits. Started `pnpm start:worktree` and checked server/daemon
health and checkout ownership.
- In the browser, sent a real initial turn and follow-up, pinned the
thread, then sent another follow-up and clicked Stop. The sidebar
spinner cleared on completion and stop; the API reported idle. Reload
preserved the pinned thread with no working indicator.
- The verification inventory helper reports an unmapped diagnostics CLI
family; no inventory baseline was changed.

Owner-authenticated preview: [prepared test
thread](https://ymichael--22278.getbb.app/threads/thr_cfsv3itun2).

Sanity check: send a short follow-up and confirm the sidebar spinner
clears when it finishes. Send another and click Stop; confirm it clears
again without refreshing. Pin/unpin or rename the thread and reload to
check persistence.

> AGENT GENERATED

Co-authored-by: Claude Opus 5.5 <[email protected]>
## Human comments

## What was wrong

`buildFrpcConfig` (`packages/frp-client/src/config.ts`) never set
`transport.poolCount`, so it defaulted to 0 and frps kept no idle work
connections for bb connect next. In frp v0.71.0 (the version pinned in
`packages/tunnel-contract/src/next.ts`), `server/control.go`
`GetWorkConn` handles an empty pool by sending `ReqWorkConn` and waiting
for frpc to dial a connection, which costs an extra round trip. After
every take it sends another `ReqWorkConn` to replenish. frps's vhost
HTTP proxy keeps only `MaxIdleConnsPerHost: 5`, so a burst of more than
5 parallel requests needs new work connections. One example is the web
app refetching every active query when a tab resumes. Each of those
requests waits a round trip, and the replenish requests then overflow
the `poolCount + 10` work-conn channel. `RegisterWorkConn` rejects the
extra connections, and frpc logs this as `StartWorkConn contains error:
work connection pool is full, discarding`. The user's server log showed
16–21 of these per burst on 2026-10-23.

## What changed

- `buildFrpcConfig` now sets `transport.poolCount: 10`. That is the
gate's `maxPoolCount` (`apps/connect-next/src/frps.ts`), so frps uses
the full value instead of clamping it. frps now pre-requests 10 work
connections at login and keeps the pool full, and the channel capacity
grows to 20, which covers the bursts we observed. frp multiplexes work
connections as streams over the existing control connection by default,
so idle pooled connections are cheap.
- Logging is unchanged. The plugin already forwards every frpc line at
`info` level (`packages/frp-client/src/supervisor.ts` `onLine`). Fewer
of these lines should appear now, and lowering the level for one benign
message doesn't seem worth a special case.
- No wire or CLI changes.

## How you verified

- `pnpm exec turbo run test typecheck --filter=@bb/frp-client
--filter=./plugins/connect-next`: all passing (frp-client 40 tests;
connect-next 28 tests, including `frp-e2e.test.ts`, which launches the
real frps/frpc binaries with the generated config and tunnels requests
through it).
- Updated the exact-config assertion in
`packages/frp-client/test/config.test.ts`.

> AGENT GENERATED

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
## Human comments

## What was wrong

When frps can't complete a request, it answers with frp's built-in
unstyled 404 page ("The page you requested was not found… Faithfully
yours, frp."). That happens for a shared port whose local server isn't
running, and for a subdomain whose proxy isn't registered yet during a
reconnect. connect-next's gate passed that response straight through to
the browser, so users saw frp's page instead of a bb connect one.

## What changed

- `apps/connect-next/src/pages.ts`: moved the HTML shell out of
`gatePage` into a new `gateDocument` function. Added
`unreachablePageHtml()`, a page in bb connect's style ("Nothing answered
at this address") that refreshes every 10s and has a Retry button. The
wifi-off glyph is now a shared constant used by both this page and
`offlinePage`.
- `apps/connect-next/src/frps.ts`: `startFrps` writes that page to
`404.html` in frps's temp dir and passes its path as frps
`custom404Page`. In frp v0.71.0 this option is defined in
`pkg/config/v1/server.go`, and frps serves the page from both
`NotFoundResponse` (no proxy for the host) and the vhost proxy
`ErrorHandler` (the local service refused the connection).

No wire changes and no CLI or doc changes.

Known limits:
- frps always returns this page as a 404, whatever the request's
`Accept` header says. frp's own page behaves the same way today.
- A timeout inside frps still returns an empty 504. This is rare,
because the gate's own head deadline usually fires first.

## How you verified

- New e2e test in `apps/connect-next/test/gate.e2e.test.ts`: "answers
with a bb page when nothing listens behind a proxy". It points an frpc
proxy at a closed port, then checks for a 404 whose body contains the bb
page and no "frp". It fails without the frps change and passes with it.
- `pnpm exec turbo run typecheck test --filter=@bb/connect-next`:
typecheck passes, 91 tests pass, none skipped.

> AGENT GENERATED

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
get-bb#6253)

## Human comments

## What was wrong

**Scroll-to-bottom button shows while at the bottom.** Collapsing a tool
call near the end, while scrolled up a little, clamps the view to the
end, but the keeper stayed detached. It attached only through
event-specific rules, and get-bb#5951 deliberately never attached on a content
shrink. On touch the clamp usually falls inside the 3s momentum window
after a drag, so that path missed too. Every attach bug since get-bb#5951 has
had this shape: the view reached the end through a path no rule covered.

**Unread threads did not open at NEW.** Where the view landed on open
came out of five independent pieces: the read-state snapshot, the loaded
rows, the divider's own one-shot scroll, the saved-position restore, and
the keeper. Each assumed different timing:
- Clicking an unread thread in the sidebar supplied placeholder data to
automatic read tracking before the opening snapshot was ready. Marking
it read erased the unread cutoff before the divider could capture it.
- Reopening a thread first renders a cached copy that still reads as
read. When the fresh copy made the thread unread, the divider was
treated as a live reply and not revealed.
- The first page holds the latest 8 segments on phone and 20 on desktop,
and every user-side row starts a segment, including messages from other
agents. When the cutoff was older than that page, NEW sat above the
oldest loaded row, and then moved as older rows loaded.
- The reveal used estimated heights for windowed rows. Rows rendering
around it pushed NEW down the screen.
- A thread marked unread put NEW above the oldest loaded row, which in
paged history is not the thread's start.

These predate get-bb#5951: the pre-get-bb#5951 build fails these cases as well.

## What changed

Two structural changes replace the per-case rules.

**One attach rule** (`scroll-position-keeper.ts`). A detached view
within the 4px threshold of the end attaches, whatever put it there,
unless a restore is still waiting for its row.
- It attaches at once when the reader's scroll, a navigation, or a
completed restore put it there.
- It attaches on the next frame when only layout did, so content that
shrinks and regrows within a frame does not attach.
- This replaces the wheel-down, touch-drag, End/PageDown and
resize/restore-at-end rules. The touchmove listener goes too.
- Moving up out of the end still detaches, and content changes still
never detach.
- A view the reader never placed, such as a tool output box that was not
streaming when it opened, is attached by layout only when the reader or
a navigation brings it to the end, as on main. Otherwise output loading
in after the box opens would pull it down.

**One landing decision.**
- `useThreadUnreadDividerState` takes its snapshot from the first fresh
copy of the thread (`hasFreshThread` from `useThreadDetailThread`),
never cached or placeholder data.
- The same hook owns automatic read tracking and waits until the opening
snapshot is ready before marking the thread read. Later refreshes retain
that readiness, preserving normal manual-unread behavior.
- `TimelineRowsList` decides once, against the loaded rows, whether the
cutoff is inside them. If it is not, there is no divider, no automatic
paging back, and it stays dropped when the reader pages back by hand.
- If it is, the list lands through the keeper's existing restore path,
with the divider as the anchor. The divider carries
`data-scroll-landmark-id`, which the keeper can now anchor to like a
row. The keeper then holds NEW at the top while rows render around it. A
reader who already scrolled keeps their position.
- Threads marked unread (no read time) get no divider and open like a
read thread. The `before-first` placement is removed;
`ThreadTimelineUnreadDividerPlacement` is now `{ cutoffAt }`.
- Removed: the divider's own scroll effect and retry loop, and
`scrollElementIntoViewClampedToMaxScroll` (only the divider used it).

`docs/timeline-pagination.md` documents the attach rule and the landing
decision. Client only; no wire, CLI or plugin API change.

## How you verified

Latest sidebar-opening fix:

- Reproduced in the worktree app by clicking an unread thread in the
sidebar: NEW was absent and the timeline opened at the bottom.
- Extended the existing randomized opening test to include cached
sidebar placeholders and the real automatic read-tracking hooks and
mutation. The test failed before the fix with “no NEW although the read
point is in the first page” and passed after it.
- `pnpm exec turbo run test --filter=@bb/app --
src/views/thread-detail/thread-opening.model.test.tsx
src/views/thread-detail/useThreadUnreadDividerState.test.ts
src/hooks/useThreadReadTracking.integration.test.tsx`: 14 tests passed,
including 40 randomized opening sequences.
- `pnpm exec turbo run lint typecheck --filter=@bb/app`: passed; lint
reports warnings, no errors. `git diff --check` passed.
- Rebuilt with `pnpm start:worktree` and repeated the actual sidebar
click in Chromium. NEW remained visible after the thread was marked read
and landed within 1px of the viewport top. Server and daemon health
checks passed.

Earlier branch verification (before the sidebar-opening fix):

- Keeper tests:
  - attaches after a persisting shrink;
  - attaches after a collapse during momentum;
  - stays detached through a one-frame shrink;
- attaches after a viewport grow, a restore landing, or a navigation at
the end;
- lands on a landmark and holds it at the top while a row above it
resizes.
- The touch-drag-at-end test was removed with its rule; the one-rule
tests cover that case.
- Divider tests:
  - snapshot from the fresh copy after reopening on cached read state;
  - no reveal for a reply after the thread settled;
  - a thread marked unread gets no divider;
- a cutoff outside the loaded rows is dropped and stays dropped after
older rows load.
- New randomised test `scroll-position-keeper.model.test.ts`.
- What it drives: random sequences of wheel and touch scrolls, row
toggles held at the header, streaming, removals, prepends, regroups,
one-frame shrinks, viewport resizes, navigations, restores and jumps to
the bottom. It runs with and without iOS write deferral, and fires the
browser's clamp scroll both before and after the resize callbacks.
  - What it checks after every step:
    - attached exactly when the view is at the end;
    - content changes never detach;
- the reading row never moves without the reader, unless the content
cannot hold it;
    - a reader's scroll is never moved.
- On main's keeper, 75 of 300 sequences fail with "detached while at the
end": 43 triggered by rows removed at the end, 13 by a toggle, and 19 in
tool-output-box configuration.
- On this keeper, 0 of 5,000 fail. CI runs 200 sequences (about 7s); set
`KEEPER_MODEL_SEEDS` for deeper runs.
- New randomised opening test `thread-opening.model.test.tsx`.
- What it renders: the timeline with the thread view's own loading path.
That covers the bootstrap and thread queries (moved into
`useThreadDetailThread`, which `ThreadDetailView` now uses), the divider
state, the timeline controller, the scroll body and the keeper.
  - The fake server pages a random history the way the real one does.
- Each run picks a fresh open or a return after random time away, a
random read state, phone or desktop page size, and a random order for
the bootstrap, thread and timeline responses. Sometimes the reader
scrolls while they load.
- What it checks: NEW sits above the first unread row of the whole
history; it is at the top unless the reader scrolled or the view is at
the end; it shows whenever the cutoff is inside the first page;
otherwise the saved position or the bottom stands.
  - Coverage over 200 runs:
- NEW landed at the top 43 times (16 returns, 22 phone), with the view
at the end 53 times;
- opened at the bottom 70 times, and at a saved or scrolled spot 25
times;
    - the reader scrolled while loading 18 times.
  - Reintroducing each opening bug fails it:
- trusting the cached thread copy (NEW left 2513px down after a return);
    - NEW above the first loaded row;
- the one-shot reveal (NEW 156px above the top once real heights replace
estimates).
  - CI runs 40 sequences (about 8s); set `OPENING_MODEL_SEEDS` for more.
- `pnpm exec turbo run typecheck lint test --filter=@bb/app`: 647 files,
6312 tests passed.
- Real-browser A/B against a live server: headless Chromium; phone runs
at 402px with touch emulation. Each build was served through a proxy
that rewrote an idle 46-segment thread's read state. "back" means
switching to another thread and returning. Where NEW landed, relative to
the viewport top ("bottom" = attached at the end with no divider):

  | Cutoff | Size | main fresh / back | branch fresh / back | Expected |
  |---|---|---|---|---|
  | After the last message | desktop | 0 / -231 | 0 / 0 | NEW at top |
  | After the last message | phone | 0 / -733 | 0 / 0 | NEW at top |
  | 2 segments back | desktop | 1 / -2627 | 0 / 0 | NEW at top |
  | 2 segments back | phone | 0 / -4587 | 0 / 0 | NEW at top |
| 26 segments back | desktop | -4512 / -15548 | bottom / bottom | bottom
|
| 26 segments back | phone | -12197 / -10604 | bottom / bottom | bottom
|
| Marked unread | desktop | -16086 / -15629 | bottom / bottom | bottom |
  | Marked unread | phone | -14405 / -10604 | bottom / bottom | bottom |

- Collapse bug A/B:

  | Scenario | main | branch |
  |---|---|---|
| Desktop: wheel up 40px, then collapse | at end, detached (button
shows) | attached |
| Phone: touch drag 60px, then tap to collapse | at end, detached |
attached |
| Wheel up 200px / drag 250px, then collapse | stays detached, 106 /
157px from end | same, header in the same place |

- Guards, identical on main and branch:
  - wheeling back through history: 24 steps, 0 jumps;
- switching away and back restores the same row at the same offset
(-358);
  - a mid-thread toggle keeps the header fixed (443 → 443 → 443);
- scrolling up 300px detaches and shows the button, and scrolling back
down re-attaches and hides it.

> AGENT GENERATED

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
## Human comments

## What was wrong

Every plugin frontend waited for the shared Pierre diff engine and
syntax-highlighting dependencies, even when it never imported them. This
put optional renderer code on the startup path for essential plugins
such as the composer and sidebar.

## What changed

Rebased onto origin/main after get-bb#6295 merged; this PR reuses its lazy SDK
renderer components.

Plugin builds record their shared runtime dependencies in
`app.meta.json` as `runtimeSlots`. The server validates and returns
those slots. Before evaluating a plugin, a generic registry loads the
required lazy groups in parallel while preloading the plugin bundle.
Each group uses a cached, retryable loader; Pierre's core and React
bindings are the first group. Each plugin bundle URL is preloaded once,
whether the boot hook, the download-ahead step, or the lazy-runtime path
asks first.

Older artifacts without metadata remain compatible by receiving all
runtime slots. Such bundles can still trigger unnecessary Pierre
downloads, so mixed installations may see smaller download savings. The
normal bundled-plugin build emits the new metadata; no rebuild migration
or compiled-bundle inference is introduced.

The app's bundle budget adds a PluginFrontend closure that forbids
Pierre and Shiki, with limits 25% above its measured 528.9 KB raw /
165.3 KB brotli. Documentation describes the runtime dependency contract
and its distinction from render-time SDK component splitting. No
server/daemon wire change or public SDK member is introduced. The new
response field changes bundled SDK declarations; main's unpublished
0.6.81 bump (get-bb#6308) covers it, so this PR does not bump the SDK version
again. If 0.6.81 is published before this merges, it needs a new bump.

## How you verified

- Production bundle-budget check on the rebased branch passes:
PluginFrontend closure is 528.9 KB raw / 165.0 KB brotli beyond the boot
payload against the new 661.1 KB / 206.6 KB limits, with Pierre/Shiki
excluded. These are combined results with get-bb#6295, not an isolated speedup
measurement.
- Plugin builder suite (13 tests) covers recorded `runtimeSlots`; server
artifact suite (13) covers validation and the legacy all-slots fallback;
CLI plugin-build suite (9) covers metadata output.
- App plugin loading, retry, reload, load-order, boot, cold-renderer and
bundle-budget tests pass (97 across the touched files).
- Typecheck for app, server, plugin-build, CLI and demo-server passes;
app and plugin-build lint pass.
- Plugin SDK npm version guard passes (0.6.81 is not yet on npm).
- `pnpm exec turbo run prepare:bundled --filter=bb-plugin-bb--composer`
passed earlier; its emitted artifact lists `runtimeSlots` without
Pierre. No new browser timing measurements were taken for this PR.

> AGENT GENERATED

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…he (get-bb#6210)

## Human comments

## What was wrong

`GET /api/v1/projects/:id/commands` took 1.0–1.3s on cold calls (10
times in an hour on a real server, once per thread view), which delayed
the composer. The route ran four lookups in parallel. I timed each one
with temporary logs on a dev server: the native-root scan, workspace and
shared skills, and the skill catalog took under 25ms combined. All the
remaining time went to the `provider.list_commands` host RPC. That RPC
uses the daemon's maintenance runtime, which (since get-bb#4022) waits for a
fresh login-shell environment once its 10s cache expires. It also
restarts the provider bridge after 60s idle, and Claude Code re-probes
its initialization. The server cached none of this, so every view
outside those short windows paid the full cost again.

Measured on a dev server, personal project, Claude Code:

| Call | Shell env refresh | Bridge start | Request | Route total |
| --- | --- | --- | --- | --- |
| cold | 2152ms | 0 | 1ms | 2.18s |
| +12s | 1723ms | 0 | 1ms | 1.75s |
| +70s | 695ms | 477ms | 190ms | 1.38s |
| +130s | 619ms | 492ms | 184ms | 1.32s |
| immediate repeat | 0 | 0 | 0 | 15–25ms |

## What changed

- New `apps/server/src/services/providers/provider-live-commands.ts`: a
cache of live provider commands keyed by host, provider and cwd, held in
`AppDeps.providerLiveCommands` next to `providerNativeRoots`.
  - A cached answer is served as is for 60s.
- After 60s it is still served immediately, while one background refresh
runs.
- If the refreshed list differs, the server sends a new
`provider-commands-changed` host change. The app's realtime registry
maps it to the project command queries, so an open composer refetches.
- A failed refresh keeps the previous list and is retried on the next
read. A failed first load is not cached and falls back to scanned
commands only, as before.
- Concurrent reads share one in-flight load. At most 256 entries are
kept.
- The route calls `listProviderLiveCommands` in place of the removed
`listProviderLiveCommandsBestEffort`.
- The native-root scan and skill catalog are still read on every
request, so commands and skills added or edited on disk appear on the
next request. Live commands only add names the scan doesn't already
list, so a stale live list can only miss provider extras (for example a
newly installed Claude plugin) until its refresh lands.
- `HOST_CHANGE_KINDS` gains `provider-commands-changed`. Clients parse
change kinds leniently, so older clients ignore it. This is a server/app
change only: the daemon wire is untouched, so there is no
`HOST_DAEMON_PROTOCOL_VERSION` bump.
- `docs/provider-bridge-protocol.md` (Command catalog) describes the
caching.

The first view of a new cwd still waits for the live answer (about
0.7–2s, as before), so `bb project commands` and the SDK still get a
complete list on first call. Making that miss faster means letting
maintenance requests use a stale shell environment in the daemon, which
get-bb#4022 chose not to do. I left that for a separate change.

## How you verified

- `test/services/providers/provider-live-commands.test.ts` covers four
cases: a failed refresh keeps the old list and the next read retries; a
failed first load is not cached; concurrent first reads share one load;
one refresh per stale window, with no change signal when the list is
unchanged. The last test first failed on a real race: the in-flight
marker was cleared before the refreshed list was stored, which allowed a
duplicate refresh. The implementation now stores before clearing.
- `test/public/public-project-commands.test.ts` has a new route-level
case. A second request inside the window makes no
`provider.list_commands` RPC but still shows a newly scanned skill.
After the window, the cached list is served, one refresh runs,
`provider-commands-changed` is pushed, and the next request returns the
new command.
- Dev server re-measurement after the fix, same sequence: cold 1.36s
(nothing cached yet), then 15ms, +12s 83ms, +70s 20ms, +130s 28ms.
- `pnpm exec turbo run typecheck --filter=@bb/server --filter=@bb/app
--filter=@bb/integration-tests` passed.
- `pnpm exec turbo run lint --filter=@bb/app` passed.
- `pnpm exec turbo run test --filter=@bb/domain` passed. Targeted
`@bb/app` (`realtime-cache-effects.test.ts`) and `@bb/server`
(`hub.test.ts`, `public-project-*`) tests passed.
- Full `pnpm exec turbo run test --filter=@bb/server`: 3684 passed and 1
failed. The failure was `public-thread-timeline-scrollback.test.ts`
under parallel load; it passes when run alone.

> AGENT GENERATED

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
…tch (get-bb#6219)

## Human comments

## What was wrong

Every new thread gets its own worktree, so the first command-list lookup
for a thread always reaches the machine, even with the server-side cache
in get-bb#6210. On the machine, `provider.list_commands` ran through
`withMaintenanceRuntime`, which waited for a fresh login-shell
environment whenever the cached one was more than 10s old. That wait is
0.6–2.2s depending on the shell. get-bb#4022 made thread start use the last
resolved environment and refresh it in the background, but kept every
maintenance request blocking, so command listing still paid for the
login shell. Separately, `shouldPrefetchCommandCatalog` prefetched the
catalog whenever focus entered a composer on a coarse pointer. Opening a
thread focuses its composer, so every thread open on a phone sent this
request, even when nobody typed a command.

## What changed

**Daemon (`apps/host-daemon/src/app.ts`).** `withMaintenanceRuntime` now
takes the shell-environment refresh mode explicitly at each call site:

| Request | Shell env | Why |
| --- | --- | --- |
| `provider.list_commands` | last resolved, refreshed in background |
Command names don't depend on a just-changed PATH, and the thread that
uses them already starts on the last resolved environment (get-bb#4022). |
| `provider.usage` | last resolved, refreshed in background | Quota/plan
display, polled and cached for 10s on the server. Errors aren't cached
there, so if a stale PATH ever causes one, the next poll runs on the
refreshed environment. |
| `provider.list_models` | fresh | The server clears the model-catalog
failure right after a successful CLI install and fetches again. A stale
PATH there would record a failure that sticks for the catalog's failure
TTL. The catalog is persisted, prewarmed and served
stale-while-revalidate on the server, so the wait rarely reaches a user.
|
| `provider.health` | fresh | This is the "is the CLI installed and
signed in" answer shown after install/login. It must see the current
PATH. |
| `provider.installation.status` / `.run` | fresh | Unchanged from
get-bb#4022: they must see a just-installed CLI on PATH. |

The first resolution after daemon start still blocks for every request.
The cache only serves a stale environment once one has been resolved. No
wire fields change, so there is no `HOST_DAEMON_PROTOCOL_VERSION` bump.

**App.** The coarse-pointer focus prefetch is gone, along with
everything that existed only for it:
- the `focusin` listener in `composer-root.tsx`;
- `prefetchCommands` / `useComposerCommandPrefetch` in
`composer-search.tsx`;
- `composerFocused`, `shouldPrefetchCommandCatalog` and
`prefetchCommandCatalog` in `useCommandSuggestions.ts`;
- `projectCommandsQueryOptions`, now inlined back into
`useProjectCommands`.

The catalog loads on the first `/` or `$` query. On first open the menu
shows what it already has (prompt-action commands such as `plan` and
`goal`) with the refreshing spinner, then fills in the catalog. With
nothing to show yet, it shows the existing "Searching commands…" row.
`docs/api_to_audit.md` (composer search contract) now says that commands
load on the first command query rather than when focus enters the
composer.

This is independent of get-bb#6210 and based on main. The two together make
the first lookup in a new worktree cheap: get-bb#6210 serves repeat lookups
from the server, and this change removes the login-shell wait from the
misses.

Remaining cost on a miss: the maintenance runtime still restarts after
60s idle, plus Claude Code's startup check (about 350ms total in the
measurements below). One race existed before this change and is
unchanged: if a background refresh finds a *different* PATH while a
listing request is in flight, `replaceBaseShellEnv` shuts down the
maintenance runtime under that request. The shell env holds only PATH
and bb's own variables, so this only happens when PATH actually changes.

## How you verified

- `apps/host-daemon/src/app.test.ts`: a table test runs each of the six
maintenance RPCs with an expired shell env and a pending login-shell
resolution. `list_commands` and `usage` answer on the last resolved env
without waiting. `list_models`, `health`, `installation.status` and
`installation.run` don't reach the runtime until the fresh env resolves,
and then run on it. A second test checks that `list_commands` still
waits for the first resolution after daemon start. Flipping
`listCommands` to blocking, or `providerHealth` to stale, fails the
matching case.
- `apps/app/src/hooks/useCommandSuggestions.dom.test.tsx`: the real hook
makes no catalog request before a trigger, reports `isLoading` while the
first request is pending, then returns the catalog.
- `pnpm exec turbo run test --filter=@bb/host-daemon`: 823 passed, 12
skipped.
- `pnpm exec turbo run test --filter=@bb/app --
src/hooks/useCommandSuggestions src/components/promptbox
src/components/plugin/PluginNewThreadComposer`: 599 passed.
- `pnpm exec turbo run typecheck --filter=@bb/app
--filter=@bb/host-daemon` and `pnpm exec turbo run lint
--filter=@bb/app` (0 errors) passed.
- Phone-width check on a `pnpm start:worktree` build: Chrome at 390×844
with `pointer: coarse` emulated. Tapping into the new-thread composer
sent no `/commands` request. Typing `/` sent one request; the menu
showed the prompt-action commands with the spinner, then the full
catalog when the (artificially delayed 1.5s) response landed.

**Measurements.** `GET
/api/v1/projects/:id/commands?provider=claude-code` on a `pnpm
start:worktree` instance (main without get-bb#6210, so every call reaches the
daemon). This machine's login-shell resolution takes about 570ms. Before
= this branch with `listCommands` switched back to `allowStale: false`,
otherwise identical build.

| Call | Before | After |
| --- | --- | --- |
| +15s (env stale, runtime warm) | 602ms, 603ms | 32ms, 34ms |
| +70s (env stale, runtime idle-restarted) | 936ms, 913ms | 357ms, 342ms
|

> AGENT GENERATED

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
ymichael and others added 28 commits October 28, 2026 13:29
…6478)

## Human comments

## What was wrong

The workspace-protection test scanned storage immediately after clearing
another thread's files. The real cleanup handler returns after moving
those files to a `.bb-trash-*` directory and deletes the trash in the
background. If the scan won that race, it correctly counted the
temporary trash as an extra orphan. This matches the Windows failure in
[run
40578948054](https://github.com/get-bb/bb/actions/runs/40578948054):
expected one orphan, observed two.

## What changed

Wait for the host test harness's retained cleanup workers to finish
before scanning. This adds three test-only lines using the same
completion check already present in the test's teardown. All
workspace-protection and orphan-removal assertions remain intact. No
production, timeout, retry, cache, or workflow changes.

## How you verified

- A temporary diagnostic held real trash deletion until after the real
disk measurement, releasing it earlier if the fixture awaited worker
completion. Baseline failed with the exact `expected 2 to be 1`
orphan-count error; the repaired fixture passed with the same
scheduling. Instrumentation was removed before committing.
- `pnpm exec turbo run test lint typecheck
--filter=bb-plugin-bb--storage-retention`: all 82 tests across four
files passed; lint/typecheck passed.
- `pnpm exec oxfmt plugins/storage-retention/src/storage.test.ts` and
`git diff --check` passed.

> AGENT GENERATED
## Human comments

## What was wrong

Fixes get-bb#3833: CLI spawn/tell --plan produces a structured builtin plan
mention, but the server accepted it even when the provider declared no
plan composer action. Current main still accepts these requests: the new
create regression resolves to a thread, and the send regression resolves
to { ok: true, delivery: "sent" } instead of rejecting.

## What changed

Thread create and send reject unsupported structured plan requests with
HTTP 400 invalid_request and a provider-specific message advising
removal of --plan. Creation validates after catalog fallback selects the
effective provider. This server gate also covers SDK callers using the
same structured command. The CLI messaging guide documents the
rejection.

The only intended visible behavior change is rejecting unsupported
structured plan requests (including Pi and ACP). Providers declaring
plan support still accept them; manually typed /plan text remains
literal text. No wire fields, daemon protocol version, or SDK signatures
change.

## How you verified

- Added real migrated-database harness tests at both request admission
entry points; both fail against main's production code because the
requests resolve successfully, and pass with the fix.
- pnpm exec turbo run test --filter=@bb/server --
test/threads/thread-plan-capability.test.ts
test/providers/provider-plan-command.test.ts
test/threads/thread-create-seed-without-run.test.ts
test/threads/thread-send-dispatch.test.ts: 68 passed across four files.
- pnpm exec turbo run lint typecheck --filter=@bb/server: successful;
the selected tasks include server typecheck (no server lint script).
- oxfmt and git diff --check passed.
- Reviewed the final diff using docs/CODE_REVIEW.md and the deslop
skill. No outstanding findings. Live provider, UI, and end-to-end CLI
execution were not run; the regression uses the same structured input as
the CLI against real server request handlers.
- Production diff: +42/-1; tests: +159; guide: +2/-1.

Fixes get-bb#3833

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

> AGENT GENERATED

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…get-bb#6474)

## Human comments

## What was wrong

The ACP bridge discarded an advertised model config option's error and
tried the optional `session/set_model` extension without evidence that
the agent supported the selected model through that interface. This
could hide the actionable error behind OMP's unsupported-method error.
Confirmed on main by running the regression test with main's production
bridge: the promise resolved with `selected-model:fake/strong` instead
of rejecting with the original config error.

## What changed

Preserve the original config error unless the session's advertised
models include the requested model. Keep fallback for agents that
advertise that model, and teach the dynamic integration fixture to
implement its advertised config option.

The only intended visible change is that failed model configuration no
longer invokes an unadvertised model extension and instead reports its
original error. Successful configuration, advertised fallback, and model
selection through session models remain supported. No server/daemon wire
changes or new CLI/SDK surfaces.

## How you verified

- Negative control: regression test fails against current main's
production bridge for the expected swallowed-error behavior.
- `pnpm exec turbo run lint typecheck test
--filter=@bb/provider-bridge-acp`: passed; 545 tests passed, 4 skipped,
25 test files. Includes the regression, advertised fallback, and
recorded conformance.
- `pnpm exec turbo run test --filter=@bb/integration-tests --
fake/smoke/dynamic-acp-agent.test.ts`: passed, one integration smoke
test.
- Formatting and `git diff --check` passed.
- Default parity comparison reported stale historical allowlist entries
with identical output; affected-provider parity rerun with an empty
allowlist passed: 10 cells passed, 0 failed, 1 process-scoped cell
skipped. No event or row differences.
- Real OMP was not rerun in this checkout; this verification uses the
subprocess bridge fixture and recorded ACP traffic.

Fixes get-bb#2925

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

> AGENT GENERATED

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
## Human comments

## What was wrong

[Issue get-bb#3959](get-bb#3959) remains
reproducible in main's provider boundary: disabling subagents only
registers a PreToolUse deny hook, so no disallowedTools reaches Claude.
The supplied commit removes Agent/Task but leaves ListAgents visible. A
real Claude Code 2.1.312 process against a local mock Messages API
confirmed ListAgents remains with only Agent/Task disallowed.

## What changed

Disabled sessions pass Agent, Task, and ListAgents as disallowedTools,
removing their tool definitions and embedded agent catalog from the
model's offered tools. Retained the hook as a backstop, including
ListAgents, for settings changed through steering during an active turn.
Unchanged settings keep the process; changed settings restart it before
the next new turn and resume the same provider session ID. The default
remains false. The setting description, provider overview, skill and
configuration reference document this behavior. Workflow behavior is
unchanged and is not claimed fixed.

**Why toggling restarts Claude (visible change):**

SDK 0.3.245 exposes disallowedTools only as a query construction option.
Its live applyFlagSettings({permissions: {deny: [Agent, Task,
ListAgents]}}) call succeeds but leaves the tools in the next model
request. Captured actual HTTP requests for enabled → disabled → enabled
in a single process. Tested both installed Claude Code 2.1.312 and the
SDK's bundled CLI: live deny settings do not change the offered tool
definitions; launch-time disallowedTools does. No supported live
tool-list replacement API exists in the installed Query contract.
setMcpServers changes MCP tools, not built-in tools.

The process restart may add latency and clears process-local/background
work, but resumes the persisted conversation. Steering does not
interrupt the current turn: the deny backstop applies immediately when
disabling, with tool-list replacement deferred to the next new turn.
Re-enabling similarly restores the offered tools on the next new turn.

## How you verified

- Regression against main production files: two parameterized cases
fail. Initially disabled fails because disallowedTools is undefined;
initially enabled fails because no replacement occurs on toggling.
Source restored byte-for-byte afterward.
- Final `pnpm exec turbo run test lint typecheck
--filter=bb-plugin-provider-claude-code`: 410 tests in 28 files pass,
lint and typecheck pass.
- Tests cover initial disabled/enabled states, unchanged settings
without restart, both toggle directions, steering without interrupting
the process, hook denial/allowance, and resume with the same provider
conversation ID.
- `pnpm parity --old /tmp/bb3959-main --new . --provider claude-code
--allowlist /tmp/bb3959-empty-allowlist.json`: 13 passed, 0 failed, 1
process-scoped recording skipped. Empty allowlist intentionally used
because the repository's default historical allowlist reports stale
entries when comparing two current revisions; no event/row differences
are suppressed.
- Real CLI request probes used a local mock API, fake API credentials,
isolated working directories and no project/user settings. These prove
tool payload behavior without an LLM self-report or external model
request; they do not measure token savings or execute a real subagent.
- Independent mutation proof: removing the deny hook and making it
always deny both fail the old live-settings test and both new
parameterized cases at their intended assertions. Temporary files
restored byte-for-byte.
- oxfmt, git diff --check, and review against docs/CODE_REVIEW.md /
deslop completed.

Fixes get-bb#3959

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

> AGENT GENERATED

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
## Human comments

## What was wrong

Notify parent (auto / stuck / off) could only be changed one thread at a
time, from the thread info panel. It wasn't a thread action, so it was
missing from the thread menus and from the sidebar's multi-select menu.
Setting it for several child threads meant opening each one.

## What changed

- **Core thread action:** a new `parentNotifications` action in
`CORE_THREAD_ACTIONS` offers Auto / When stuck / Off choices.
- A child thread's menu shows its current value: desktop menus, the
right-click menu and the compact long-press drawer. Root threads don't
get the item.
- Its `experimental_bulkItem` shows the shared value or "Mixed" for a
sidebar selection. It applies the pick to the selected threads that have
a parent, skips threads already at that value, and notes "Applies to N
threads with a parent" when the selection includes root threads.
  - Updates go through `sdk.threads.update`, with the usual error toast.
- **Plugin SDK:** `PluginThreadActionTarget` and `PluginSidebarThread`
gain `parentNotifications`, so the action reads the value from the
thread payload. Filled in by the app's target builders,
`plugin-sidebar-threads`, and the thread-list plugin's target builder.
Plugin SDK 0.6.97. `docs/api_to_audit.md` (thread action core callers)
and the bb-plugin-authoring sidebar DTO reference are updated.
- **Shared labels:** the info panel row and the action share one option
list (`apps/app/src/lib/parent-notifications.ts`).
- **Icon:** Notify parent uses a megaphone (Hugeicons `Megaphone02Icon`,
registered as `Megaphone02`) in the action and the info row. It replaces
the bell, which matched the push Notifications action directly above it.
- No server, daemon wire or CLI changes. `bb thread update
--parent-notifications` already covers per-thread changes.

## How you verified

- `ThreadActionsMenu.test.tsx`:
  - Every menu surface lists "Notify parent, Auto" for a child thread.
- New selection test: two children (one already Off) plus a root thread,
pick Off. Expects one `threads.update` call, for the child that wasn't
Off. It fails without the bulk item.
- Turbo typecheck `...[origin/main]`. Lint for `@bb/app`.
- Tests: `@bb/app`, `@bb/shared-ui`, `@get-bb/plugin-sdk`, and plugins
thread-list, push-notifications, git, github-pr-status, provider-usage,
bb-guide and plugin-api-docs.
- Manual, on `pnpm start:worktree` with CLI fixtures (a parent with auto
/ stuck / off children plus a root thread):
- Cmd+Shift-selected two children and the root, right-clicked, Notify
parent → Off. `bb thread show` confirmed both children `off` and the
root still `auto`. The menu then read "Notify parent, Off".
- Checked the single-thread menus at 1440×900 and 1024×768, the phone
long-press drawer step at 390×844, and the info panel row, against
`origin/main`'s bundle on the same data.

> AGENT GENERATED

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
## Human comments

## What was wrong

Switching to a thread whose environment has git changes made the
timeline jump up about 35px for one frame and then drop back, at the
moment the "Committed · N files" bar appeared above the composer. The
follow-up composer is meant to absorb a collapsed banner: it shrinks its
editor by the prompt stack's measured height, so the footer height stays
the same. That shrink runs from the stack's `ResizeObserver`, which was
created after the scroll keeper's observer and so ran after it. In that
pass the keeper first scrolled to the end of the taller footer. The
composer then shrank back. The browser does not deliver a resize of an
element at or above the shallowest depth it already handled in the same
pass, so the keeper never saw the shrink before paint. Its floor element
still held the taller scroll height, so one frame painted the timeline
and composer 35px too high, with a gap underneath. Hiding a banner did
the reverse.

## What changed

- `apps/app/src/components/ui/scroll-position-keeper.ts`: the keeper's
resize handling (sync the floor, then reconcile) is now a public
`remeasure()`. The keeper's own `ResizeObserver` uses it.
- `apps/app/src/components/promptbox/FollowUpPromptBox.tsx`: after the
stack observer applies a new stack height with `flushSync`, it calls
`positionKeeper.remeasure()`, so the keeper reconciles the final footer
height before paint, whichever observer runs first.

No wire, CLI or doc changes.

## How you verified

- Reproduced in Chromium with a temporary Ladle story: a real
`PageShell` bottom-anchored timeline, the real `FollowUpPromptBox`, and
the git context banner shown or hidden through `flushSync`. Each frame I
sampled the last row's top and the composer's bounds:
- Before: when the banner appears, one frame has the last row at 306px
instead of 341px and the composer bottom at 549 instead of 584 (the
jump). When it hides, one frame has the last row at 376px.
- After: the last row stays at 341px and the composer bottom at 584 on
every frame in both directions.
- Decoded the original screen recording frame by frame. The jump is the
single frame where the git bar first renders.
- Side-by-side builds with and without the fix, against the same `pnpm
start:worktree` server and threads.
- `pnpm exec turbo run typecheck lint --filter=@bb/app` passes. The
`FollowUpPromptBox`, `scroll-position-keeper` and
`bottom-anchored-scroll-body` suites pass (124 tests). No regression
test: jsdom does not implement ResizeObserver depth ordering, which is
what triggers this.

> AGENT GENERATED

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
## Human comments

## What was wrong

A Discord TestFlight report on an unfolded iPhone Duo showed the
on-screen keyboard covering the composer.
`useMobileVisualViewportHeight` resizes the app shell to the visual
viewport while the iOS keyboard is open, but `AppLayout` only enabled it
in the compact layout. Wide touch layouts (an unfolded iPhone Duo, iPad
landscape) get the desktop layout, so the shell kept its full height
when the keyboard opened. Depending on the device, iOS then scrolled the
whole page up and pushed the thread header off screen (bb iOS app on
iPad), scrolled too little so the composer toolbar stayed behind the
keyboard (iPad Safari), or did not scroll at all (the reporter's Duo).
The compact-only gate dates from when phone width was the only iOS touch
case.

## What changed

- `apps/app/src/components/layout/useMobileVisualViewportHeight.ts`:
removed the `enabled` parameter, so the hook runs at every width. It
already clears its override whenever the layout viewport matches the
visual viewport, so desktop browsers, Electron and Android
(`interactive-widget=resizes-content`) get no shell override.
- `apps/app/src/components/layout/AppLayout.tsx`: no longer passes
`isCompactViewport`.
- `useMobileVisualViewportHeight.test.tsx`: dropped the `enabled` prop.
The "disabled clears overrides" check now checks that unmounting clears
them.

## How you verified

- Reproduced on an iPad Air 11-inch (iOS 26.5) simulator in landscape,
against a `pnpm start:worktree` instance, in both the bb iOS app and
Safari. There is no iPhone Duo simulator on Xcode 26.6.
- Before (main): in the bb app the page scrolled up and the header
disappeared. In Safari the composer's model and mic row sat behind the
keyboard.
- After: the header and sidebar stay in place, and the whole composer
sits directly above the keyboard. The shell returns to full height after
the keyboard is hidden and after blur.
- Headless Chromium at 1280×800: focusing and typing in the composer and
resizing the window leave the shell without top/height overrides, and
`--bb-shell-height` stays unset.
- `pnpm exec turbo run typecheck lint --filter=@bb/app` passes. `pnpm
exec turbo run test --filter=@bb/app -- src/components/layout/
src/components/promptbox/FollowUpPromptBox`: 17 files, 166 tests pass.

> AGENT GENERATED

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
## Human comments

## What was wrong

Dragging the Diff tab scrollbar jumped between distant files instead of
following the mouse. The thumb maps to `fraction × total height`, and
the virtualized list's total height kept changing mid-drag, between
about 15k and 90k px on a 42-file diff. Three things fed the virtualizer
heights that weren't real:

- Each card body showed a 168 px loading skeleton until an
IntersectionObserver fired. That state reset whenever the virtualizer
remounted the card, so a cached 8,158 px measurement was replaced by 168
px and the browser clamped the scroll position. Dragging to 50% landed
near the bottom.
- `content-visibility: auto` with `contain-intrinsic-size: 0 600px`
sized every off-screen body at 600 px, its real height on screen, and
600 px again once it left the screen.
- Estimates stopped counting at 80 lines, ignored files that load on
demand, and read each card's *initial* collapsed state. With more than
10 files, every unseen card was still estimated as collapsed after
"Expand all".

## What changed

- `packages/shared-ui/.../GitDiffCardBody.tsx`: removed the
`renderBeforeVisible` IntersectionObserver gate, so bodies render on
mount. The list virtualizer already limits what mounts, and the timeline
card already passed `true`. Added a `defersOffscreenRendering` prop: the
unvirtualized timeline card (`apps/app/.../GitDiffCard.tsx`) keeps
`content-visibility`, and the Diff tab turns it off.
- `plugins/git/ui/diff/diffFilesStore.ts`: estimates count every changed
line, use the notice height for `on_demand`/`too_large` files, and use
the measured 33 px header and 17 px body padding. Each write now
replaces the per-diff state map so the panel can subscribe to it
(`useDiffFileCardStates`).
- `plugins/git/ui/diff/DiffFilesPanel.tsx`: estimates use the current
collapsed state, the measurement key includes that state so collapsed
and expanded heights are cached separately, and rows receive `collapsed`
from the panel.
- `plugins/git/ui/diff/DiffFileCard.tsx`: the skeleton shown while a
patch loads reserves the estimated body height.

## How you verified

- Real dev instance with a 42-file fixture: 30 added files of 32–450
lines and 12 modified files. A scripted drag set `scrollTop` from the
thumb fraction against the current `scrollHeight`, as Chromium does on
each mouse move.
- Before: `scrollHeight` went 14.8k → 56.9k px on the first drag and
kept shifting on the second, as far as 79k → 17k with scroll clamping.
- After: 85.4k → 89.1k on the first drag and 88.9k → 89.1k afterwards.
The file at the top only moves forward, and expand-all goes straight to
the right total.
- Perf, same fixture: no long tasks either way at 1× CPU. Under 4× CPU
throttling, total long-task time was 1.9–2.6 s after versus 2.0–4.5 s
before. The worst single frame was comparable: 217–350 ms after versus
183–283 ms before.
- Tests: `pnpm exec turbo run typecheck lint --filter=@bb/shared-ui
--filter=bb-plugin-bb--git --filter=@bb/app` passes. `pnpm exec turbo
run test` passes for shared-ui (75), the git plugin (249), and the app's
git-diff and timeline suites (420). The store test that asserted the
80-line cap now checks per-line scaling and the on-demand notice
estimate.
- Manual: `pnpm start:worktree` with the fixture, checked in the
browser.

> AGENT GENERATED

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
…in view (get-bb#6491)

## Human comments

## What was wrong

A provider model catalog stayed fresh for ten minutes (`FRESH_MS` in
`provider-model-catalog-store.ts`). Background refreshes start only when
something reads a catalog. So when a provider started offering a model,
the picker kept the old list until the stored one was ten minutes old
and something read it. While testing get-bb#6477, omp advertised 119 models
(adding `openai-codex/gpt-5.6-luna`, `sol` and `terra`) while the picker
kept showing 116 for about ten minutes. Shortening the window alone
would have made a second cost worse: opening the picker prefetched every
other provider (`ModelReasoningPicker`). Every open past the window then
started a background refresh of every stale provider at once, and each
ACP refresh launches the agent, creates a session, probes models and
deletes the session.

## What changed

- `provider-model-catalog-store.ts`: `FRESH_MS` drops from 10 min to 60
s. This is the age at which `thread update --model` with a missing model
already waits for a refresh (`VALIDATION_MIN_AGE_MS`), so both rules now
share one `stale` check and the extra constant is gone. Persistence,
failure backoff, prewarm, session-pushed catalogs and invalidation are
unchanged.
- `ModelReasoningPicker.tsx`: removed the open-time sibling prefetch. A
provider tab now prefetches its own catalog on `pointerenter`/`focus`,
and clicking a tab still loads it. A refresh therefore only starts for
providers the user looks at.
- `system-queries.ts`: `prefetchSystemExecutionOptions` takes a single
provider. The tab preview uses the new
`useProviderPreviewExecutionOptions`, which keeps the prefetch's
semantics (`writeLastKnown: false`): a failed load shows its error
instead of a remembered list, and previewed catalogs are not written to
localStorage, whether or not the tab was hovered first.
- `bb-guide-providers.md`: documents the one-minute background refresh.

No wire, protocol or SDK changes.

## How you verified

- New and changed tests:
- Store boundary: no refresh at 59.999 s, one background refresh at 60
s. This fails with the old 10 min value.
- Picker: opening loads nothing, hovering the selected provider loads
nothing, hovering another tab loads only that provider on the routed
host.
  - Prefetch helper test updated for the single-provider signature.
- The existing `PluginProviderModelPicker › does not commit loading,
placeholder, or failed provider catalogs` test caught a regression that
preview semantics would otherwise have changed, and passes with the
preview hook.
- `pnpm exec turbo run test typecheck lint --filter=@bb/app` and
`--filter=@bb/server`:
  - App: 6368 passed.
  - Server: 3723 passed.
- Three tests timed out under load from two local dev servers
(`PluginSettings` autosave, timeline output preview,
`install-machine-script`) and passed when rerun alone.
- Real-app QA against two `pnpm start:worktree` servers, this branch and
its base `be6ec62151`, with real providers. Both started from the same
116-model omp list, about 90 s old:

| Check | Base | Branch |
|---|---|---|
| `bb provider models acp-omp`, read twice ~5 s apart | 116 → 116, no
refresh | 116 → **119** (background refresh 1.6 s) |
| Open picker on the omp tab, search `gpt-5.6` | `openai-codex` 5.6
models still missing after 15.8 s | appear in the open picker after 1.56
s |
| Model-list requests when the picker opens | 6 (every other provider) |
**0** |
| Hover one tab | – | 1 request, that provider |
| `thread update --model openai-codex/gpt-5.6-sol` on a stale list |
waits for one refresh, accepted | same |
| `thread update --model openai-codex/not-a-model` | rejected | same |
| Failing provider tab clicked without hover | "Could not load models
for …" | same |
| Tab click → models rendered (local, 3 runs) | 66–72 ms | 71–158 ms |

A codex smoke thread (`Reply only with ok.`) completed on the branch,
and `bb provider models` loads every signed-in provider.

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

> AGENT GENERATED

Co-authored-by: Claude Opus 5.5 <[email protected]>
…hidden (get-bb#6490)

## Human comments

## What was wrong

Toggling the right panel inserted or removed DOM nodes that do not need
to change. On desktop the thread header's toggle button is unmounted
while the panel is open and mounted again on close. On windows wider
than about 1120 px, the table-of-contents rail is also unmounted or
remounted mid-slide when the timeline crosses its 56 rem breakpoint. In
Chromium, inserting or removing an element triggers `:has()`
invalidation. With plugin or theme CSS that uses `:has()`, each of these
restyled the whole page: once before the panel started moving, and on
wide windows again during the slide. Details and measurements are in
get-bb#6489.

## What changed

- `ThreadDetailHeader`: the right-panel toggle stays mounted whenever
the header owns it. While the panel's own control owns closing on
desktop, it is hidden with the `hidden` class and `inert`, so it is out
of the accessibility tree and tab order, as it was when unmounted. Its
label stays "Show right panel" while hidden, so selectors that match
`aria-label^="Show right panel"` or `"Hide right panel"` still find
exactly one visible control in each state. Compact behavior is
unchanged.
- `ThreadTableOfContents`: the rail stays mounted below the width
breakpoint and is hidden with the `hidden` class and `inert` instead of
being unmounted. The outline request is still gated on visibility.
- Most of the `ThreadTableOfContents.tsx` diff is re-indentation from
removing one conditional; `git diff -w` shows the four-line change.
- No wire, CLI or documentation changes.

## How you verified

- New tests: `ThreadDetailHeader.test.tsx` "keeps one right-panel toggle
mounted and hides it while the panel is open" and
`ThreadTableOfContents.test.tsx` "keeps the rail mounted but hidden
while the pane is too narrow". Both fail against `main`'s components and
pass with this change. The table-of-contents test's `ResizeObserver`
mock gained a helper to deliver a new width.
- `pnpm exec turbo run typecheck lint --filter=@bb/app` passes, with no
new lint findings on changed lines. `oxfmt --check` passes on the
changed files.
- Related suites pass: the header and table-of-contents tests,
`ThreadSecondaryPanel.collapseControl`, `ThreadDetailSecondaryContent`,
`SplitThreadArea`, `RootComposeRightPanelToggle`,
`PluginPanelRightPanelHost` and `theme-preview-fixture-anatomy` (212
tests).
- Manual check in headless Chromium: production builds of `main` and of
this branch, served against the same local server with about 35 plugin
stylesheets and a custom theme. 4× CPU throttling; median of five
repeated toggles, clicking the visible control.

| Window | Input to first frame, `main` → this PR | Longest frame during
the slide, `main` → this PR |
  |---|---|---|
  | 1024 px | 278 → 45 ms | 283 → 300 ms (see limits) |
  | 1440 px | 268 → 42 ms | 283 → 350 ms (see limits) |
  | 1920 px | 273 → 43 ms | 283 → 67 ms |
  | 390 px (compact) | 220 → 294 ms | 50 → 317 ms |

The compact path is unchanged by this PR. Earlier runs of both builds
measured 196–218 ms there, so the 390 px difference is within run-to-run
variation.

- Accessibility tree, ⌘J, and the visible toggle's labels (Show / Hide)
are identical to `main` in the open and closed states at 1440 px and 390
px.

Limits:
- At 1024 and 1440 px the test thread has a long user message whose
overflow state flips mid-slide. That inserts a show-more control in
`ExpandableTimelineRow` and causes a separate long frame on `main` and
on this branch alike. It is the same class of problem and could be a
follow-up.
- The first open after a page load and the compact shelf are not
covered.
- Not measured in the packaged Electron app, Safari or iOS.

Fixes get-bb#6489

> AGENT GENERATED

---------

Co-authored-by: Jack Laing <[email protected]>
get-bb#6487)

🚨 **SLOP COP** 🚨 · `new-issue-autopilot`

## Human comments

## What was wrong

Selection copy writes Markdown to `text/plain`, so Markdown syntax
leaked into pastes where people expect the visible text (the same class
as get-bb#6376 and get-bb#5776):

- **Inline code (get-bb#6484):** copying a code-only selection such as `valet
restart nginx` pasted `` `valet restart nginx` ``. Only `pre` bypassed
the serializer.
- **Formatted spans:** copying a word inside bold, italic, strikethrough
or a link pasted `**important**` or
`[deployment](https://example.com/deploy)`.
- **Prose escapes:** `escapeText` escaped every `` \ ` * _ [ ] < > ``,
so copying `config_loader.py`, `C:\Users\me\notes.txt` or `x < y,
arr[0]` pasted `config\_loader.py`, `C:\\Users\\me\\notes.txt` and `x \<
y, arr\[0\]`. It also turned `<https://example.com>` into
`<https://example.com\>`, which re-renders as the wrong URL.

## What changed

- `selectionClipboard` copies the visible text when the whole selection
sits inside one `pre`, inline `code`, link, `strong`/`b`, `em`/`i` or
`del`/`s` span. Wider selections, cross-message selections and Add to
chat keep Markdown. Math inside such a span still copies as TeX, because
KaTeX's hidden duplicate layout would otherwise be pasted twice.
- `escapeText` escapes a character only where Markdown would reinterpret
it: `_` unless between letters or digits, `\` before punctuation or at
the end, `[` and `>` at line start, `]` before `(`, `[` or `:`, `<`
before a tag or autolink start, and always `` ` `` and `*`.
- Rich HTML is unchanged. No public API, wire, schema or storage
changes.

## How you verified

- Real app (`pnpm start:worktree`, headless Chromium, real mouse
triple-click, double-click and drag on an agent reply, reading the copy
event's `text/plain`), main compared with this branch:

  | Selection | main | this PR |
  | --- | --- | --- |
| triple-click / drag `valet restart nginx` | `` `valet restart nginx`
`` | `valet restart nginx` |
  | double-click `my_old_var` in prose | `my\_old\_var` | `my_old_var` |
| `Open C:\Users\me\notes.txt` paragraph | `C:\\Users\\me\\notes.txt` |
`C:\Users\me\notes.txt` |
| `x < y and y > z, arr[0]` paragraph | `x \< y and y \> z, arr\[0\]` |
unchanged text |
  | double-click a bold word | `**important**` | `important` |
| word inside a named link | `[deployment](https://example.com/deploy)`
| `deployment` |
| paragraph mixing prose, bold and italic, lists, quotes, tables, whole
message | Markdown | unchanged Markdown |

- New tests: visible-text copy for every span type across five selection
shapes; a round trip that copies tricky prose, re-renders the copied
Markdown and requires the same text (fails on main for the over-escaped
cases and the autolink); math inside bold (fails without the math
guard). Four existing tests that pinned the old Markdown-around-a-span
output were updated.
- `pnpm exec turbo run test --filter=@bb/app --
src/components/thread/timeline src/components/secondary-panel src/lib
src/components/ui/markdown-preview`: 215 files, 2173 passed. `pnpm exec
turbo run lint typecheck --filter=@bb/app` passes.
- Not verified: native Cmd+C in bb Desktop or Android (same DOM copy
path).

Fixes get-bb#6484

> AGENT GENERATED

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

<!-- slopcop:rule=new-issue-autopilot run=run_6fij7oq0mvsmw015
sha=issue-6484 kind=summary -->

---------

Co-authored-by: SawyerHood <[email protected]>
Co-authored-by: Michael Yong <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
## Human comments

## What was wrong

On every drag frame, `useSecondaryPanelResize` set the inherited custom
property `--secondary-swipe-width` on the right panel's `<aside>`.
Because descendants inherit custom properties, each write made Chrome
recompute styles for the whole panel subtree: about 535 elements, about
15ms per frame. The right-panel drag ran at 30fps, while the sidebar
drag, which has no per-frame write like this, stayed at 60fps. While
resizing, the aside never reads that variable; it is anchored with
`right-0`.

## What changed

- `apps/app/src/components/secondary-panel/useSecondaryPanelResize.ts`:
`onResize` no longer writes `--secondary-swipe-width` while a pointer
drag is active. On release, `onDragging(false)` writes the final width
once, before `isSecondaryPanelResizing` clears, so the aside switches
back to the variable at the correct width. Opening, closing,
double-click reset, and other non-drag layout changes still write the
variable right away.

## How you verified

- New test in `useSecondaryPanelResize.test.tsx`: it drags a real
`PanelGroup` handle and checks that the variable stays put mid-drag and
holds the final width after release. It fails on the old code and passes
now.
- `pnpm exec turbo run test typecheck lint --filter=@bb/app` passes.
- A/B profile on a real thread with the Info tab open: the main build
against this branch's build, served through a dist proxy to the same
server, three drag runs each.

| Right-panel drag | Before | After |
|---|---|---|
| Style recalculation | 1,566–1,631ms | 64–76ms |
| p90 frame | 33.3ms | 16.7ms |
| Main-thread idle | ~170ms | ~1,250ms |

- Checked by hand: the panel contents track the panel edge during the
drag and after release, and the width survives a reload.

> AGENT GENERATED

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
…et-bb#6513)

## Human comments

## What was wrong

When a `pnpm start` source checkout is pulled (`git pull`) while bb
keeps running, there are three commits in play: the commit bb is
running, the checkout HEAD, and `origin/main`. The source update check
counted and listed incoming commits from the checkout HEAD, while
Settings shows the running commit on the left. So a server running
`f8c0701` with a checkout pulled to `055e758` showed `f8c0701 → 0950d00
(+2 commits)` when it was 32 commits behind. A checkout pulled all the
way to `origin/main` reported "up to date" while bb still ran old code.

Applying the update in that state also went wrong. The source shim only
fast-forwarded when HEAD still equalled the running commit recorded in
the pending update. A pulled HEAD failed that check, so the shim skipped
the fast-forward, install and rebuild, relaunched on the pulled HEAD,
and recorded "bb started 055e758 instead of 0950d00".

## What changed

- `packages/bb-app/src/app-update/source-checkout.ts`:
`inspectSourceCheckout` takes the running commit and counts and lists
incoming commits as `running..origin/main`. The diverged check still
uses HEAD (`origin/main..HEAD`).
- `fastForwardSource` no longer needs HEAD to equal a `from` commit. It
requires the target to contain HEAD, so a partly or fully pulled
checkout fast-forwards (or no-ops) to the target. A checkout with
commits the target lacks is refused with a clear message.
- `packages/bb-app/src/app-update/source-shim.ts`: the shim applies any
pending source update through `fastForwardSource`, so a mismatch is
recorded as a failed result instead of silently skipped. Install and
rebuild always run, which a pulled-but-unbuilt checkout needs. Removed
the now-unused `readHead` argument and its wiring in `launcher.ts`.
- `launcher-controller.ts` passes `args.current.commit` for both the
`check-source` request and the apply-time recheck.

The launcher and server share the existing `SourceUpdateCheck` shape, so
nothing on the wire changes and there's no daemon protocol bump.

## How you verified

- `pnpm exec turbo run typecheck test --filter=bb-app`: 223 tests pass.
New tests on real git fixtures:
- a checkout pulled partway counts from the running commit (+2, where
HEAD-based counting gives +1)
- a checkout pulled to `origin/main` still offers the update (previously
reported up to date)
- `fastForwardSource` completes from a partly pulled checkout and
refuses one with commits the target lacks
- the shim reinstalls, rebuilds and relaunches on the target when the
checkout was already pulled to it before the restart (previously
skipped)
- End to end with a real `pnpm start`: built a fresh clone of this
branch against a local bare upstream, with its own data dir and ports.
Published 3 commits upstream and pulled the checkout forward by 1
without restarting.
- Settings → Updates showed `04e5411 → e4a5168 (+3 commits)` with all
three subjects.
- Clicking Update fast-forwarded, ran `pnpm install` and the rebuild,
and relaunched.
- `GET /api/v1/system/app-update` then reported `current` = `e4a5168`
and `lastResult.outcome: "updated"`, and Settings showed "Up to date".

> AGENT GENERATED

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
…older checkpoint (get-bb#6514)

## Human comments

## What was wrong

An anchored fork inside a turn that has not completed is refused by core
with `fork_source_session_unavailable`, the same code core uses for
refusals where Side chat may fall back to a tip fork (for example, an
earlier message on a tip-only provider). Side chat caught that code and
retried without `sourceSeqEnd`. While a turn is running, the tip is the
previous completed turn's checkpoint, so the reply opened successfully
with the quote but silently lacked the selected turn's context. See the
issue's [reproduction
report](https://get-bb.github.io/reports/issues/6497.html).

## What changed

- `apps/server/src/services/threads/thread-fork-history.ts`: the "turn
containing it has not completed" refusal now uses its own code,
`fork_source_turn_incomplete` (same HTTP 400 and message). Every other
anchored refusal keeps `fork_source_session_unavailable`.
- Side chat's fallback still keys only on
`fork_source_session_unavailable`, so a running-turn reply now surfaces
the server error through the existing "Failed to start side chat" toast,
matching core's Fork action, instead of forking an older checkpoint.
Fallback cases such as tip-only providers are unchanged.
- No daemon wire, CLI, or guide changes; the CLI already documents that
`--source-seq-end` anchors on a completed turn.

## How you verified

- New end-to-end test in
`apps/server/test/public/public-thread-fork.test.ts`: installs the real
built-in Side chat plugin, calls `createSideChat` on an agent message
inside a running turn, and asserts it fails without queuing a fork. It
then completes the turn and asserts the same request forks at that
turn's checkpoint. With the server change reverted, it fails with
`expected 200 not to be 200` (the bug).
- Updated the running-turn assertion in the existing fork test, and
added a Side chat unit test that the new code is rethrown without a
retry.
- `pnpm exec turbo run test typecheck --filter=@bb/server
--filter=bb-plugin-side-chat`: 361 server test files passed, Side chat
tests passed.
- Manual check on a `pnpm start:worktree` server with real Codex
threads: replying to commentary inside a held-open turn was refused with
"the turn containing it has not completed"; replying to the same message
after the turn completed opened a side chat that correctly recalled the
code introduced in that turn.

Fixes get-bb#6497

> AGENT GENERATED

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

Co-authored-by: Claude Opus 5.5 <[email protected]>
…readScreen, and the login-shell probe bounds
@albrand
albrand merged commit 9e01123 into ours Oct 29, 2026
25 of 26 checks passed
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.