Repository navigation
Handle broken pipes from plugin CLI output - #2784
Merged
ymichael merged 343 commits intoSep 11, 2026
Merged
Conversation
ariofrio
marked this pull request as ready for review
September 1, 2026 04:25
3 tasks done
## Human comments ## What was wrong The Codex resume request omitted the metadata-only option. Codex then loaded old turns and sent a deprecation notice. The bridge converted the notice to a visible warning. The [reproduction report](https://get-bb.github.io/reports/issues/2959.html) shows two clean runs and the root cause. ## What changed - Send `excludeTurns: true` with each Codex resume request. - Add a focused test for the request parameters. - Add optional request capture to the existing Codex test process. - Keep the existing translation for other Codex deprecation notices. This change does not change a BB public protocol or the host daemon protocol. ## How you verified - The focused test failed before the fix because the request omitted `excludeTurns`. - The focused test passed after the fix. - `pnpm exec turbo run typecheck --filter=bb-plugin-provider-codex` passed. - All 258 Codex provider tests passed. - A direct Codex 0.152.0 check returned no notice and no old turns with the option. - `git diff --check` passed. - The change has 87 additions and two deletions, for 89 changed text lines. - The EAP codename scan found no match in the worktree or push range. Fixes get-bb#2959 > AGENT GENERATED Co-authored-by: Sawyer Hood <[email protected]>
## Human comments ## What was wrong Browse cards and plugin details showed author data without an in-app author route. The detail panel also omitted related plugins from the same author. ## What changed This layer adds in-app author links to Browse cards and plugin details. Each link opens one author page with compatible plugins from one marketplace. The author page keeps search, category, and sort state in the URL. It supports Featured, Recently added, and Most installed sorts. The author header uses the same centered width as the toolbar and card grid. It stays aligned when a detail panel is open. The header uses the most frequent author name. It uses the longest name when counts are equal. Plugin details now show up to four other plugins from the same author. A related item keeps the current detail presentation. Author identity uses a normalized GitHub login when available. It uses the exact author name otherwise. Marketplace identity prevents entries from different marketplaces from merging. This PR targets `main`. It contains no code from the closed PR get-bb#2945. This PR is intended for a squash merge. Intermediate commits import a file that existed only in the closed PR get-bb#2945. This layer changes no host daemon wire data. It needs no CLI, guide, or protocol update. The catalog response now includes the author's GitHub login. The Plugin SDK inventory records this contract change. ### Visual QA | State | Before | After | | --- | --- | --- | | Author page |  |  | | Plugin detail |  |  | ## How you verified - `pnpm exec turbo run typecheck --filter=@bb/app --filter=@bb/shared-ui` passed. - `pnpm exec turbo run test --filter=@bb/app --filter=@bb/shared-ui --force` passed. - The app suite passed 3,800 tests. Four tests remained skipped. - Shared UI has no test script. Turbo included it in the requested scope. - The server catalog test passed 44 tests. - The Plugin API map suite passed 76 tests. - New tests cover header alignment, author name selection, filters, sorts, URL history, focus return, related limits, and full-page navigation. - Doobie verified the author page and related-plugin detail at 1440 by 900 pixels. - Doobie verified that a tag-only search returns plugins from the selected author. - The browser console showed no errors during the final checks. Fixes #N/A > AGENT GENERATED
## Human comments ## What was wrong getbb.app did not have routes that showed the public plugin catalog. The worker only served raw marketplace objects from R2. ## What changed - I added the marketplace index, plugin detail, and author routes. - The pages read the v2 manifest and install counts from the worker R2 binding. - The worker caches parsed marketplace data for five minutes by R2 ETag. - Marketplace HTML uses a five-minute public cache. Unavailable pages use `no-store`. - A local Zod schema validates the data boundary and ignores unknown keys. - The schema accepts empty catalogs. It limits tags and screenshots after validation. - The index supports search, one category select, document shelves, and two flat list sorts. - I changed the browse, detail, and author layouts to match the two owner-approved mockups. - The browse page has a centered hero, a sticky control row, compact cards, and responsive grids. - The detail page has breadcrumbs, the home page command control for the install command, screenshots, a View source link, and related plugins. - The detail page shows the short description once and hides the empty About section. - I removed the Trust block, the Details card, the install note, and the hero count pill. The detail page is one column at every width. - The author page has an avatar header and the same browse controls. - The worker returns HTTP 503 and a `noindex` tag when the manifest fails. - The site sends the three marketplace events through the current PostHog client. - I added the Plugins navigation link. The URL keeps one category parameter. A URL with several keeps the first. - The top navigation has Plugins, Blog, Changelog, Sign in, an icon-only GitHub button, and Download for macOS. - The site follows the system color scheme. I removed the theme switcher and its stored preference. - Vitest now includes TSX test files. - This change does not alter the host daemon protocol. - The build needs the route generator format options. Without them, it rewrites the full route tree. - I ported the marketplace pages from branch `bb/plugin-pages-getbb-app` in get-bb#2702 by @brsbl. ## How you verified - `pnpm exec turbo run typecheck --filter=@bb/web` passed. - `pnpm exec turbo run test --filter=@bb/web` passed 116 tests in 22 files. - The test run included the TSX component and route tests. - `pnpm exec turbo run build --filter=@bb/web` passed. - I tested all routes with the current live v2 manifest and stats data. - I verified the filters, both sorts, the copy action, canonical URLs, HTTP 404 routes, and the HTTP 503 route. - I checked all three routes at 1440 by 900 pixels and 430 by 900 pixels. - I checked each route in the light theme and the dark theme. - None of the 430-pixel pages had horizontal page overflow. ### Screenshots Home page header at 1440 by 900 pixels:  Marketplace index at 1440 by 900 pixels:  Marketplace index sorted by installs at 1440 by 900 pixels:  Plugin detail at 1440 by 900 pixels:  Author page at 1440 by 900 pixels:   Author page at 430 by 900 pixels:   Fixes get-bb#2702 > AGENT GENERATED --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
## Human comments This feature is v confusing esp with multiple hosts and has very low utility. ## What was wrong The environment git action exposed a first-party squash-merge operation across the public contract, SDK, CLI, web app, server, host-daemon wire protocol, and host workspace. Removing only an entry point would leave callable or stale surfaces elsewhere in that vertical slice. ## What changed - Removed the squash-merge request and response contracts, SDK method, CLI command, server route, daemon command, workspace implementation, and associated UI flows. - Simplified the thread git dialog and action model to commit-only behavior, including removing the obsolete merge-base fetch when the commit dialog opens. - Removed stale guide, skill, mobile, story, and planning references. - Added regressions proving the removed API action is rejected and no longer appears in CLI help. - Incremented `HOST_DAEMON_PROTOCOL_VERSION` from 177 to 178 because the daemon command and response wire contract changed. - Regenerated the Plugin SDK public API inventory after the backend SDK declaration changed. - Preserved pull-request squash as a PR merge strategy and squash-merge detection used for accurate status of branches merged outside bb. ## How you verified - `pnpm exec turbo run typecheck --filter=@bb/server-contract --filter=@bb/sdk --filter=@bb/cli --filter=@bb/host-daemon-contract --filter=@bb/host-workspace --filter=@bb/host-daemon --filter=@bb/server --filter=@bb/app` - Focused Turbo test runs for the app, CLI environment commands, public environment action route, host workspace, host daemon, host-daemon contract, server contract, and SDK: 482 tests passed. - `pnpm exec turbo run test typecheck --filter=@get-bb/plugin-sdk --filter=@bb/plugin-api-map --filter=@bb/app --filter=bb-plugin-plugin-api-docs` - `bb plugin build plugins/plugin-api-docs` - Repository-wide searches found no former action identifiers outside intentional rejection tests, including generated artifacts. - `git diff --check` > AGENT GENERATED
## Human comments ## What was wrong The embedded composer kept a user-selected provider identifier but dropped its provenance. The server therefore removed that value and resolved the project default. The direct [reproduction report](https://get-bb.github.io/reports/issues/2974.html) confirmed this behavior twice. ## What changed The plugin composer now marks its resolved provider as explicit before it calls the plugin callback. The change stays in the app composer subsystem. It changes no wire format, public contract, or host daemon protocol. ## How you verified - The focused regression test failed before the fix with `undefined` instead of `explicit`. - The focused regression test passed after the fix. - All 21 tests in `PluginNewThreadComposer.test.tsx` passed. - `pnpm exec turbo run typecheck --filter=@bb/app` passed. - `git diff --check` passed. - The diff has 42 changed text lines across two files. - The push-range scan found no EAP codename references. Fixes get-bb#2974 > AGENT GENERATED Co-authored-by: Sawyer Hood <[email protected]>
## Human comments ## What was wrong `PluginAppOverlays` subscribed to the full slot snapshot and rendered every overlay directly from its list. Each slot-store notification therefore rendered every existing overlay again even when its stable slot object had not changed, causing sequential registrations to do triangular render work. This addresses the low-priority finding from the [app-overlay review](get-bb#2966 (comment)). ## What changed Extracted each overlay mount into a memoized component that receives the stable overlay slot object. Adding or removing another plugin overlay still updates the host list, while unchanged overlay subtrees skip the parent-driven render. A plugin re-registration still supplies a new slot object and generation key, preserving the existing replacement behavior. Added a focused render-count regression test. This is app-local React behavior with no server/daemon wire change, so `HOST_DAEMON_PROTOCOL_VERSION` is unchanged. ## How you verified - Added a regression test that registers a second overlay and verifies the first overlay renders only once. - `pnpm exec turbo run test --filter=@bb/app -- --run src/components/plugin/PluginAppOverlays.test.tsx` — 3 tests passed. - `pnpm exec turbo run typecheck --filter=@bb/app` — passed. - `pnpm exec turbo run lint --filter=@bb/app` — passed with zero errors. - `git diff --check` — passed. > AGENT GENERATED
## Human comments ## What was wrong The opt-in Claude idle releaser treated translated turns, background-task presentation state, BB-forwarded tool calls, and interactive requests as the complete residency signal. That omitted Claude's authoritative `running` and `requires_action` session states and its pending session-cron snapshot, so the 30-second timer could stop a process that was still working or waiting to deliver a scheduled wakeup. ## What changed The Claude bridge now includes authoritative SDK session state and the Stop hook's replace-all `session_crons` snapshot in the shared quiescence decision. `running`, `requires_action`, and any pending scheduled work keep the query resident; `idle` with an empty cron snapshot permits the existing grace-period release. The existing authoritative `background_tasks_changed` handling and older-CLI task-bookend fallback remain intact. No daemon wire contract, CLI, guide, or configuration surface changed. ## How you verified - Added timer regressions for `running` and `requires_action` transitioning to `idle`; they failed before the fix because `query.close()` ran and pass after it. - Added a timer regression for a nonempty Stop-hook session-cron snapshot transitioning to empty; it failed before the fix and now preserves the query until the snapshot clears. - Ran `pnpm exec turbo run test typecheck build --filter=bb-plugin-provider-claude-code --force` after rebasing onto current `origin/main`: 24 test files and 351 tests passed; typecheck and build passed; 6/6 Turbo tasks succeeded. - `git diff --check` passed. Follow-up to get-bb#2808. > AGENT GENERATED
## Human comments ## What was wrong Cursor probed ACP models sequentially within five seconds and prioritized Grok. Later models, including Gemini 3.8 Flash, therefore kept a synthetic Medium-only reasoning choice even though Cursor listed their real variants. ## What changed - Read Cursor model and reasoning metadata from `cursor-agent --list-models`. - Normalize CLI variant families to the bare model IDs required by Cursor ACP sessions. - Merge legacy fixed-effort families into their current parameterized models. - Bump `HOST_DAEMON_PROTOCOL_VERSION` from 177 to 178 because the Cursor launch specification now sends the model-list command to the host daemon. ## How you verified - `pnpm exec turbo run test --filter=@bb/provider-bridge-acp --filter=bb-plugin-provider-acp --filter=@bb/host-daemon-contract --force` — 443 tests passed. - `pnpm exec turbo run typecheck --filter=@bb/provider-bridge-acp --filter=bb-plugin-provider-acp --filter=@bb/host-daemon-contract --force` — six tasks passed. - Cursor CLI 2026.08.31 live catalog mapped Gemini 3.8 Flash to Low, Medium, and High while preserving model id `gemini-3.8-flash`. Fixes get-bb#2503 > AGENT GENERATED
Fixes get-bb#2908 ## Problem On iPhone PWAs (`viewport-fit=cover`), the compact secondary right panel renders through a body portal with `fixed inset-y-0`, so it never inherits the safe-area padding `AppLayout` applies. Top controls land under the status bar and their touch targets conflict with system UI. ## Fix Reuse the exact same four-side safe-area padding classes `AppLayout` already uses on the shelf container: ```ts "fixed inset-y-0 right-0 flex h-(--bb-shell-height) touch-pan-y select-none flex-col overflow-hidden border-l border-border-seam bg-background pt-[env(safe-area-inset-top)] pr-[env(safe-area-inset-right)] pb-[var(--bb-safe-area-bottom,env(safe-area-inset-bottom))] pl-[env(safe-area-inset-left)] outline-none", ``` The background still extends edge to edge; only interactive content is pushed inside the safe area. ## Testing - Added a regression test asserting the shelf carries all four safe-area padding classes: `apps/app/src/components/secondary-panel/CompactSecondaryPanelShelf.test.tsx` - `CompactSecondaryPanelShelf.test.tsx`: 14/14 passing on current `main` Co-authored-by: Dillon Zhang <[email protected]>
## What was wrong A transient same-process host-daemon reconnect interrupted every pending provider interaction in the server database. The daemon intentionally keeps its in-memory provider waiter across that reconnect, so the server hid the question while the provider continued waiting forever. The thread then looked active with no command and no pending interaction. This was reproduced after Connect tunnel outages returned heartbeat timeouts and upstream 502/503/504 responses without restarting the local daemon. ## What changed Same-daemon replacement sessions now preserve pending interactions. A genuinely new daemon instance still interrupts them and performs the existing terminal cleanup. The ordinary disconnect grace still interrupts when no daemon returns. ## Verification - Regression test: red before the policy change, green after - Focused pending-interaction suite: 30 passed - Server typecheck: passed - Full server suite: 2081 passed; one unrelated install-script timeout passed immediately when rerun in isolation (17 passed) - Changed-file format check and git diff check: passed
## Human comments ## Context The new tab shows an Actions list in the side panel. The list holds up to two built-in actions: Open browser and Start terminal. The list also holds one row for each action that a plugin registers. The user starts work from these rows many times each day. The sidebar already lets the user drag its sections and its plugin rows into a new order. ## Problem The Actions list used a fixed order. It showed Open browser first, then Start terminal, then the plugin actions in registration order. This order caused three problems: 1. The user cannot move a frequent action to the top of the list. 2. A plugin action stays below both built-in actions. 3. The order changes when a plugin registers a new action. ## Solution Each row now has a reorder handle. The user drags the handle to move the action. The app keeps the new order for that client. | The list at rest | The handle after hover | | --- | --- | |  |  | | The row during the drag | The list after the drop | | --- | --- | |  |  |  I recorded this media from a dev app on this branch. A temporary local plugin supplies the Quickstart row and the Subagents row. That plugin registers two `experimental_newThreadPanelAction` slots. The list therefore holds both built-in actions and plugin actions. The change has six parts: 1. **A new module.** `apps/app/src/components/secondary-panel/NewTabActions.tsx` holds the Actions list. The list was in `NewTabFileSearch.tsx`, which has more than 1,200 lines. Both callers and both test files already imported the list as one unit. 2. **One row shape.** Each action is one flat `NewTabAction` value with a ready `icon` node. Built-in rows and plugin rows use the same `NewTabActionRow`. The row holds the action button, the shortcut hint, the reorder handle, and the optional trailing control as siblings. `LauncherTile` loses the `variant` prop and the `ariaKeyshortcuts` prop, because only the action rows used them. 3. **A handle, not a whole row.** The handle starts the drag. `ProvidersSettingsSection` and `QueuedMessagesList` already use a handle in the same way. A handle also gives keyboard reorder, and it keeps a click on the row unambiguous. The app hides the handle until the pointer moves onto the row, and it always shows the handle on a touch device. 4. **Shared drag behavior.** The list uses the general `useReorderDnd` hook and the shared sortable motion. The general hook owns the sensors, drag threshold, Escape key behavior, vertical movement, and click suppression. The sidebar wrapper keeps its compact-drawer touch policy. The Actions list uses the standard touch sensor, so touch reorder works while the sidebar drawer is closed. 5. **Storage.** The app writes the order to `bb.newTab.actionOrder` in `newTabActionsAtoms.ts`. This is the `atomWithStorage` pattern that the sidebar section order and the plugin nav order already use. The app puts a new action after the saved rows. The app also keeps the slot of an action whose plugin is absent, so the position survives a reload. 6. **Shared order helpers.** `apps/app/src/lib/stored-order.ts` holds `arrangeByStoredOrder`, `reorderStoredOrder`, and `haveSameOrder`. The plugin nav sidebar already had this logic, so this change moves the logic instead of a copy. `reorderStoredOrder` uses `arrayMove` from `@bb/client-core`. `haveSameOrder` moves here from `usePersistedSidebarSectionOrder`. After the delegation, `reorderPluginNavPanels` and `havePluginNavPanelOrdersDiverged` only renamed arguments, so this change deletes them and the tests that only tested them. The list keeps its cost low when the user cannot reorder it. The app orders the rows by id. The app mounts `DndContext`, its sensors, and the document key listener only for two or more actions. For an empty list, the component returns before this work. ## Result The user can now put the Actions rows in any order, and the app keeps that order after a reload. Automatic checks: 1. `pnpm exec turbo run typecheck --filter=@bb/app` passes after the review fixes. 2. The 11 focused action and sidebar drag tests pass after the review fixes. 3. `pnpm exec turbo run build --filter=@bb/app` passes. 4. Lint reports 175 warnings and 0 errors. This count equals the count on `main`. 5. 898 tests pass in the plugin, secondary-panel, sidebar, and settings suites. New tests: 1. `apps/app/src/lib/stored-order.test.ts` tests the fallback to registration order, a new id at the end, the kept slot of an absent id, a duplicate stored id, and the reorder and decline cases. 2. `NewTabActions.test.tsx` tests saved and new actions, handle availability, compact touch setup with the sidebar closed, and invalid saved data. Manual checks in a dev app on this branch: 1. Move the pointer onto a row. The app shows the handle. 2. Drag the last action to the top with its handle. The list shows the new order. 3. Read `bb.newTab.actionOrder`. The value matches the new order. 4. Reload the page. The list keeps the order. 5. Drag the action back to the bottom. The app does not run the action. 6. Click the row. The app runs the action. This change does not send new data between the server and the host daemon, so it does not change `HOST_DAEMON_PROTOCOL_VERSION`. It also adds no CLI command and no SDK method. The sidebar section order and the plugin nav order are client-local in the same way. Tell me if you want an agent-facing surface, and I will add one. One follow-up stays out of this change. Three call sites repeat the same check of `event.over` and the same string check of `event.active.id`: this list, `PluginNavSidebarItems`, and `ReorderableSidebarSectionOrderList`. An `onReorder(activeId, overId)` option on the general hook and the sidebar wrapper would remove the repeat. That option changes every reorder caller, so it needs its own change. > AGENT GENERATED --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: Sawyer Hood <[email protected]>
## Human comments ## What was wrong Search threads was visually reduced to a detached icon, so it did not read as a primary sidebar destination. The navigation and thread-list regions also ran together without a quiet boundary. ## What changed - Restores Search threads as a full-width navigation row without changing its action or accessibility contract. - Keeps the existing `⌘K` hint in a stable trailing slot, but reveals it only when the row is hovered or keyboard-focused. Compact touch layouts omit the hint. - Adds a subtle inset divider between navigation and the thread list. - Does not add sidebar customization, plugin ordering, or plugin-row menu changes; those remain separate stack layers. ## Screenshots The before revision is the PR merge base. The after images are from exact head `150e60aef`, using the same dev fixture and viewport. | Before — `main` at `eeaaa3e8d` | After at rest — get-bb#2915 at `150e60aef` | |---|---| |  |  | | At rest | Hover or keyboard focus | |---|---| |  |  | | Mobile before — `main` at `eeaaa3e8d` | Mobile after — get-bb#2915 at `150e60aef` | |---|---| |  |  | ## How you verified - Drove exact head `150e60aef` in Chrome for Testing 151.0.7922.71. - Verified desktop at 1440×900 and compact touch at 390×844. - Confirmed the shortcut is hidden at rest, appears on pointer hover and keyboard focus, and is omitted on compact touch. - Confirmed revealing the shortcut does not move or resize the Search threads row. - Confirmed Search threads still opens the command palette and keeps its existing accessible label and keyboard shortcut metadata. - Confirmed the inset divider renders in desktop and compact layouts. - Remote CI passed on the exact head. Per repository policy, CI-equivalent checks were not run locally. BB-Thread-ID: thr_ccffp4w2p2 > AGENT GENERATED
## Human comments ## What was wrong Built-in navigation and plugin pages were owned by separate sidebar regions. Users could not choose which destinations stayed visible or arrange them as one coherent navigation list, and compact layouts had no matching customization flow. ## What changed - Uses one persisted order for built-in navigation and plugin pages. - Adds a quiet Customize entry point on the New thread row. - Opens `Customize sidebar` as a desktop popover and an in-place compact mode with Back. - Lists every destination with the shared multi-select checkbox and a drag grip. - Applies visibility and order immediately. Hidden plugin pages remain launchable from Customize. - Keeps every destination's existing behavior, including modifier-click opening in a split. - Keeps all built-ins visible by default and shows the first three optional plugin pages for users without saved preferences. - Migrates legacy visibility preferences without overriding explicit choices. - Preserves compact thread-list state while Customize is open. - Leaves plugin-row action-menu cleanup to the next stack layer. ## Screenshots The before revision is parent PR get-bb#2915 at exact head `150e60aef`. The after revision is this PR at exact head `9f5e741aa`. Each comparison uses the same dev fixture and rendered viewport. | Before — parent get-bb#2915 | After — unified navigation at rest | |---|---| |  |  | | Desktop Customize — exact PR head | |---| |  | | Mobile before — parent get-bb#2915 | Mobile after — in-place Customize mode | |---|---| |  |  | ## How you verified - Drove exact head `9f5e741aa` in Chrome for Testing 151.0.7922.71 against the branch dev app. - Verified the complete desktop flow at 1440×1000 and the compact flow at 390×500; captured comparable evidence at 340×900 and 390×844. - Confirmed all built-ins remain visible when the saved order interleaves built-ins and plugins, while exactly three optional plugins are shown by default. - Confirmed first-use reorder preserves checked membership and that visibility and order persist across reloads. - Confirmed New thread, plugin pages, and Automations preserve modifier-click split behavior from Customize. - Confirmed Automations retains its plugin-row options and accessory behavior. - Confirmed compact Customize retains the same thread-list DOM node, scroll position, accessibility state, and focus when entering and returning with Back. - Confirmed compact plugin launch navigates and closes the sidebar. - Observed no browser exceptions, console errors, stale frames, or layout shifts in the changed flow. - Remote CI passed on the exact head. Per repository policy, CI-equivalent checks were not run locally. BB-Thread-ID: thr_ccffp4w2p2 > AGENT GENERATED
## Human comments ## What was wrong The message copy action wrote only plain text. The prompt paste handler also returned after it attached clipboard files, so it discarded the clipboard text. ## What changed The copy action now writes the message text and the first attached image in one clipboard item. It converts non-PNG images to PNG and supports image-only messages. The prompt paste handler now attaches clipboard files and continues through the existing text parser. ## How you verified - `pnpm exec turbo run test --filter=@bb/app -- --run src/lib/clipboard.test.ts src/components/thread/timeline/MessageActionBar.test.tsx src/components/thread/timeline/ThreadTimelineRows.actions.test.tsx` - `pnpm exec turbo run test --filter=@bb/app -- --run src/components/promptbox/PromptBoxInternal.test.tsx` - `pnpm exec turbo run typecheck --filter=@bb/app` - `pnpm exec turbo run lint --filter=@bb/app` completed with no errors. > AGENT GENERATED
## Human comments ## What was wrong The installer skips the temporary join daemon when persisted enrollment data matches the requested host and server. When service setup is also disabled, no service starts the regular daemon, and the installer exits without a daemon process. The verified report is https://get-bb.github.io/reports/issues/2997.html. ## What changed The no-service path now keeps a matching local daemon or starts the regular host daemon with persisted credentials. It tracks the new PID and checks the connection before it reports success. The change has no wire or protocol effect. The installer concurrency test now uses live local daemon fixtures because existing enrollments start a daemon in this mode. ## How you verified - The focused regression test failed on the trusted base. It expected a daemon PID file but received no file. - The focused installer file passed all 22 tests after the fix. - The full server suite passed 2,192 tests in 227 files. One file remained skipped. - The server type check passed through Turbo. - The shell syntax check and `git diff --check` passed. - The clean scan found no EAP model codename in the working tree or push range. - The change has 65 changed text lines: 63 additions and 2 deletions across two files. Fixes get-bb#2997 > AGENT GENERATED Co-authored-by: Sawyer Hood <[email protected]>
## Human comments ## What was wrong The development CLI wrapper passed a package-manager separator to Commander as a real CLI argument. Commander then stopped option parsing before command flags. The direct reproduction and root-cause evidence are in the [published report](https://get-bb.github.io/reports/issues/2998.html). ## What changed - Remove exactly one first separator at the package-script boundary. - Preserve all later CLI arguments and separators. - Add a focused regression test for the forwarded argument array. This change does not alter the host-daemon protocol or a public CLI contract. It needs no guide update. ## How you verified - The focused test failed before the fix because the child argument array retained the first separator. - The focused test passed after the fix. - `pnpm exec turbo run test typecheck --filter=@bb/scripts --force` passed with 127 tests. - The development command reached the isolated server boundary after the fix. - `git diff --check` passed. - The EAP model scan found no matches in the working tree or push range. - The change has 22 additions and 1 deletion across two files, for 23 changed text lines. Fixes get-bb#2998 > AGENT GENERATED Co-authored-by: Sawyer Hood <[email protected]>
…t-bb#2994) ## Human comments ## What was wrong The server-exit path always entered an unbounded restart loop. It did not check whether a valid server already answered at the configured health URL. The verified [reproduction and root-cause report](https://get-bb.github.io/reports/issues/2993.html) shows that this left the original daemon active. ## What changed The supervisor now probes the configured health endpoint after its server child exits. A valid healthy response makes the supervisor stop its daemon with `SIGTERM` and return `stopped`. Failed or invalid probes keep the existing restart behavior. Existing supervisor tests now use an isolated health probe. This change does not alter the host-daemon protocol, a public schema, or a user configuration surface. ## How you verified - The new focused test failed on trusted base `99c0ad7`. It expected `stopped` but received `timeout`. - The same focused test passed after the fix. - `pnpm exec turbo run test --filter=bb-app --force` passed 74 tests. - `pnpm exec turbo run typecheck --filter=bb-app --force` passed. - `git diff --check origin/main` passed. - The EAP model-name scan passed for the working tree and the push range. - The change has 183 additions and 3 deletions, for 186 changed text lines. Fixes get-bb#2993 > AGENT GENERATED Co-authored-by: SlopCop <[email protected]>
## Human comments ## What was wrong The prototype supplied five screenshots for two bundled plugins. The production port left every BB Official screenshot list empty. ## What changed The BB Official registry now links the CDN images for Automations and Plugin Guide. The generator test now checks each generated list against its registry block. The CDN source is [get-bb/marketplace#181](get-bb/marketplace#181). This change does not change the host daemon protocol, CLI, or guide. ## How you verified - `pnpm exec turbo run typecheck --filter=@bb/server` - `pnpm exec turbo run test --filter=@bb/server --force -- test/services/plugin-catalog/bb-official-generator.test.ts` - The generated BB Official document contains all five URLs. - The CDN publisher passed its build, tests, v1 gate, liveness check, and CI. > AGENT GENERATED
## Human comments
## What was wrong
bb threads never got the Claude in Chrome browser tools, even when the
interactive `claude` CLI had Chrome enabled by default. Claude Code
(2.1.259) skips the `claudeInChromeDefaultEnabled` default in
headless/SDK mode and only honors an explicit `--chrome` flag. Checked
directly: `claude -p` loads 0 Chrome tools, `claude -p --chrome`
connects the `claude-in-chrome` MCP server and loads 22 tools. bb never
passed the flag.
## What changed
- `plugins/provider-claude-code/server.ts`: new `chromeEnabled` boolean
setting (default off) and its derived provider option.
- `session-params.ts`, `bridge/commands.ts`: carry `chromeEnabled`
through thread start/resume/fork and turn start/steer params.
- `bridge/session-options.ts`, `bridge/sdk-session.ts`: when enabled,
pass `extraArgs: { chrome: null }` to the Agent SDK, which becomes
`--chrome` on the Claude process.
- `bridge/bridge.ts`: a changed setting on a turn updates the
attachment's session options and marks the resident session to restart
before the next turn with the same provider thread id, so context is
kept. A resume with a changed setting replaces the session through the
existing construction-config comparison.
- Docs: `docs/configuration.md`, bb-cli skill
`references/configuration.md`, and the providers guide template.
- No `HOST_DAEMON_PROTOCOL_VERSION` bump: the option rides inside the
provider plugin's `providerOptions` bag and plugin-internal bridge
params, same as `idleQueryReleaseEnabled` (get-bb#2808).
## How you verified
- New tests: `buildSessionOptions` emits `extraArgs` only when enabled;
bridge test that a turn flipping `chromeEnabled` restarts the Claude
process with `resume` set and emits `session/replaced`; server test for
the setting descriptor and derived option; session-params and
thread-runtime-config assertions updated.
- `pnpm exec turbo run typecheck --filter=bb-plugin-provider-claude-code
--filter=@bb/server` clean.
- `pnpm exec turbo run test --filter=bb-plugin-provider-claude-code
--force`: 25 files, 354 tests pass. `@bb/server`
`thread-runtime-config.test.ts`: 30 pass.
- Manual: `claude -p --chrome --output-format stream-json --verbose` on
this host lists `claude-in-chrome` as connected with 22
`mcp__claude-in-chrome__*` tools; without the flag, none.
> AGENT GENERATED
## Human comments ## What was wrong The Expo app supplied only the top-level light icon, so Expo generated no dark-appearance entry in the iOS asset catalog. As a result, the native icon can remain a black mark on a white tile when the iPhone Home Screen changes to its dark appearance, unlike the installed PWA icon treatment. ## What changed - Added an explicit `ios.icon` light/dark pair. The light path keeps the current app icon, and the dark path gives Expo an appearance-specific source. - Added `apps/mobile/assets/icon-dark.png`, a 1024×1024 white luminance mask on transparency derived from the current light icon. It preserves the current mark geometry and lets the system-provided dark background show through. - Android and splash assets are unchanged. There are no wire, CLI, SDK, guide, or host-daemon protocol changes. References: - [Expo: use `ios.icon` for light, dark, and tinted variants](https://docs.expo.dev/develop/user-interface/splash-screen-and-app-icon/#ios) - [Apple: configure Light, Dark, and Tinted asset-catalog variants](https://developer.apple.com/documentation/xcode/configuring-your-app-icon) - [Earlier PWA dark/tinted icon treatment](get-bb#1225) - [Dark icon source preview](https://github.com/salemsayed/bb/blob/4c37bbd3d/apps/mobile/assets/icon-dark.png) (transparent white artwork; GitHub shows transparency in its image viewer) ## How you verified - Ran `npx expo prebuild --platform ios --no-install`. Expo generated an opaque `[email protected]` and a transparent `[email protected]`; `Contents.json` tagged the latter with `appearance: luminosity`, `value: dark`. - Verified both sources are 1024×1024 sRGB PNGs, the dark source has alpha from 0 through 1, and compositing it on black is pixel-identical to the luminance inverse of the current light icon. - Ran `npx -y [email protected] exec turbo run typecheck lint test --filter=@bb/mobile --force`: all six Turbo tasks passed and all 326 mobile tests passed. Lint reported four existing React warnings and no errors. I could not perform the final SpringBoard check because this environment is Linux and I do not control the project TestFlight release. Maintainer verification requested: please install a preview/TestFlight build on iOS 18 or later, leave Home Screen icon appearance on Automatic, switch the phone between Light and Dark, and confirm the Home Screen, Settings, and Search icon treatments. Adding the `mobile-e2e` label will also exercise the Release simulator build path. Fixes # > AGENT GENERATED
## Human comments ## What was wrong The native WebView enabled iOS back and forward swipe navigation. That gesture competed with the embedded app's sidebar swipe gesture. ## What changed Disabled back and forward swipe navigation in the main mobile WebView and the development WebView. ## How you verified - `pnpm exec turbo run typecheck --filter=@bb/mobile` - `pnpm exec turbo run lint --filter=@bb/mobile` - Built a signed release app and installed it on a connected iPhone 15 Pro. - Confirmed that iOS reports bb version 0.39.0 with bundle identifier `app.getbb.mobile`. > AGENT GENERATED
…it (get-bb#3006) ## Human comments ## What was wrong The "Handoff to new thread" action opened the composer in a new split pane instead of the focused pane. `handleHandoffToNewThread` navigates to the legacy project compose path `/projects/:projectId` (`apps/app/src/views/thread-detail/ThreadDetailPromptArea.tsx:1004`). `SplitWorkspaceRoute` answers that path with `LegacyProjectComposeRedirect`, so React unmounts `SplitThreadArea`. The redirect then replaces the URL with `/`, and `SplitThreadArea` mounts again. PR get-bb#2921 gated its startup reconciliation behind a per-mount `useRef`, so the remount looked like a fresh startup. The mount effect therefore called `reconcileRestoredLayoutForContent`, which splits the rightmost pane to the right for `new-thread` content. A handoff from the personal project did not show the bug, because `getProjectComposeRoutePath` returns `/` for that project and no unmount happens. ## What changed This pull request reverts commit `970480f6c6` (PR get-bb#2921). It removes `reconcileRestoredLayoutForContent` from `apps/app/src/views/thread-detail/splitThreadNavigation.ts`, removes the `shouldReconcileRestoredLayout` ref from `apps/app/src/views/thread-detail/SplitThreadArea.tsx`, and removes that PR's regression test. Route reconciliation again always replaces the focused pane. The change does not touch a wire protocol, `HOST_DAEMON_PROTOCOL_VERSION`, a CLI surface, a schema, or a stored-data format. Note the cost of this revert: issue get-bb#2919 comes back. After a restart with a restored multi-pane layout on `/`, the composer replaces a restored thread pane instead of joining the layout at the right edge. A later change can fix both bugs together. It must make the startup guard true only for the first route reconciliation of the session, and not for each mount of `SplitThreadArea`. ## How you verified - `pnpm exec turbo run typecheck --filter=@bb/app` passed. - `pnpm exec turbo run test --filter=@bb/app -- SplitThreadArea splitThreadNavigation` passed with 4 test files and 58 tests. - The first test run failed in the `ensure-native-modules` prerequisite with a `better-sqlite3` segmentation fault. That step is unrelated to this change, and the retry passed. - This pull request adds no test. The reverted commit held the only test of this reconciliation path, and the revert removes it. Fixes # This revert reopens get-bb#2919. > AGENT GENERATED
…-bb#3007) ## Human comments ## What was wrong The built-in `submit-a-plugin` skill described an entry contract that the marketplace rejects. Two defects blocked every submission it produced. 1. The sample entry carried an `engines` object, and two paragraphs told the agent to copy engine ranges from the plugin manifest and narrow them. Neither marketplace schema defines `engines`, and both set `additionalProperties: false`, so `npm run check` fails on any entry built from that sample. 2. The skill never mentioned `category`. `checkRequiredCategories` in the marketplace's `scripts/marketplace-lib.mjs` pushes an **error**, not a warning, for a *changed* entry file with no category. Every new submission is a changed file, so marketplace CI failed every time. All 122 live entries carry one. The root cause of both is the same wrong pointer: the skill told the agent to read `schema/marketplace.schema.json` and "treat those files as the contract". That file is the frozen v1 output document, which CI compares against the live registry. Entry files use the v2 fields. v1 defines neither `category` nor `screenshots`, so an agent following the skill would conclude both fields were invalid. Separately, the skill said nothing about screenshots, although the store detail page renders them. 5 of the 122 live entries have one. ## What changed Guidance-only change to the skill, plus one test file. No product code. **Contract fixes** - `SKILL.md` points at `schema/marketplace-v2.schema.json` and states why v1 is not the entry contract. `marketplace.base.json` joins the contract list, since it holds the category IDs and nothing else the skill read did. - `references/marketplace-entry.md` drops `engines`, lists the permitted and required fields explicitly, notes that the build writes `publishedAt`, and adds a "Choose the category" section. - `references/pull-request.md` drops the now-stale "Entry engine ranges do not exceed manifest ranges" check and gains checks for the category, the schema-rejected-field case, and screenshots. **Screenshots** Capture is workflow step 6. The agent uses a browser or computer automation tool the harness supplies, and asks the user for the images when the harness has none — explicitly, it may not skip screenshots because a tool was absent. The reference carries the marketplace CI rules: max six, at least 1200 px wide, at or below 2 MiB, PNG/JPEG/WebP with a matching extension, no orphan files in `screenshots/`, local path only. It also tells the agent to look at each image and strip tokens, email addresses, and home directory paths before commit. **Description quality** New App Store-style guidance: a hook that must stand alone, then a body of one capability per sentence. This is anchored to real rendering rather than taste — a browse card clamps to `line-clamp-2` (`packages/shared-ui/src/components/ui/resource/collection.tsx:496`), a compact row truncates to one line (`resource/row.tsx:271`), and the detail page renders it unclamped (`apps/app/src/components/tools/PluginDetail.tsx:370`). The reference ends with a nine-item quality check to run before the pull request. No wire change. `HOST_DAEMON_PROTOCOL_VERSION` is untouched; nothing here crosses the server/daemon boundary. ## How you verified - `pnpm exec turbo run typecheck --filter=@bb/server` — 5 tasks successful. - `pnpm exec turbo run test --filter=@bb/server --force -- test/skills/submit-a-plugin.test.ts test/skills/injected-skills.test.ts` — 20 passed. - Fail-before proof: with `git checkout origin/main -- .../submit-a-plugin/`, the two new tests fail and the four pre-existing tests still pass (2 failed | 4 passed). Restored after. - Every contract claim was checked against `get-bb/marketplace` at `43f25ef`, not from memory: the v2 entry properties, `checkRequiredCategories`, `validateScreenshotReference` (1200 px, 2 MiB, format match, orphan rejection), the category IDs in `marketplace.base.json`, and that `icons/README.md`, `npm run build`, and `npm run check` all exist. ## Not in this change `marketplace-review` has the mirror-image gap — no screenshot check and no script beside `icon-check.mjs` — so nobody on the review side looks for private data in a submitted image. > AGENT GENERATED Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Human comments ## What was wrong Compact toasts render at `top-center`, while Sonner derives an upward-only swipe direction from that position and processes the first pointer movement before its React-managed axis has updated. The archived-thread toast exposed a second, more important gap: its linked thread title, Undo action, and close control are buttons, and Sonner deliberately does not begin a swipe when the pointer target is a button. That made most of the real "Thread Archived" toast a swipe dead zone even though plain diagnostic toasts felt reliable. ## What changed - Allow compact toasts to use Sonner's native top, left, and right swipe directions. - Keep the CSS swipe distance continuous while Sonner's axis state catches up, preserving short Android touch movements without replacing Sonner's threshold, animation, callbacks, or toast identity. - Bridge touch starts on toast buttons into Sonner's normal swipe handling, then suppress the button click only after movement exceeds tap slop. Normal taps still invoke the thread-title, Undo, and close actions. - Add regression coverage using the actual archived-thread toast layout, including tap-versus-drag behavior, continuous batched movement, directional dismissal, rejected downward drags, and rapid stacked-toast identity. There is no server/host-daemon wire change, so `HOST_DAEMON_PROTOCOL_VERSION` is unchanged. No CLI, SDK, guide, or user-facing configuration surface changed. ## How you verified - Physical Android Chrome 152: archived a thread and swiped from the interactive title row; the user confirmed the interaction felt great. Captured movement stayed continuous through `130.8px`, and Sonner reported `direction: right`, `removed: true`, and `swipeOut: true` at pointer-up. - Physical Android Chrome 152 diagnostic runs: both user-tested runs felt great and completed native swipe-out dismissal. - Doobie with a 390×844 touch viewport: 10/10 single-move left, right, up, and upward-diagonal flicks dismissed. - iPhone 16 Pro, iOS 18.4 Simulator, Mobile Safari: left, right, up, and both upward diagonals dismissed. - `pnpm exec turbo run test --filter=@bb/app --force -- --run src/components/AppToaster.test.tsx` — 8 tests passed. - `pnpm exec turbo run typecheck --filter=@bb/app` — passed. - `pnpm exec turbo run lint --filter=@bb/app` — passed with 178 existing warnings in unrelated files and 0 errors. - `pnpm exec oxfmt apps/app/src/components/AppToaster.tsx apps/app/src/components/AppToaster.test.tsx` and `git diff --check` — passed. > AGENT GENERATED
## Human comments ## What was wrong A settled swipe requested the sidebar close and immediately cleared its inline drag transform before React committed the closed state. The still-open CSS could briefly restore the sidebar's open position, followed by the real closed-state transition, which produced the intermittent double close animation. ## What changed The horizontal dismiss hook now retains the settled swipe transform when dismissal is deferred until the end of the animation. The sidebar's existing closed-state lifecycle clears the drag styles after React commits, while cancelled and non-settled drag paths still clear immediately. A focused regression records the shelf state when the drag animation attribute is removed and verifies it is already closed. This is app-local behavior with no server/daemon wire change, so HOST_DAEMON_PROTOCOL_VERSION is unchanged. ## How you verified - Added a regression that fails with the previous cleanup ordering and passes with the fix. - `pnpm exec turbo run test --filter=@bb/app -- --run src/components/ui/sidebar.test.tsx src/components/secondary-panel/CompactSecondaryPanelShelf.test.tsx` — 41 tests passed. - `pnpm exec turbo run typecheck --filter=@bb/app` — passed. - `pnpm exec turbo run lint --filter=@bb/app` — passed with 0 errors. - `git diff --check origin/main...HEAD` — passed. > AGENT GENERATED
…get-bb#3010) ## Human comments ## What was wrong A marketplace entry could describe a plugin with one short `description` field only. The store detail page had no long-form text below it, so an author had nowhere to explain a plugin in more than a few sentences. The marketplace repository counterpart is get-bb/marketplace#182, which adds the `overview/<plugin-id>.md` file, the CI validation, and the build step that folds the file text into the v2 document. ## What changed - `packages/domain/src/plugin-marketplace-entry.ts` adds the optional `overview` string to the v2 entry schema and exports `MARKETPLACE_ABOUT_MAX_CHARS` (4000). The v1 schema stays strict and rejects the field. `apps/web/public/schemas/marketplace-v2.schema.json` mirrors the marketplace schema with `maxLength: 4000`. - `packages/server-contract/src/api/plugins.ts` adds optional `overview` to the catalog search result. Omission means the entry has no long-form text, the same way `publishedAt` works. The SDK passes it through, and `bb plugin search --json` returns it. - `apps/server/src/services/plugin-catalog/marketplace-manifest.ts` adds `entryOverview`, which drops a text above the cap with a warning so a third-party marketplace cannot push an oversized string to the client. `plugin-catalog-service.ts` projects it into the search result. - `apps/server/scripts/generate-bb-official-marketplace.ts` folds `plugins/<name>/PLUGIN_OVERVIEW.md` into a bundled plugin entry, and fails the generator on an empty file, a file above the cap, raw HTML, or an image. No bundled plugin has an `PLUGIN_OVERVIEW.md` yet, so the generated document is unchanged. - `apps/app/src/components/plugin/management/PluginOverviewMarkdown.tsx` renders the text below the short description on the detail page. It uses `react-markdown` with `skipHtml`, an `allowedElements` list (headings, paragraphs, emphasis, strong, strikethrough, code, blockquote, lists, thematic break, links), `unwrapDisallowed`, and a URL transform plus link component that render any non-https link as plain text. Links open with `target="_blank"` and `rel="noopener noreferrer"`. Images, tables, task lists, and raw HTML never reach the DOM, even when a marketplace skips the CI check. - The `submit-a-plugin` skill (`SKILL.md`, `references/marketplace-entry.md`, `references/pull-request.md`) tells the agent to copy an author `PLUGIN_OVERVIEW.md` to `overview/<plugin-id>.md`, reference it from the entry, follow the content rules, and commit it. The `bb-cli` skill reference and `bb guide plugins` mention the `overview` field in `--json`. No wire change between the server and the host daemon: catalog data does not cross that boundary, so `HOST_DAEMON_PROTOCOL_VERSION` stays as is. No new public plugin API member. Design decisions, with the measured payload: the text is inline in the manifest, not a CDN fetch. On the 122 current entries, the v2 plugins JSON grows from 96,836 bytes to 600,086 bytes when every entry uses the full cap, and to 287,034 bytes at a realistic 1,500 characters. The worst case is one quarter of a single screenshot cap, and bb fetches the manifest once per two hours. ## How you verified - New tests, each of which fails on `main` with the new test files copied in and passes here: v2 `overview` acceptance and v1 rejection in `packages/domain/test/plugin-marketplace-entry.test.ts`; `entryOverview` cap and warning in `marketplace-manifest.test.ts`; `overview` projection and drop-above-cap in `plugin-catalog-service.test.ts`; `readBundledPluginOverview` normalization and rejections plus the shallow-repo output in `bb-official-generator.test.ts`; the skill text in `submit-a-plugin.test.ts`; the query mapping in `plugin-catalog-queries.test.ts`; and the hostile-markdown render in `PluginOverviewMarkdown.test.tsx`, which asserts no script, img, table, input, or non-https anchor reaches the DOM. - `pnpm exec turbo run typecheck --filter=@bb/domain --filter=@bb/server-contract --filter=@bb/server --filter=@bb/app --filter=@bb/cli --filter=@bb/sdk --filter=@bb/templates` passes. - `pnpm exec turbo run test --filter=@bb/domain --filter=@bb/server-contract` passes. `pnpm exec turbo run test --filter=@bb/server -- test/services/plugin-catalog test/skills/submit-a-plugin.test.ts`, the three touched `@bb/app` test files, and the `@bb/cli` plugin catalog output test pass. - `pnpm exec turbo run lint` for the touched packages passes. - Not done: a live check in the dev app against a marketplace that publishes an `overview` text. The render path is covered by the jsdom test only. Fixes # ## Update: public marketplace site and bundled overview files - `apps/web/src/marketplace/marketplace-overview.tsx` renders the `overview` field on the getbb.app plugin detail page, below the screenshots, through the same allowlist as the app component. `marketplace-v2.ts` accepts the optional field. The web app adds `react-markdown` and `remark-gfm`. `public-marketplace.test.tsx` renders a hostile overview text through `renderToStaticMarkup` and asserts no script, image, or non-https anchor reaches the HTML. - Every bundled plugin now has `plugins/<name>/PLUGIN_OVERVIEW.md` (26 files, 781 to 1,687 characters each). Each file passes the marketplace CI check from get-bb/marketplace#182. The bb-official generator folds them in, and the generated document grows to 44,956 bytes. The generator now strips inline and fenced code before its raw-HTML check, so `<host-id>` in a command example is accepted. - Verified with `pnpm exec turbo run typecheck test lint --filter=@bb/web`, the server plugin-catalog tests against the regenerated document, and the strict `checkOverviewMarkdown` from the marketplace repository on all 26 files. ## Update: field renamed to overview, summary card layout - The entry field is `overview`, the plugin file is `PLUGIN_OVERVIEW.md`, and the marketplace file is `overview/<plugin-id>.md`. The marketplace side is get-bb/marketplace#182. - The detail page now shows the short description in a Summary card and the long text under an Overview heading, in the app (`PluginSummaryCard`, `PluginOverviewMarkdown`) and on the public site (`MarketplaceSummary`, `MarketplaceOverview`). An installed plugin with no catalog entry gets the same Summary card. The detail-page recipe tests were updated from the About label to Summary. > AGENT GENERATED --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
## Human comments ## What was wrong Thread forking exposed a fork-specific `workspace` policy even though continuing a provider session already requires the child environment to live on the source thread's host. That split environment selection between fork-specific core logic and normal thread placement, allowed invalid cross-host requests to fail late, and caused Claude forks into a new directory to look for the source session under the new working directory. ## What changed - Replaced the fork request's `workspace` field with the create-style `environment` argument. Omitting it now reuses the source environment. - Routed explicit fork environments through normal thread placement and reject a different host before provisioning. - Updated the SDK, side-chat plugin, CLI guide, and built-in CLI skill. `bb thread fork` now supports `--environment`, `--new-environment worktree`, and `--base-branch`; `--workspace` was removed. - Bumped `@get-bb/plugin-sdk` to `0.4.42` and refreshed the Plugin Guide API inventory for the changed `threads.fork` declaration. - The CLI derives the required host from the source thread. It does not expose `--host` or `--machine`, because another host is never valid for a fork. - Kept the Claude bridge fix that finds the source session independently of the fork's new working directory. - There are no database model, lifecycle, or host-daemon wire changes, so `HOST_DAEMON_PROTOCOL_VERSION` is unchanged. The user-visible default changes from creating an isolated environment to reusing the source environment. Explicit new worktrees use normal create placement and the project's default base branch unless `--base-branch` is supplied. ## How you verified Added regression coverage that failed before the implementation and passes after for default reuse, early cross-host rejection, SDK serialization, CLI environment flags, side-chat requests, and Claude forks across directories. - Server fork/create suites: 61 tests passed. - Contract, SDK, CLI, side-chat, Claude bridge, and template suites: 299 tests passed. - Turbo typechecks passed for the affected server-contract, SDK, CLI, server, side-chat, Claude bridge, and templates packages. - Plugin SDK npm version guard and Plugin Guide build passed. No linked issue. > AGENT GENERATED --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
## Human comments ## What was wrong Behavioral tests repeatedly constructed complete SDK, domain, and app response objects. Required contract additions therefore caused widespread unrelated fixture churn, while local pass-through builders obscured which values were meaningful to each scenario. ## What changed Added deterministic typed domain factories to `@bb/test-helpers`, public context factories to `@get-bb/plugin-sdk/testing`, and focused app and Tasks fixture modules. Migrated first-party behavioral tests and stories to shared factories or small scenario wrappers, while leaving schema, migration, serialization, command-output, provider, and exact-shape lifecycle fixtures explicit. The Tasks lifecycle assertion now checks only listener registrations relevant to its behavior. The public Plugin SDK documentation, built-in plugin-authoring references, and SDK API inventory were updated. There are no host-daemon wire changes, protocol-version changes, CLI changes, or environment-provider concepts in this PR. ## How you verified - `pnpm exec turbo run typecheck` with filters for the app, server, SDK, API map, shared packages, first-party plugins, and integration tests - Targeted Turbo tests across client-core, core-ui, Plugin SDK, API map, ask-user-question, concurrency-limit, keep-awake, Tasks, and workflows: 1,237 tests passed - Full app Turbo suite: 3,848 passed and 4 skipped - Targeted server tests: 6 passed - Targeted integration tests: 3 passed - Plugin SDK type build, API inventory regeneration, and Plugin Guide build - `git diff --check` No linked issue. > AGENT GENERATED
## Human comments ## What was wrong - Custom-organized sidebar threads could be moved by drag and drop, but their row actions offered no destination picker. ## What changed - Adds **Move to section** with `MoveTo` to active root-thread actions in **Custom** view: desktop dropdown/right-click submenus and a compact long-press step with **Back**. - Follows saved sidebar order, including **Threads**, and omits **Pinned**. The current destination is disabled for unpinned threads. Existing mutations preserve move persistence; moving a pinned thread unpins it, and choosing its stored section only unpins it. - Integrates with the shared sidebar header controls from get-bb#3402. The focused diff remains 12 files; main's bundle limits are unchanged. ## How you verified - Remote [CI](https://github.com/get-bb/bb/actions/runs/34524003966) for `d334e6953963fd5891a1fdb7eb75f020cd604d0f`: **14 passed, 2 skipped**, including checks, app/server/package/integration tests, and macOS/Ubuntu package smoke. Optional Node compatibility and native iOS jobs were skipped. The app fits unchanged bundle limits: **1681.7 KB raw / 410.9 KB brotli** against **1683.2 KB / 419.0 KB**. - Menu and mutation tests cover desktop/context parity, eligibility, compact Back/reset, destination no-op, section moves, and both pinned transitions. Existing optimistic-update and serialized-unpin coverage remains. - Final-head Chrome for Testing **153.0.8010.36**: shared header **By project → Custom** eligibility; desktop dropdown and right-click moves to a section and **Threads**; hard-reload persistence and disabled current destination; compact touch long-press, **Back**, close/reopen reset, and saved moves. No captured runtime errors or compact app-root `inert`/`aria-hidden` changes. All six synthetic threads and sidebar settings were restored. The unchanged pinned transitions were exercised before this rebase and retain passing remote mutation coverage. - Native iOS is unverified: the local Xcode/CoreSimulator setup is incompatible and cannot resolve `simctl`; remote iOS coverage was skipped. Phone-width Chrome does not establish native iOS or Safari behavior. | Surface | Before — merge base `de9361268088` | After — head `d334e6953963` | | --- | --- | --- | | Desktop web · 1440 × 900 |  |  | | Phone web · 390 × 844 |  |  | - Both revisions use `scripts/bb-dev-app current` under **Node 22.19.0**, sequentially in the same managed worktree. Captures match the synthetic **Release notes** thread in **Follow-ups**, `/threads/thr_move_release`, **Custom** organization, light theme, scale 1, and viewport per row. Images were inspected directly. BB-Thread-ID: thr_ccffp4w2p2 > AGENT GENERATED
## Human comments ## What was wrong After get-bb#3390 enabled hidden entries, every file-mention query recursively scanned ignored build output, dependency stores, and nested worktrees. Incremental typing started overlapping scans. A large checkout took 5.84 seconds to search roughly 304,000 entries, leaving the new-thread composer on “Searching mentions…”. ## What changed - Project and environment searches ask Git for ignored paths and prune those subtrees before traversal. Tracked files and non-ignored untracked files remain searchable, including hidden files. Empty directories, linked worktrees, and non-Git workspaces remain supported. - Concurrent queries share pending discovery but rank their results independently. Completed and failed listings are discarded, so subsequent queries see file and ignore-rule changes. Each fresh Git-backed discovery uses two Git subprocesses; there are no per-file subprocesses. - General filesystem APIs and skill/thread-storage listing retain their existing ignore behavior. The server explicitly supplies the new `respectGitIgnore` daemon field; protocol version increases from 198 to 199. - Keep `.pnpm-store` and root-relative `.claude/worktrees` in the default exclusions. Exclusions now support exact root-relative paths as well as basenames. Update CLI help and guide/SDK documentation. ## How you verified 226 relevant tests passed, including tracked files matched by ignore patterns, new untracked files, nested ignore rules and negation, linked worktrees, hidden files, shared discovery, failure recovery, and refresh after edits: ```sh pnpm exec turbo run test --filter=@bb/host-daemon -- file-list.test.ts workspace-path-list.test.ts pnpm exec turbo run test --filter=@bb/host-daemon -- workspace-dispatch.test.ts pnpm exec turbo run test --filter=@bb/server -- host-file-routes.test.ts public-environments.test.ts internal-environment-change.test.ts public-thread-data.test.ts pnpm exec turbo run test --filter=@bb/host-daemon-contract pnpm exec turbo run typecheck --filter=@bb/host-daemon --filter=@bb/server --filter=@bb/cli ``` With both new directory exclusions disabled, the same checkout improved from **5.84 s / 304,068 entries to 119 ms / 6,681 entries**, retaining README and hidden workflows. Verified in an isolated source app with Worktree selected: incremental `@README` search returned tracked and untracked files, selecting the untracked file inserted its mention, and an arbitrary Git-ignored build directory was omitted. The source CLI confirmed general filesystem listing can still inspect ignored files. No deployed instance was changed. > AGENT GENERATED
…-bb#3433) ## Summary `.bb-env-setup.sh` runs `pnpm install` on every new environment. For a fresh git worktree that is necessary, but copy-on-write environments (reflink copy or Btrfs snapshot of the checkout, via the `btrfs-cow` provider plugin) arrive with `node_modules` already installed, and the install is a 5 to 15 s no-op. This change hashes the install inputs (`pnpm-lock.yaml`, `pnpm-workspace.yaml`, `package.json`, `.npmrc`) and stores the hash at `node_modules/.bb-env-setup-install-hash` after a successful install. On the next run, if the stamp matches and `node_modules/.pnpm` exists, the install is skipped. Because the stamp lives inside `node_modules`, it travels with a copied tree and disappears with a fresh worktree, so worktree provisioning is unchanged. ## Behavior Measured on a reflink copy of this repo (Linux, Btrfs): | Scenario | Result | |---|---| | Copied tree, no stamp yet | installs, 5.8 s, writes stamp | | Copied tree, stamp matches | skipped, 0.01 s | | Lockfile changed | installs, 6.3 s, rewrites stamp | | No `node_modules` (fresh worktree) | installs, 13.7 s, writes stamp | Other notes: - A failed `pnpm install` no longer writes a stamp, so the next environment retries. The hook still exits 0 in every case, as before. - Falls back to always installing when neither `sha256sum` nor `shasum` is available. - Existing checkouts get the stamp the first time the hook runs after this lands; running `sh .bb-env-setup.sh` in the project checkout once seeds it for copies made from it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5.1 <[email protected]>
get-bb#3437) ## Human comments ## What was wrong The follow-up prompt box only recognised Meta+Enter as the modifier submit (`PromptBoxInternal.tsx` explicitly required `metaKey` and rejected `ctrlKey`). On Windows and Linux there was no working key for the secondary action: in Queue mode nothing steered, in Steer mode nothing queued. Worse, Ctrl+Enter fell through to the plain-submit branch, which only checks Shift, so it silently performed the primary action instead. The `aria-keyshortcuts` attribute, the Settings picker descriptions, and `docs/configuration.md` all described the shortcut as Command+Enter only. The tasks plugin editor already accepted either Meta or Ctrl plus Enter; the composer was the odd one out. ## What changed - `apps/app/src/components/promptbox/modifier-submit-shortcut.ts` (new): `isModifierSubmitKeyEvent` accepts Enter with Meta or Ctrl and no Alt/Shift, plus platform-aware label and aria helpers built on the existing `formatAppShortcut`/`formatAppShortcutAria` mapping ("⌘ Enter" / "Meta+Enter" on Mac, "Ctrl + Enter" / "Control+Enter" elsewhere). - `PromptBoxInternal.tsx`: uses the shared key check and sets `aria-keyshortcuts` from the platform helper instead of a hard-coded "Meta+Enter". - `FollowUpPromptBox.tsx`: the queue/steer submit tooltips now include the modifier shortcut and what it does, e.g. "Queue follow-up (Enter), Ctrl + Enter to steer", shown only when a modifier submit is available. - `SettingsView.tsx` and `docs/configuration.md`: mention Ctrl+Enter on Windows and Linux alongside Command+Enter. No wire or CLI changes. ## How you verified - New `modifier-submit-shortcut.test.ts` covers key matching (Ctrl+Shift+Enter and Meta+Alt+Enter rejected) and the platform labels. - New `PromptBoxInternal.test.tsx` cases: Ctrl+Enter on a Linux platform calls `onModifierSubmit` and not `onSubmit`, and `aria-keyshortcuts` reads "Control+Enter" on Linux and "Meta+Enter" on Mac. The Ctrl+Enter case fails before this change (it called `onSubmit`). - New `FollowUpPromptBox.test.tsx` cases assert the tooltip text for both steer-on-Enter settings on Win32. - `pnpm exec vitest run` on the three promptbox test files: 163 passed. - `pnpm exec turbo run typecheck lint --filter=@bb/app`: passes. > AGENT GENERATED Co-authored-by: Claude Fable 5.1 <[email protected]>
## Human comments ## What was wrong Opening Account Pooler settings sat on "Loading…" for a long time. The `status.get` RPC assembled `routedThreadsWithoutLocalLogin`, which calls `system.providerStates` over host RPC for every machine that routed a thread in the last window. A sleeping or offline machine stalls that call up to the host RPC deadline, and the UI rendered nothing until the whole status returned. Every action afterward (toggle, refresh usage, reorder) re-ran the same slow status call. ## What changed - `plugins/account-pool/src/operations.ts`, `rpc.ts`, `contracts.ts`: `status.get` no longer waits on host RPCs. The routed-thread inspection is its own `status.routedThreads` RPC. `statusSchema` drops `routedThreadsWithoutLocalLogin`; a new `statusReportSchema` / `PoolStatusReport` keeps the combined shape. - `plugins/account-pool/src/cli.ts`: `bb pool status` calls both operations and prints the same text and `--json` output as before. - `plugins/account-pool/app.tsx`: the settings view caches the last `PoolStatus` in `localStorage` (validated with `statusSchema` on read) and renders it immediately. While the live status is in flight the hub line shows "refreshing…", rows show "refreshing usage…", and quota values are dimmed. A row also shows the refreshing state while its manual "Refresh usage" RPC is pending. The empty-state card only renders from live status so a stale cache never flashes "No accounts in the pool". No wire changes to the host daemon protocol; this is plugin-internal RPC. ## How you verified - New tests in `plugins/account-pool/app.test.tsx`: cached accounts render with the refreshing indicator before `status.get` resolves and the cache is rewritten afterward; a malformed cache entry falls back to the loading state; a row shows "refreshing usage…" while `account.refreshUsage` is pending. The first and third fail on main (no cache, no indicator). - `plugins/account-pool/src/server.test.ts` updated to read routed threads from `status.routedThreads` and parse CLI JSON with `statusReportSchema`. - `pnpm exec turbo run test typecheck --filter=bb-plugin-account-pool` passes (10 files, 274 tests). - Bundled the plugin app once through `buildPluginApp` to confirm the runtime `statusSchema` import bundles cleanly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED Co-authored-by: Claude Fable 5.1 <[email protected]>
…get-bb#3436) ## Human comments ## What was wrong The prompt-box environment picker offered every environment provider on every machine, so CoW copy showed up under Macs where its reflink probe can never succeed. Per-machine plugin availability existed briefly (get-bb#3227), but get-bb#3393 removed it from discovery because the app's per-machine fan-out blocked the picker on the slowest machine's Git inspection and plugin probe. That fix removed the information rather than making it non-blocking: discovery became structural only, availability is always null, and an unsupported choice now fails only at thread creation. ## What changed Server (`apps/server/src/services/environments/provider-machine-availability.ts`, new): a background per-machine availability probe. When a project's providers are listed, each structurally eligible provider and connected persistent machine is probed in the background (Git inspection when `requires.gitCheckout`, then the plugin's `availability` hook), keyed by provider, project, and machine. Listing never awaits a probe: it returns the cached answer or null. Results are cached for ten minutes, cleared when a plugin rechecks, and disconnected machines are never probed. When an answer changes, the server emits a new `environment-availability-changed` system change so clients refetch. Contract (`packages/server-contract/src/api/system.ts`): each provider now carries `machineAvailability`, a map from host id to `available`, `setup-required`, `unavailable`, or null while unknown. `availability` is filled from that map when `hostId` is given. Thread creation still checks the selected provider and machine afresh, exactly as get-bb#3393 left it. App: `NewThreadComposer` lists providers for the current project and derives each machine's rows from `machineAvailability`. The picker hides providers a machine reports as unavailable, except the currently selected one, which stays visible and disabled with its reason so the selection never disappears; setup-required rows stay selectable with their message; unknown rows show as before. The provider list is remembered per project in localStorage through the existing last-known cache and served as placeholder data, so the picker is already trimmed on the first open after a reload. The realtime registry maps the new system change to the provider query. CLI: `bb environment providers --project <id> --machine <id>` prints each provider's availability on that machine, and `--json` includes `machineAvailability`. Guide template, bb-cli skill, `docs/api_to_audit.md`, the Plugin Guide surface text, and the SDK doc comment were updated to describe background probing. No server/daemon wire fields changed, so `HOST_DAEMON_PROTOCOL_VERSION` is unchanged. ## How you verified - Server tests in `apps/server/test/threads/environment-providers.test.ts` rewritten for the new contract: listing answers null first, the background answer is served on the next listing and `environment-availability-changed` fires once; Git inspection runs in the background and a missing branch is reported as unavailable; disconnected machines are not probed; unmet structural requirements never probe; a plugin recheck invalidates the cache and probes again; a throwing hook is reported as unavailable without failing the listing; creation still checks afresh. 43 passed. - App tests: picker hides unavailable rows, keeps the selected unavailable row disabled with its reason, keeps setup-required selectable with its message, hides per machine in the grouped menu; provider query writes and serves the last-known cache and rejects a corrupt entry; realtime registry covers the new system change. - CLI test for the availability column with available, unavailable, and unknown rows. - `pnpm exec turbo run typecheck` for server, app, cli, domain, server-contract, sdk, plugin-sdk, plugin-api-map, and templates passes. - `pnpm exec turbo run test` for cli, server-contract, sdk, domain, templates, plugin-api-map, and plugin-sdk passes. Full server and app Vitest suites pass (the app's turbo test task fails before tests on this machine because its PWA icon check needs a libvips module that isn't installed, so the app suite was run with vitest directly). - Manual, on the earlier client-only version of this change: a dev server with the btrfs-cow plugin and two projects on one machine, one on btrfs and one on tmpfs; the tmpfs picker omitted CoW copy and was already trimmed on first open after a reload. > AGENT GENERATED Co-authored-by: Claude Fable 5.1 <[email protected]>
Integrates get-bb#3163 and get-bb#3165: inline-vis accepts source="workspace" | "thread-storage" and renders .md/.markdown files with the host Markdown renderer alongside sandboxed HTML previews. Fixes get-bb#3158 Fixes get-bb#3159 Co-authored-by: Ilya Martynov <[email protected]>
## Human comments ## What was wrong The Cmd-K palette consumed Enter and navigation keys during IME composition. Confirming a candidate could activate the highlighted result and close the palette; navigation keys could move the palette selection. ## What changed Return before palette keyboard handling when the native event is composing. Cover Enter, ArrowDown, ArrowUp, Home, and End, preserving selection and leaving composing events unconsumed. Also verify ordinary navigation and exactly-once command activation after composition ends. Combines the useful regression assertions from get-bb#3414 without duplicating its identical production fix. No wire, SDK, CLI, configuration, or host-daemon protocol changes. ## How you verified - Independently reproduced on pristine main `7ba69eb050c4a800db9255c8fbaaa23ca4bab32d` in the running app using Chromium DOM CompositionEvent/KeyboardEvent dispatches. - Regression-only run before the guard: 6 failed, 23 passed. - `pnpm exec turbo run test --filter=@bb/app -- src/components/commands src/lib/command-palette`: 76 passed across 7 files. - `pnpm exec turbo run typecheck build lint --filter=@bb/app`: passed; lint reported 190 warnings and zero errors. - Changed-file formatting and `git diff --check`: passed. - Real Chromium browser QA: 10 scenarios passed, including unchanged composing selection, default-prevention semantics, resumed navigation and one sidebar toggle after normal Enter. - Composition events were synthetic (`isTrusted: false`); ordinary keys used trusted browser keyboard input. Native OS Pinyin candidate UI, Safari event ordering, and iOS were not verified. Fixes get-bb#3413 > AGENT GENERATED
…#3111) ## Human comments ## What was wrong Opening a thread with a plugin palette such as Monokai could leave diff bodies blank. The diff worker pool resolved its initial theme before the theme-sync component registered that palette's loader, producing `No valid theme loader registered`. ## What changed Register resolved custom theme files at the worker-pool acquisition boundary before creating the singleton. Existing theme synchronization still handles later palette changes. ## How you verified - Added a regression test using Pierre's real theme resolver. It fails with the original missing-loader error before the fix and passes afterward. - Eight focused worker-pool and theme synchronization tests pass. - All CI test packages pass in a clean checkout with a minimal environment. The integration suite passes all 77 tests across 26 files with `--maxWorkers=4`. - Clean-branch CI build, typecheck, lint, bundle budgets, version guards, provider-literal ratchet, SDK npm guard, and macOS tarball smoke pass. The SDK guard used npm 10 for its supported JSON output. - Linux AppImage checks require a Linux/FUSE runner. Actions cache usage requires the GitHub Actions token and was skipped locally. - In the source-built dev app, cold-loaded a recovered Smart Diff using the Monokai palette. The diff body rendered with syntax highlighting and no browser errors. > AGENT GENERATED
## Human comments ## What was wrong Every global thread lifecycle event made Tasks enumerate all tasks and query each task's worker mappings before filtering by the event's thread ID. On current main `f41d564163180f87304986b61706db6d69314759`, an unrelated event executes 202 SQL statements with 200 tasks and 505 with 501 tasks. The task-list method itself performs two statements per page, so method-call counts understated the database work. Original investigation: https://get-bb.github.io/reports/issues/3210.html. ## What changed Use an internal lookup returning every mapping for the event's thread ID through the existing `idx_task_threads_thread` index. Unrelated events now execute one lookup; legitimate multi-task fan-out, comments, notifications, recovery, and terminal protection remain intact. Startup and periodic reconciliation are unchanged; get-bb#3213 addresses the separate duplicate-startup issue. Added SQL-level coverage using real in-memory SQLite and the Tasks schema migrations, alongside the original no-scan regression. Removed two existing non-semantic comments to satisfy repository lint. No schema/index, public SDK/CLI, configuration, or server/daemon wire changes; no host-daemon protocol bump is needed. ## How you verified - Before production changes, eight SQL-budget regressions failed on unchanged current main; two reconciliation checks passed. - Compared baseline and fixed behavior with zero, one, 200, and 501 mappings, all five event types, and one thread mapped to 1, 3, or 200 tasks. Verified created-event status mapping, task status changes, deletion cascade, comments, recovery, idempotence, and notifications. - SQLite EXPLAIN confirms the existing thread-ID index is used. Sorting is limited to matching rows. These are structural SQL improvements; no end-user latency improvement was measured. - An expanded 21-case audit passed with each implementation's measured SQL budgets. The two startup/periodic audit cases remain outside the patch to avoid adding expectations that constrain get-bb#3213. - `pnpm exec turbo run test typecheck build lint --filter=bb-plugin-tasks`: 388 tests passed in 36 files, plus typecheck/build. Tasks has no lint script, so explicit changed-file oxlint was also run. - Separately typechecked the new regression through Turbo. Changed-file oxlint, oxfmt check, and `git diff --check` passed. - Started `pnpm start:worktree`; server and daemon health checks passed. Installed/enabled the bundled Tasks plugin and confirmed 12 sample tasks across 3 projects through the running API/CLI. No browser-driven UI verification is claimed. Fixes get-bb#3210 > AGENT GENERATED --------- Co-authored-by: Sawyer Hood <[email protected]> Co-authored-by: Michael Yong <[email protected]> Co-authored-by: Fabio <[email protected]> Co-authored-by: Jason Son <[email protected]> Co-authored-by: vznh <[email protected]> Co-authored-by: Michael Yong <[email protected]> Co-authored-by: Hemanth Soni <[email protected]> Co-authored-by: Scott <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: Ilya Martynov <[email protected]> Co-authored-by: Tom <[email protected]> Co-authored-by: brsbl <[email protected]> Co-authored-by: noih <[email protected]> Co-authored-by: bb-slop-cop[bot] <316425484+bb-slop-cop[bot]@users.noreply.github.com> Co-authored-by: Andrew Chan <[email protected]> Co-authored-by: kongenpei <[email protected]>
## Human comments ## What was wrong New-thread pickers treated active composer selections as shared preferences and subscribed to cross-tab localStorage events. A tab with a stale project catalog could replace another tab’s selected project with Personal (get-bb#3190); changing model, reasoning, permissions, service tier, or environment also changed other open composers. The original project-only fix stopped live synchronization but left inherited selections unpinned, so reloading a tab could adopt another tab’s latest choice. ## What changed Project, provider, model, reasoning, service tier, permissions, and environment selections now use tab-scoped storage. Each tab saves its initial value to sessionStorage and preserves it through reloads. Explicit changes still update localStorage to seed new tabs. Model/reasoning memory remains scoped by provider, and environment memory by project; existing legacy migrations are preserved. Initial-value persistence is opt-in on the shared storage adapter, leaving pane-layout initialization behavior unchanged. Storage operations tolerate blocked session storage and localStorage write failures. No server/daemon wire, CLI, SDK, database, or public plugin API change; no host-daemon protocol bump required. ## How you verified - Independently reproduced the stale-project overwrite in two live Chromium tabs before the production change. Also reproduced a reasoning change in tab B changing tab A. - Added regressions that failed before the fixes: cross-tab project writeback, inherited project/Personal reload, six picker preference groups, provider/project memory, legacy migration across reload, and storage failure handling. - Before updating to current main, `pnpm exec turbo run test typecheck build lint --filter=@bb/app` passed: 4,264 app tests passed, 3 skipped. - On the final revision, typecheck/build/lint passed (lint: 0 errors, 190 warnings). The full app run had 4,268 passed, 4 skipped, and 2 failures in unchanged `PluginSettings.test.tsx` and `bottom-anchored-scroll-body.scroll-preservation.test.tsx`. A focused rerun passed plugin settings but had two scroll-preservation assertion failures (39 passed, 2 failed). The shared host had a load average above 130. These failures remain disclosed for CI verification; no unrelated test changes were made. - Changed-file `oxfmt --check` and `git diff --check origin/main...HEAD`: passed. - Live browser checks covered independent picker selections, initial and explicit selections surviving reload, fresh-tab seeding, provider/project switching, Personal, unavailable/deleted projects, and absence of storage-event writeback loops. Existing-thread execution-option tests also pass. - The user tested and approved the compiled app served with `pnpm start:worktree` in a persistent BB terminal. Native Safari/iOS/Electron were not verified. Fixes get-bb#3190 > AGENT GENERATED --------- Co-authored-by: Sawyer Hood <[email protected]> Co-authored-by: Vedran Burojević <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: Michael Yong <[email protected]> Co-authored-by: Michael Yong <[email protected]> Co-authored-by: Fabio <[email protected]> Co-authored-by: Jason Son <[email protected]> Co-authored-by: vznh <[email protected]> Co-authored-by: Hemanth Soni <[email protected]> Co-authored-by: Scott <[email protected]> Co-authored-by: Ilya Martynov <[email protected]> Co-authored-by: Tom <[email protected]> Co-authored-by: brsbl <[email protected]> Co-authored-by: noih <[email protected]> Co-authored-by: bb-slop-cop[bot] <316425484+bb-slop-cop[bot]@users.noreply.github.com> Co-authored-by: Andrew Chan <[email protected]> Co-authored-by: kongenpei <[email protected]>
…bb#3443) ## Human comments ## What was wrong Workspace creation was split between an `environment_launches` row, an environment row, and in-memory thread provisioning contexts. Separate provider and daemon orchestration paths handed the same lifecycle between them, making restart recovery, cancellation, and retries depend on duplicated state. A provisioning sweep could fail a workspace while its provider was still creating it. ## What changed - Reserve one environment row before provider creation. One engine and operation registry advance it through `creating`, daemon attachment/setup (`provisioning`), and `ready`, and handle cancellation, cleanup, and retirement. - Persist thread startup requests in `threads.startup_context`; derive provisioning stage from rows and resolve placement directly into the environment reservation. - Retain five creation fields: `owner_thread_id`, `attempt`, `status_message`, `pending_log`, and `claim_path`. Attachment clears ownership atomically with the thread's environment binding. Creation failures are terminal; explicit retries reuse the row with a new attempt. Remove duplicate phase/attachment flags and the transient-create retry ladder. - Keep exclusive path claims, shared-checkout identity, restart recovery, and retirement. Retry failed attached setup on the existing environment, and wait for daemon reconnection before recovering setup. - Cancelling a preparing thread that has claimed an existing shared workspace leaves that workspace ready for its other threads. Defer the error status until removal actually starts; keep provider logging in one reporter path and use an explicit path-admission assertion. - Add migration `0116_majestic_swordsman.sql` and its Drizzle-generated snapshot. It transfers unfinished allocations and startup requests, then drops `environment_launches`. - Update the environment-provider SDK failure result and Plugin Guide to describe terminal creation failures. Existing CLI/SDK environment status exposes `creating`; daemon wire payloads are unchanged, so no protocol bump is needed. ## How you verified - Full Turbo typecheck: 94 tasks passed after merging main. Server/db typechecks passed again after the final review fixes. - Latest full server/db suites with `--maxWorkers=4`: server 2,400 passed / 1 skipped; db 483 passed. The default-worker run hit the previously observed five-second provider-discovery timeout. - Full app and CLI suites passed before the later server fixes and main merge: app 4,216 passed / 3 skipped; CLI 558 passed. - Recovery/shared-environment integration tests: 10 passed; built-in environment-provider tests: 74 passed. - Added regression coverage for cancelling a preparing owner of a shared ready workspace, including transcript finalization, and exactly-once provider log delivery. Updated deletion API assertions to preserve status until removal starts. - Added regression coverage for recovery while the daemon is disconnected and changed setup-retry coverage to exercise turn dispatch, which exposed the allocation regression missed by direct engine tests. - Ran the worktree server and drove the matching `bb` CLI against a disposable Git project with real Codex and Cursor providers. Verified file reads and final assistant responses, fresh worktree creation, checkout/shared-environment reuse, setup failure and same-row retry, server restart during setup, cancellation before and after attachment, retirement/unarchive, and directory removal. The live run found the setup-retry and reconnect fixes, then passed their repeated scenarios. It preceded the final shared-workspace cancellation review fix. Claude authentication was expired, so its agent-execution check was blocked. Commands included `pnpm exec turbo run typecheck`, `pnpm exec turbo run test --filter=@bb/server --filter=@bb/app --filter=@bb/db --filter=@bb/cli --continue --force`, `pnpm exec turbo run typecheck lint test --filter=@bb/server --filter=@bb/db`, and the final suite rerun `pnpm exec turbo run test --filter=@bb/server --filter=@bb/db -- --maxWorkers=4`. Neither server nor db defines a lint task. > AGENT GENERATED
…#3447) ## Human comments ## What was wrong The GitHub plugin launched four list processes for every tracked repository and repeated successful sweeps after a five-minute wait, even when the catalog was unchanged. A deterministic 34-repository reproduction launched 136 list processes per sweep. This proves polling amplification; it does not establish quota exhaustion or interactive failures. ## What changed Batch each repository's four bounded issue/PR lists into one `gh api graphql` call, and wait 15 minutes after successful sweeps. Preserve creation order, result limits, closed/merged PRs, gh author serialization, disabled-issues handling, cached rows on failed responses, immediate manual refresh, and the existing five-minute retry cap. Validate GraphQL responses before replacing repository rows. The interval remains internal policy with no new configuration or CLI/SDK member. README and marketplace overview document the behavior. HOST_DAEMON_PROTOCOL_VERSION is unchanged because no server/daemon wire contract changes. For 34 repositories, fetch process launches drop from 136 to 34 per sweep. Combined with the longer wait, the negligible-duration steady-state projection drops from 1,632 to 136 fetch processes/hour, excluding startup, manual refresh, retries and authentication. HTTP request counts are source-derived, not live-measured; GraphQL point savings are unmeasured. ## How you verified - Deterministic fake-process/fake-clock regressions failed against the original cadence and separate-list implementation before the changes. - Real SQLite tests cover mapping, disabled issues, empty results, malformed/partial responses, cache retention and cross-repository failure isolation. - Timing tests preserve manual RPC/CLI refresh, retry/reset behavior and parked shutdown. Existing in-flight sweeps still finish on abort. - Offline query validation against GitHub's public GraphQL schema; no live polling requests used in regression tests. - 46 tests passed across 8 files; Turbo test/typecheck/build completed successfully (7 tasks). Targeted lint, formatting and diff checks passed. Fixes get-bb#3406 > AGENT GENERATED
## Human comments ## What was wrong After selecting files on mobile, focus loss collapses the follow-up composer. Compact layout previously omitted all attachment UI, so successful uploads appeared to have failed until the editor was focused again (get-bb#3177). ## What changed Compact composers now show a paperclip and the total attachment count beside the draft text in the existing single row. The indicator has an accessible singular/plural label and no removal button. Focusing the composer exposes the existing image previews and file removal controls. Removing a focused attachment explicitly blurs its button before unmount so the composer can settle back to compact layout. This replaces the original PR's forced-expansion approach: attachments remain visible as a count without keeping the editor expanded. No SDK, CLI, stored-data, or wire contract changes; no host-daemon protocol bump is required. ## How you verified - Reproduced the original missing-preview behavior on pristine main using sawyerhood/dev-browser at a 390×844 touch viewport and a real Chromium file chooser. - Regression coverage checks mixed image/file counts, singular count, no compact removal controls, expanded removal controls, and an empty attachment list. - Ran the focused and adjacent promptbox suite through Turbo: 388 passed, 3 skipped. - Turbo app typecheck, build, and lint passed; lint has existing warnings and no errors. Formatting and git diff --check passed. - Live count-only QA on the optimized app launched through `pnpm start:worktree`: 50px compact row with draft text, accessible “2 attachments” indicator, zero compact removal controls, expansion for removal, count update to one, and clearing the count after final removal. - Earlier iterations exercised actual iOS Simulator Safari picker return and removal. The final count-only design was verified in Chromium touch emulation, not rerun in Safari or TestFlight. Fixes get-bb#3177 > AGENT GENERATED
…bb#3448) ## Human comments ## What was wrong The inline Markdown preview added in get-bb#3439 passed only text to the message renderer, discarding the report’s directory and storage source. A nested `reports/report.md` linking to `sibling.md` or `chart.svg` therefore resolved from the workspace root, even when the report lived in thread storage. ## What changed Pass server-resolved document context through the private inline-vis response into `Markdown.experimental_document`. Reuse existing file-image routing and explicit file navigation so links and images resolve beside the document within the selected source. Preserve line ranges, message rendering without document context, and existing HTML sandbox behavior. Document the experimental SDK prop in the Plugin Guide and API audit, add an inline-vis example, and bump the Plugin SDK from `0.4.54` to `0.4.55` so consumers can require a host that supports the new surface. No daemon wire changes or new CLI commands; existing SDK/CLI message directives retain their delivery path. ## How you verified - Added real-renderer regressions for nested workspace/thread-storage links and images, conflicting ambient workspace context, line ranges, parent-directory references, missing destinations, and escape/absolute-path controls. Both destination cases and both RPC context assertions failed before the change and passed afterward. - Turbo test/typecheck passed for `bb-plugin-inline-vis`, `@get-bb/plugin-sdk`, and `@bb/plugin-api-map`; app build/typecheck and the Plugin Guide build passed. - Focused app tests passed, including 13 renderer/image checks after rebasing. The broad app suite was interrupted under load; all five observed failures passed focused reruns with two workers. No full-suite pass claimed. - Verified the actual source app with a connected daemon and synthetic reports: correct sibling documents and charts from both storage roots, desktop pointer activation, reload and keyboard activation at 390×844 with coarse pointer/no hover, and no horizontal overflow. - Source browser/filesystem fixtures covered loading, stale/error states, HTML sandbox preservation, and missing/binary/oversized/traversal/symlink controls. Safari, Electron, and remote authentication were not verified. - `node .github/workflows/check-plugin-sdk-version.mjs` passed after the `0.4.55` lockstep bump. ## Before and after Matching 1280×900 source-component fixtures for a thread-storage report. Before uses parent `1d20e5f9ccd9f85cf5e9f56461d8f5e4fc25c5f3`; After captures the UI behavior now present at final pushed head `5dd24812ac6a208688b6ed4d9a0f93af0c4d5c21`. The subsequent rebase and SDK-version correction did not change the rendered UI. Navigation/RPC are fixture adapters; the actual inline component and renderer are built from the compared revisions. After requests the chart beside the report and opens `reports/sibling.md` in thread storage. | Before — wrong workspace destination, broken chart | After — document-relative destination, chart loaded | | --- | --- | |  |  | > AGENT GENERATED
…sions (get-bb#3450) ## Human comments Currently, we synchronize browser tabs between desktop app main processes, host daemon processes, and the server process. Each browser tab is associated with a thread ID. We do this so that agents can interact with browser tabs that might be opened in a desktop app window elsewhere (note you can have multiple desktop apps across multiple machines, but only ever 1 server process). If we try to synchronize a browser tab associated with a thread ID that the server doesn't have, the server process will throw an error, and the host daemon which forwarded this message to the server will be forcibly disconnected. Moreover this will happen in a loop because on reconnect we will retry browser tabs synchronization through that host daemon. Today, you can open browser tabs inside a plugin pane, which gets a fake thread ID of the form `plugin-panel:cloud-sandbox:cloud-machines:pane-1`. The server won't be able to find any such thread ID and so using the browser inside the plugin pane trivially trips this bug and can cause the local machine/daemon to get disconnected. This PR should fix that bug by making the server just ignore these browser tabs instead of forcibly disconnecting the host daemon. ## What was wrong The server handles every host-daemon WebSocket message inside a single `try/catch` in `onDaemonSocketMessage`, and any handler error closes the daemon session (`1008 inactive-session`). The desktop app forwards `desktop-browser.changed` tab snapshots through the host daemon, and `syncDesktopBrowserTabs` starts with `requirePublicThread`, which throws `thread_not_found` when the snapshot's scope isn't a live thread. Browser tabs opened in a plugin page's right panel report their panel-state id (for example `plugin-panel:cloud-sandbox:cloud-machines:pane-1`) as their thread id, so one such tab made the server drop the whole host session. The desktop broker re-sends every known scope after each reconnect, so the host got stuck in a loop: connect, snapshot, session closed. It showed as offline, and each drop was logged as the misleading `Daemon heartbeat rejected, closing socket`. ## What changed - `apps/server/src/ws/daemon-protocol.ts`: errors from `syncDesktopBrowserTabs` are now caught. The server logs `Dropping desktop browser snapshot the server cannot apply` with host, instance, generation, thread id and the error, and drops the snapshot. The daemon session stays open. - The catch-all log is now `Daemon message rejected, closing socket` and includes `messageType`, so the next unexpected rejection names the message that caused it. - No wire change; `HOST_DAEMON_PROTOCOL_VERSION` is unchanged. - The desktop-side fix, which stops the broker publishing plugin-panel browser tabs at all, is in a stacked follow-up PR. ## How you verified - Added `drops snapshots for synthetic, missing, or deleted threads without closing the daemon session` to `apps/server/test/desktop-browsers.test.ts`. It sends snapshots scoped to a plugin-panel id, a missing `thr_` id and a deleted thread. It asserts the socket is not closed and nothing is stored, and that a valid snapshot on the same session is still applied. - Before the fix: `AssertionError: plugin-panel:cloud-sandbox:cloud-machines:pane-1: expected "vi.fn()" to not be called at all, but actually been called 1 times` - After the fix: `pnpm exec turbo run test --filter=@bb/server -- test/desktop-browsers.test.ts` → `Tests 18 passed (18)` - `pnpm exec turbo run typecheck --filter=@bb/server` passes. - Found on bb Nightly `0.42.2-nightly`: `server.log` showed a `thread_not_found` "heartbeat rejected" about every 30s for the local host. Local Storage had browser-panel state for `plugin-panel:cloud-sandbox:cloud-machines:pane-1`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED Co-authored-by: Claude Opus 5 <[email protected]>
## Human comments See human comments in [get-bb#3450](get-bb#3450) for more context ## What was wrong Plugin pages reuse the shared browser deck with `threadId={panelStateId}` (`PluginPanelRightPanelHost.tsx`). So a native browser tab opened in a plugin page's right panel is scoped to a synthetic id such as `plugin-panel:cloud-sandbox:cloud-machines:pane-1`. The desktop browser broker published a `desktop-browser.changed` snapshot for every scope it had seen. These synthetic scopes therefore went through the host daemon to the server, which has no thread to attach them to. get-bb#3450 makes the server drop such snapshots instead of closing the daemon session. This PR stops the desktop app sending them in the first place. ## What changed - `apps/desktop/src/desktop-browser-broker.ts`: `publish()` notifies its daemon-bound listeners only when the scope is a real thread id (`isRawThreadId` from `@bb/domain`). Plugin-panel browser tabs stay local to the desktop app. The renderer's local control-state IPC is unchanged. - `apps/desktop/test/desktop-browser-broker-snapshots.test.ts` (new): with one real-thread tab and one plugin-panel tab, only the real thread's snapshot is published across window registration, host connect and a tab change. - `apps/desktop/test/desktop-browser-view-manager.test.ts`: the reconnect test checks daemon-bound snapshots, so it now uses real-format thread ids. The fixture helper gained an optional `threadId`, which still defaults to `"thread-1"` for every other test. - No server/daemon wire change; `HOST_DAEMON_PROTOCOL_VERSION` is unchanged. ## How you verified - New test, before the broker change: `AssertionError: expected Set{ 'thr_23456789ab', …(1) } to deeply equal Set{ 'thr_23456789ab' }`. After the change it passes. - `pnpm exec turbo run test --filter=@bb/desktop` → `Test Files 42 passed (42)`, `Tests 318 passed | 1 skipped (319)`. - `pnpm exec turbo run typecheck --filter=@bb/desktop` passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED Co-authored-by: Claude Opus 5 <[email protected]>
…et-bb#3454) ## Human comments ## What was wrong The desktop "Open server and daemon logs" viewer printed raw pino JSON lines prefixed with `[server]`/`[host-daemon]`, so timestamps showed as epoch milliseconds (`"time":1789079985901`) and levels as numbers (`"level":40`), making the log hard to scan. ## What changed - `apps/desktop/src/log-viewer.ts`: new `formatLogLine` parses each tailed line as a pino record and renders `YYYY-MM-DD HH:mm:ss.SSS [level] [component] msg {remaining fields}` in local time. `component` is omitted when it matches the log file's component and shown as `[host-daemon:<sub>]` otherwise. Non-pino lines fall back to the previous `[component] <raw line>` format. Copy Logs uses the formatted text. - No wire, CLI, or protocol changes. Example: ``` 2026-09-09 09:25:59.311 [warn] [server] Failed to resolve host for provider discovery {"errorCode":"host_unavailable","errorMessage":"Host is not connected",...} ``` ## How you verified - Added `formatLogLine` tests in `apps/desktop/test/log-viewer.test.ts` (pino formatting, core-only records, differing sub-component, non-JSON / non-pino fallback); `vitest run test/log-viewer.test.ts` passes (11 tests). - `pnpm exec turbo run typecheck --filter=@bb/desktop` passes. - Not yet checked manually in the running desktop app. > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Human comments ## What was wrong Mobile submit runs on touch release. Clearing the composer during an active thread replaces Send with Stop before the browser dispatches the trailing click, so the same tap sends the follow-up and stops the thread. The existing voice-action fix guarded this replacement case for Voice, but Stop still accepted the click unconditionally. ## What changed Require pointer clicks on Stop to originate from a pointer-down on that same button, matching the existing voice-action guard. Keyboard and accessibility activation remain available. Add regression coverage for both an already-running thread and a newly started run, plus deliberate touch, mouse, and keyboard Stop actions. ## Before / After Current screenshots captured from the `pnpm start:worktree` build of final PR head **`4573d1f75bfca1ba180d8d6ef85d1339bf0d9965`**, using **synthetic fixture threads** and Chromium mobile touch input (390 × 844). Both use the same initial task and follow-up. Before restores only the original Stop handler in the browser response to reproduce the bug; After uses the unmodified final build. The PR head is unchanged. | Before — trailing tap interrupts the run | After — follow-up leaves the run active | | --- | --- | |  |  | Before: the real server recorded one manual-stop interruption; its pending steer then completed, leaving the captured thread idle. After: one follow-up persisted while the thread stayed active, with zero interruptions. Both captures observed trusted pointer-down/up on Steer followed by the same tap's trusted click on Stop. No screenshot contents were edited. [Capture provenance and exact baseline substitution](https://github.com/get-bb/bb/blob/a4c12074f8a36cb28b524417f3a8888f2651f0bc/README.md). ## How you verified - Both trailing-click regressions failed before the fix and pass afterward. - `pnpm exec turbo run test --filter=@bb/app -- src/components/promptbox/PromptBoxInternal.test.tsx src/components/promptbox/PromptBoxInternal.ipados.test.tsx src/components/promptbox/FollowUpPromptBox.test.tsx`: 169 tests passed. - `pnpm exec turbo run typecheck --filter=@bb/app`: passed. - Isolated source app with a real active thread and Chromium touch input at 390×844: observed trusted pointer-down/up on Steer followed by a trusted click targeting Stop. Exactly one follow-up persisted, and the thread remained active. A subsequent deliberate Stop click produced the manual-stop event and idle state. - During the deliberate-stop check, the first tap emitted pointer events without a click; a second tap emitted the click and stopped the run. This change addresses the trailing-click interruption. Native iOS/Android were not tested. - `pnpm start:worktree` built and started successfully for user testing; app and daemon health checks passed. > AGENT GENERATED
## Human comments ## What was wrong The new-thread composer persisted the environment provider but kept its selected machine only in component state. Returning to the page or reloading therefore restored the provider on the primary machine. A picked machine could also carry over when changing projects. ## What changed Persist the selected existing machine per project using the same tab-local storage behavior as the other composer preferences. Restore it alongside the environment provider, reset transient selections when changing projects, and retain the existing fallback for deleted machines or machines without the required project checkout. Plugin composers keep their selections separate. ## How you verified - 49 focused tests passed, including remount/reload persistence, project switching, unusable-machine fallback, tab isolation, and plugin-composer isolation. - `pnpm exec turbo run typecheck lint --filter=@bb/app` passed (lint: no errors). - Focused Vitest tests ran directly after the Turbo test precheck reported unrelated stale generated PWA icons; a Node 22 retry was blocked by native-module setup exiting 137. - Live UI verification was blocked because the dev launcher requires `lsof`, which is unavailable on this host. - Secret-model scan: working tree and push range clean, zero matches. - SlopCop skipped at the user's request. > AGENT GENERATED
## Human comments ## What was wrong The Provider Usage footer coverage put plugin import/registration, the content-script preload and focus listener lifecycle, disclosure rendering, two Radix machine-menu sessions, provider mouse and keyboard navigation, disconnected state, dismiss, manual refresh, and disposal inside one asynchronous test with the default 5-second budget. Package-shard concurrency and Vitest worker oversubscription made that serial UI sequence slow enough to expose the test architecture: the unchanged test reproduced at 6.610 seconds under bounded Intel contention and timed out at 5 seconds. The CI failure was therefore not a deterministic regression in PR get-bb#3449, and scheduler contention was the trigger rather than the root cause. ## What changed `plugins/provider-usage/app.test.tsx` now loads and captures the plugin registration once outside test clocks, reuses one response fixture, and divides coverage into registration, content-script focus refresh, disconnected/manual refresh, and connected machine/provider interaction scenarios. Content-script disposal is protected by `finally`. The disconnected case starts from the active Intel machine, removing a second Radix menu lifecycle while the connected case still proves all machines are aggregated and exercises machine selection plus provider mouse and keyboard navigation. No assertions were disabled, no timeout was increased, and there are no wire, CLI, or documentation changes. ## How you verified - Before: on enrolled Intel host `host_nwqfteeqz4`, a warmed run with 12 bounded CPU competitors reproduced the exact failure: 6.610 seconds and `Test timed out in 5000ms`. - After: the same 12-worker warmed stress passed all four scenarios; the slowest scenario was 833 ms. - After: five fresh focused iterations under 12 CPU competitors passed 20/20 scenario executions; the slowest scenario was 1.202 seconds. - `pnpm exec turbo run test --filter=bb-plugin-provider-usage` — 3 files and 7 tests passed. - `pnpm exec turbo run typecheck --filter=bb-plugin-provider-usage` — passed. - `pnpm exec turbo run build --filter=bb-plugin-provider-usage` — passed the package's available upstream generator tasks; this package has no build script. - `bb plugin build` from `plugins/provider-usage` — emitted validated server and app bundles. - Every test/build/load command ran in a bounded process group; teardown and the final process scan found no surviving Vitest, Turbo, plugin-build, or load workers. > AGENT GENERATED
## Human comments
## What was wrong
The local-file bridge test wrapped three deterministic input-to-prompt
assertions in three independent real fake-Pi session lifecycles. Each
case constructed a Pi RPC child, loaded the real extension boundary,
delivered one local-file conversion, and tore the child down. The
packages shard runs Turbo at concurrency 4 while each package starts a
Vitest pool, so CPU/process oversubscription made those avoidable serial
child startups cross Vitest's unchanged 5-second case ceiling. Scheduler
contention is the reproduction trigger; the root cause is paying three
feature-specific subprocess startups for a typed conversion already
exposed as `extractPiPromptInput`.
On the frozen Intel base, the unchanged file passed unloaded in 4.43
seconds of test time (2.197/1.117/1.118 seconds per case). With 32
bounded CPU burners, all three unchanged cases timed out at the existing
5-second ceiling and were reported at 6.927/6.913/8.498 seconds.
## What changed
- Added exact mixed text/local-file and file-only assertions to
`turn-input.test.ts`, directly against the typed conversion called by
both turn and steer handlers.
- Replaced the generic text prompt in the existing real-process
`stop{release}` lifecycle case with a metadata-bearing local-file-only
turn and retained the child shutdown/checkpoint assertions.
- Added a local file to the existing real-process successful steer case
and retained its accepted-input, turn-boundary, framing, and no-error
assertions.
- Deleted the standalone three-session `bridge.local-file.test.ts`.
This adds no subprocess startup: the meaningful `turn/start` and
`turn/steer` protocol checks ride real child sessions already required
for lifecycle coverage. No timeout, polling deadline, retry budget,
production behavior, protocol field, CLI/SDK surface, or host-daemon
wire contract changed, so `HOST_DAEMON_PROTOCOL_VERSION` is unchanged.
A timeout increase was rejected because the work is deterministic and
its repeated process construction is avoidable. A shared
feature-specific fake-Pi session was also rejected because it would
preserve unnecessary startup exposure and duplicate existing lifecycle
sessions. The retained real-process checks continue waiting for
observable turn boundaries and child exit, while the conversion matrix
itself completes synchronously.
Open PR/issue searches found no owner for `bridge.local-file.test.ts` or
the exact timeout. The only open PR touching the Pi bridge is get-bb#3249, for
skill-command behavior; it does not touch this test. BB thread searches
likewise found no overlapping local-file flake owner. Merged get-bb#3302 is
the structural precedent for the distinct skill-command suite.
## How you verified
Mandatory host gate and every workload ran on enrolled Intel host
`host_nwqfteeqz4` (`Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz`,
`x86_64`). HEAD began at and retains merge-base
`a4f513251851bc357fbc0f28e61c331ea3f9f2e4`; `origin/main` advanced
afterward and this branch intentionally kept the frozen base.
- Unchanged-main focused run: 3 passed; 4.43 seconds of test time.
- Unchanged-main 32-burner reproduction: 3/3 timed out at the unchanged
5-second ceiling; 6.927/6.913/8.498 seconds reported.
- Final identical 32-burner conversion run: 12/12 passed in 50 ms of
test time; the local-file case took 3 ms.
- Final focused conversion plus reused turn/steer protocol checks: 3/3
passed.
- `pnpm exec turbo run test --filter=bb-plugin-provider-pi --force --
--maxWorkers=2`: 26 files and 154 tests passed, one file/test skipped.
- The default-worker full package run demonstrated the systemic
oversubscription separately: 150 tests passed and four unrelated
settings/conformance/lifecycle cases timed out or observed late cleanup;
both changed real-process cases passed under that load at 13.413 and
12.637 seconds. No clock was changed in response.
- `pnpm exec turbo run typecheck --filter=bb-plugin-provider-pi
--force`: 4 Turbo tasks passed.
- `pnpm exec turbo run build --filter=@bb/host-daemon --force`: 5 Turbo
tasks passed.
- `pnpm exec turbo run test --filter=@bb/plugin-build --force --
--maxWorkers=2`: 10 files and 137 tests passed, one skipped, including
provider-Pi server and host artifact builds.
- `pnpm exec oxfmt --check
plugins/provider-pi/src/bridge/bridge.lifecycle.test.ts
plugins/provider-pi/src/bridge/bridge.round2.test.ts
plugins/provider-pi/src/bridge/turn-input.test.ts`
- `git diff --check`
Every test, build, formatting, and synthetic-load command used an
external deadline and a dedicated top-level process group; the load
runner trapped EXIT/INT/TERM/HUP and reaped its workers. Post-run
process and temporary-directory audits found no surviving burner,
Vitest, Turbo, fake-Pi child, or task-specific temporary directory.
> AGENT GENERATED
## Human comments ## What was wrong A transient failure loading the selected desktop server left a static startup error page after the server recovered. The error page could not invoke the existing server-selection recovery flow. Reproduced in actual Electron on main at f41d564. ## What changed Recoverable remote navigation, Connect authentication, and local attachment failures now offer **Try again**, which reapplies the selected target through the existing desktop flow. Fatal startup, port-conflict, and process-stop errors have no retry button. The sandboxed preload sends a fixed, argument-free IPC event. Main accepts it only from a registered application window's main frame displaying the current retryable error. Retry state is consumed synchronously and only one attempt runs at a time. This prevents rapid clicks from initiating overlapping target loads; a real Electron regression observed three loads for ten clicks before the guard. No automatic reconnection system, server/daemon wire changes, configuration, CLI, or public plugin API changes. No host-daemon protocol-version bump is needed. ## How you verified - Pristine-main regression failed before the production change: missing retry control. - Actual Electron main, window factory, sandboxed preload and IPC tested with custom target recovery, repeated failed retries, concurrent clicks, and rejection of unrelated/fatal pages. Invalid payload/sender/frame checks are injected into the actual registered main handler. - Synthetic Connect recovery uses a failed session-mint response followed by success and verifies the real Electron cookie store. Hosted Connect/OAuth and Linux Electron were not exercised. - Real Electron mouse click opened the isolated workspace. Supplementary web QA ran `pnpm start:worktree`; browser-only coverage is not counted as Electron IPC coverage. - Desktop Turbo test/build/typecheck/lint, explicit changed-file oxlint, oxfmt, and git diff --check. Electron smoke uses the existing bounded shutdown cleanup, which may escalate to SIGKILL; graceful shutdown is not claimed. Fixes get-bb#3223 > AGENT GENERATED --------- Co-authored-by: Sawyer Hood <[email protected]> Co-authored-by: Michael Yong <[email protected]>
Contributor
|
Thanks @ariofrio for the PR. This repo needs approval before a PR. Join the #contributors channel in Discord (https://discord.gg/kvBU6tJhcJ) and explain what you want to open a PR for and why. A maintainer then adds you to the allow list. This PR now closes on its own. Reopen it or open a new one after approval. |
SawyerHood
added a commit
that referenced
this pull request
Sep 29, 2026
## Human comments ## What was wrong `ariofrio` was absent from the contributor allowlist, so the PR gate closed their PRs (#4440, #4444). Their earlier PR #2784 was merged. ## What changed Added `ariofrio` to `.github/APPROVED_CONTRIBUTORS`, allowing the PR gate to accept their PRs after merge. ## How you verified Verified the canonical GitHub login, confirmed the diff adds only that login exactly once case-insensitively, and ran `git diff --check`. CI and SlopCop review are skipped for this data-only change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
Plugin CLI output crashed when a consumer such as
head -n 1closed the pipe early. Node reports a failed write through both the write callback and the stream's error event; the proxy handled only the callback, leaving EPIPE unhandled. Independently reproduced with the real CLI against temporary plugin endpoints on main at959d771d60de6b75bee01bac09aed13f0394e54f: a 700,000-byte response (below the 1 MiB plugin limit) exited 1 in all four combinations of contributed/explicit plugin commands and stdout/stderr.What changed
Install scoped error/close listeners before writing, treat EPIPE as normal early output termination, and preserve other failures and the plugin's exit code. Wait for failed stream destruction to settle and remove listeners after success, errors, or synchronous throws; handle already-destroyed streams without accumulating listeners. Preserve the newer Account Pool protected-stdin handling and proxy transport behavior.
Retain real-process regressions using the actual CLI and
headunderpipefail, plus focused Writable coverage for delayed destruction, paired events, listener cleanup, repeated writes, synchronous exceptions, premature close, and stderr flushing after stdout EPIPE. No ordinary code comments, CLI flag/configuration changes, public SDK changes, or server/daemon wire changes; no protocol-version bump is needed.How you verified
f28c4288ffand ranpnpm exec turbo run test build typecheck lint --filter=@bb/cli --concurrency=2: 574 CLI tests passed; 8/8 Turbo tasks passed. The CLI has no lint task, so targeted oxlint also passed for the three changed files; formatting andgit diff --checkpassed.pnpm exec turbo run test --filter=@bb/cli -- src/__tests__/plugin-cli-broken-pipe.e2e.test.ts --maxWorkers=2. It supplies isolated plugin responses and launches the real CLI throughhead -n 1; no installed plugin, credentials, or BB dev server is required. The fixture and child process group are cleaned up. Dev link/screenshots: N/A (CLI-only).Fixes #2783