Repository navigation
Temporarily raise workspace route bundle budgets by 5% - #4933
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
added a commit
that referenced
this pull request
Oct 5, 2026
## Human comments ## What was wrong Plan approval cards started collapsed, hiding both the plan and the decision buttons. A thread could be waiting for approval while showing only a small “Plan review” strip above the composer. ## What changed Open Plan approval cards automatically, matching the existing question behavior. Users can still collapse the card, and each new plan request starts expanded. Ordinary command approvals retain their current collapsed default. No CLI, SDK, server/daemon wire, or protocol changes. ## How you verified The expanded-default and next-plan regression tests fail on origin/main before the fix and pass afterward. `pnpm exec turbo run test --filter=@bb/app -- src/components/thread/pending-interactions` passes all 17 tests; app lint and typecheck pass (lint has existing warnings). In an isolated built BB app, use real Claude Code to request a Plan approval. The base build shows the collapsed strip; the changed build opens the plan and decisions automatically. Browser checks cover manual collapse/reopen and a compact viewport; clicking Approve plan resolves the actual server interaction and Claude replies APPROVED. A fresh pending plan is retained privately for review. Matching before/after captures use the same prompt and viewport in separate real threads because stopping the base server cancelled its pending interaction. The first CI run exposed a workspace route budget overage also reproduced on unchanged main: both builds contained exactly 1,087,984 raw bytes, 120 over the prior limit. Main subsequently fixed that budget in #4933. This PR is rebased onto that fix and contains only the two Plan UI files; no separate budget allowance remains. The local bundle check passes with unchanged payload. Final-head checks: 30 passed, 0 failed, 3 skipped; only the contributor gate remains queued waiting for a GitHub runner (requeued once). > AGENT GENERATED
This was referenced Oct 5, 2026
ymichael
added a commit
that referenced
this pull request
Oct 5, 2026
…-page JavaScript (#4955) ## Human comments ## What was wrong The workspace route's bundle budget sat within 0.1 KB of its limit, so ordinary feature work kept turning main red (#4933 temporarily raised it). The budget measured the `SplitWorkspaceRoute` closure, which moved whenever code shifted between the route chunk and a page's own lazy chunk, not the JavaScript a page actually waits for. Code-split preloading was opt-in per call site: `startup`/`idle` policies did nothing unless a mounted owner also called `useSplitPreload`. And the workspace route's import only started after boot downloaded and ran, a full round trip behind it. ## What changed - **Budgets measure page journeys.** `ThreadPage` (route + `ThreadDetailView`) and `NewThreadPage` (route + `RootComposeView`) replace the route closure in `bundle-budget.json`; split-boundary guards check both journeys. Journey limits are 25% above measured size (20% headroom); boot limits are unchanged. - **`defineSplit` tiers.** `tier: "preload" | "intent"` replaces four policies. Preload splits queue themselves and drain at idle once no critical load (route import, current page split, any rendered split) is pending; intent splits load on render or trigger intent. Mount gating (`mountWhen`, `keepMounted`, `unmounted`) replaces three hand-written gates. Remaining `React.lazy` feature boundaries below the router move to `defineSplit`; router pages in `App.tsx` stay `React.lazy` because they suspend into the boundary that marks route content painted. - **Route content painted** now fires after critical loads settle rather than when the route skeleton renders, so preload-tier work and plugin frontend boot no longer compete with the page's own code. - **Smaller boot:** `"sideEffects": false` on `client-core`, `thread-view`, `core-ui`; sonner loads after first paint (`appToast` queues until the Toaster mounts; plugin frontends wait for it); the server-move overlay view loads after paint. - **Smaller thread page:** `RootComposeView` loads on demand; the legacy project redirect moves to its own module. - **Microphone preferences** load on demand behind `PickerLoadingRows`. - **New-thread composer banner stack** hides unless a child has content. A bare plugin banner that renders nothing (scheduled-send) still mounts an empty `display: contents` root, which defeated `empty:hidden` and added an 8px margin when plugins booted after first paint, moving the composer down. Base shows the same shift on slower loads. - **`index.html` modulepreloads the workspace route** and its static dependencies so they download alongside boot. - Docs: `docs/ui-code-splitting.md`, `docs/ui-split-loading-audit.md`. No wire, CLI, SDK, or data changes. | Minified JS | main | this PR | Limit | | --- | --- | --- | --- | | Boot | 1492 KB / 371 KB br | 1359 KB / 340 KB br | 1602 KB (15% headroom) | | ThreadPage | 1880 KB / 545 KB br | 1807 KB / 520 KB br | 2259 KB (20%) | | NewThreadPage | 1059 KB / 309 KB br | 1091 KB / 321 KB br | 1364 KB (20%) | ## How you verified - `pnpm exec turbo run build typecheck lint test --filter='...[origin/main]'`: 230/232 tasks passed; the failure was `PluginSettings.test.tsx > autosaves the latest text value on blur` under parallel load, which passes 3/3 alone and touches no changed code. - New tests: split tiers and preload queue, critical-load gating (fails without the gate), mount gating, page-journey stats, toast queueing before the Toaster mounts, route modulepreload build output. - Product-path verification against isolated running BB servers (head and base control) with a connected daemon and a real Claude Code thread is recorded in the reviewer handoff linked from the thread. > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
ymichael
added a commit
that referenced
this pull request
Oct 5, 2026
## Human comments ## What was wrong Core duplicated Side Chat's Send to main action and special full-thread chrome even though the plugin's embedded ThreadChat already supplies the action. Embedded timelines also suppressed slot actions in message rows but leaked them into assistant text-selection menus. Plugins lacked the recorded message sequence needed to use A2's individual-message links reliably for steers. ## What changed - Remove core Send to main and its hook/prop chain, the side-chat header pill, and the Side chat of composer relationship. Generated handoffs say Message from side chat; the generated-message Forked from path is removed. Full threads use ordinary fork behavior. - Honor includePluginMessageActions=false in both selection-menu activation and action collection. Side Chat's existing embedded consumer action remains available, with A3/A2's fitted inline actions and ⋯ ordering preserved. Add to chat stays core. - Expose ThreadChatMessageReference.experimental_messageSeq to slot actions, consumer actions, and selections; document it in the Plugin Guide and audit list. Bump Plugin SDK 0.6.21 → 0.6.22. No server/daemon wire change. Attachment sizes, global Send to main registration, action availability/role/placement fields, and React metadata slots are excluded. ## How you verified Rebased onto main after A2 and portable attachments merged. Only A4 remains; main's final Copy link behavior, portable attachment contract, automation links, and Sent to labels are preserved. Rebased again onto main at c5b97d7 (2026-10-05): main had taken 0.6.20 and 0.6.21, so the SDK is re-bumped to 0.6.22; the Plugin Guide message-actions bullets conflicted with #4611's shorter copy and now use main's wording, extended to say slot actions appear in the main timeline only and that actions receive the message's link sequence. All affected typechecks/lints passed, along with 105 app, 363 SDK, 20 Side Chat, 75 Plugin Guide, and 22 server documentation tests (585 total): - `pnpm exec turbo run typecheck lint --filter=@bb/app --filter=@bb/server --filter=@get-bb/plugin-sdk --filter=bb-plugin-side-chat --filter=bb-plugin-plugin-api-docs --concurrency=2` - `pnpm exec turbo run test --filter=@bb/app -- src/components/thread/timeline/ThreadTimelineRows.actions.test.tsx src/components/thread/timeline/MessageActionBar.test.tsx src/components/thread/timeline/GeneratedConversationMessage.test.ts src/components/thread/timeline/GeneratedConversationMessage.test.tsx src/components/thread/timeline/ConversationMessageContent.test.tsx src/components/plugin/docs-anatomy-manifest.test.tsx` - `pnpm exec turbo run test --filter=@get-bb/plugin-sdk --filter=bb-plugin-side-chat --filter=bb-plugin-plugin-api-docs --concurrency=2` - `pnpm exec turbo run test --filter=@bb/server -- test/services/plugins/plugin-authoring-docs.test.ts` The new selection-suppression and recorded-steer-sequence cases failed against the original pre-fix owner and passed with A4. Final-head live verification used persistent isolated `pnpm start:worktree` app/server/daemon instances: - Matched actual parent/head seeded UI captures reproduce the embedded selection leak and correction; full-thread Send/header/banner cleanup is retained. - Real Codex turns through the running BB UI/CLI → server → daemon verified main and Side Chat replies, one Send to main delivery to the correct destination with correct sender identity, and a steer during an active turn. - An external disposable observer plugin verified actual slot, main-selection, and separate embedded ThreadChat consumer callbacks. The steer reference keeps recorded sequence 41 separate from fork anchor 42; consumers receive the same message identity. The observer is disabled after QA. - Core Add to chat inserts the selected text in the embedded composer. Main selection actions remain. Compact coarse-pointer Chromium retains Copy link/Copy/plugin/Add/Fork controls, with no app-root inert or aria-hidden. Copy link writes the correct #msg=51 URL. No native iOS/Android claim. Before the latest rebase, the only red check was the SplitWorkspaceRoute bundle budget (0.1 KB over), which also failed on the parent. Main has since raised workspace route budgets by 5% (#4933). The isolated review fixture remains running locally. Normal BB Connect exposure was rejected by automatic approval review and requires specific destination/payload approval. Reload can temporarily show the existing Agent sender-label fallback until hidden-thread metadata is cached; visiting the source thread restores Message from side chat. This metadata lookup is unchanged by A4. > AGENT GENERATED
ymichael
added a commit
that referenced
this pull request
Oct 5, 2026
## Human comments ## What was wrong Reusable prompts had no bundled picker for searching history, previewing a full prompt, and keeping favorites. B1–B3 provide the paged history API, popup host, and composer command path; this slice supplies their Prompt Library consumer. ## What changed Adds the forkable Prompt Library plugin: **Ctrl+R** or **+ → Prompts…**, fuzzy search with Thread/Project/All scopes, Markdown preview, persistent starred text and mentions, and insertion at the retained caret. Empty drafts restore history text, mentions, and attachment objects; nonempty drafts receive text and mentions. Insertion never sends a message. **Disabled by default.** Enable Prompt Library in Settings → Plugins or run `bb plugin enable bb--prompt-library` to review it. Includes `bb prompts search|list|star|unstar`, typed plugin RPC, the plugin skill, CLI guide/configuration documentation, and bundled marketplace wiring. Uses B1's `experimental_promptHistory.list`, B2's `experimental_popups` registrations, and B3's composer command API; no new SDK surface or daemon wire change. History attachment fields pass through the mapper and RPC, including unknown extension fields. The attachment schema follows main's mutually exclusive project/host ownership contract and accepts unknown sizes. Starred prompts store text and mentions only. The standalone Vitest configuration keeps forks independent of monorepo test tooling. ## How you verified - Rebased onto `origin/main` at `95750b88485a882bf9ea954c1655797002f60836`; preserved main's diagnostics documentation when resolving the only conflict. - Merged `main` at `1904796758` (picks up #4933's workspace bundle budget, which fixed the `Checks` failure). Main's new public-marketplace test from #4938 then required off-by-default builtins to be listed, so `prompt-library` is added to `OFF_BY_DEFAULT_BUNDLED_PLUGINS` in `apps/web`; the marketplace page now shows `bb plugin enable bb--prompt-library`. `turbo run test typecheck lint --filter=@bb/web` passes. - `pnpm exec turbo run typecheck lint test --filter=bb-plugin-bb--prompt-library --concurrency=4`: all 9 tasks passed, including 25 tests. Restore cases cover file/image attachments with project or host ownership and preservation of unknown extension fields. - `env -u BB_CLI -u BB_SERVER_URL -u BB_ACCOUNT_POOL_PARENT_URL pnpm exec turbo run test --filter=@bb/server -- test/services/plugins/builtin-plugins.test.ts`: all 28 tests passed. - `node scripts/check-plugin-forks.mjs plugins/prompt-library --concurrency=1`: independent install, typecheck, tests, and plugin build passed. - Earlier UI verification passed in desktop Chromium, 390px coarse-pointer Chromium, and iPhone 16 / iOS 18.4 Simulator Safari: preview, Back, insertion without sending, and starring. Rebase changes are limited to documentation resolution and attachment compatibility. - SDK generation dependencies remain explicit in Turbo, preserving the clean-CI fix. - Product path on the merged head (`pnpm start:worktree`, headless Chromium → server → daemon → real providers): Ctrl+R in follow-up and new-thread composers; Thread/Project/All and Project/All scopes with per-composer persistence across reload; fuzzy search; Cmd+S star/unstar and Star current draft; insertion at the caret without sending; empty-composer restore of an image; starred insert dropping attachments. Attachment ownership from #4685 was sent through real providers: a project A image restored into a project B new thread was copied byte-identically and described correctly, and an API-seeded absolute-path file restored with its `hostId` was read by the provider. Unknown sizes stay `0`, which the SDK documents as unknown; the file chip shows no size. Not re-run on this head: compact drawer / iOS Simulator (earlier pass above), host-mismatch rejection (single machine). - Mention round-trip on the same server: workspace-file, cross-project thread and Agent Annotations plugin mentions keep identical resources (plugin `itemId` included) through empty, at-caret and starred recall. Re-sent prompts store the same resources at shifted offsets, and real providers resolved each target. - Known core race, not changed here: if Ctrl+R arrives within ~16 ms of an arrow-key caret move, ProseMirror has not yet synced the selection, so the prompt is inserted at the previous caret. It was reproduced only at automation speed and nothing is sent. The fix belongs in core's composer popup/selection handling. Reviewer checklist (run CLI commands against the worktree instance): 1. Confirm Prompt Library is initially disabled, then enable it through Settings → Plugins or `bb plugin enable bb--prompt-library`. 2. Run `bb prompts star 'Review the release notes before merging' --json`, then `bb prompts search 'rls nts' --json`. Expect one fuzzy-matched starred prompt with highlighted characters. 3. Open a new-thread composer, press Ctrl+R, and search `rls nts`. Expect a starred result and full preview. Select Insert: the picker closes and the draft fills without sending. 4. With an existing draft, reopen the picker and insert a result. Expect text and mentions at the retained caret, preserving existing content. Arrow keys move selection, Tab changes scope, and Cmd/Ctrl+S toggles starring. 5. At a compact touch width or in Simulator Safari, choose **+ → Prompts…**. Expect the shared bottom drawer. Tap a row to preview it, use Back to return, then Insert to populate the draft and close. The app root retains neither `inert` nor `aria-hidden` in the Chromium check. > 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
Main's CI has been red since #4782 (e4fcbed). The SplitWorkspaceRoute static closure measures 1062.5 KiB against a 1062.4 KiB raw limit, about 100 bytes over. Brotli, boot, and split guards all pass.
#4782 adds about 12 KiB to the closure because
VoiceInputButtonstatically importsMicrophonePreferences. Its PR CI last ran on Oct 2, while the temporary 5% raise from #4906 was still in effect. #4907 then restored the lower limits on Oct 5, and the two merges collided.What changed
Temporarily raise both SplitWorkspaceRoute byte limits by 5%, using the same values as #4906: raw 1,087,864 → 1,142,257 bytes and Brotli 317,278 → 333,142 bytes. The reason is recorded in
bundle-budget.json. A follow-up will lazy-load the microphone preferences and ratchet the limits back down. Boot budgets and dependency/split guards are unchanged.How you verified
CI on 95750b8 measured 1062.5 KiB raw / 308.6 KiB Brotli for the closure. Both numbers are well under the new limits.
bundle-budget.jsonparses as JSON.🤖 Generated with Claude Code