Repository navigation
Prepare core for moving the composer into a plugin - #6121
Merged
Merged
Conversation
NewThreadComposer, NewThreadPromptBox and PromptBoxInternal passed a header slot that no caller sets. Also formats four files main had left unformatted. No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
useCommandSuggestions always returned hasMore false, isLoadingMore false and a no-op loadMore, so the composer's prefetch effect, the ArrowDown hold at the last command, and the mention menu's scroll-to-load handler could never run. Drops the fields from the hook and the typeahead config along with mention-menu-scroll and its test. No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
parseThreadLink moves out of the paste candidate finder into lib/thread-links, next to the batched resolver, and names the personal project for a link without one instead of null. The finder and the paste extension take a parseLink function instead of an origin, and the rejection cases move to a thread-links test. No behaviour change: a projectless link still only converts for a personal-project thread. Co-Authored-By: Claude Opus 5.5 <[email protected]>
PromptBoxHandle's four voice methods become one voice object: textBeforeCursor, deliverTranscript(text, delivery) and playCompletionTransition. Voice delivery passes its insert-or-send choice through instead of picking a method. No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
SplitThreadArea no longer queries [data-promptbox] for a contenteditable and RootComposeCompactHome no longer measures [data-promptbox-editor-scroll] and writes the editor's CSS height variable. The composer registers its root element for pane focus, focusPaneComposer finds the registered roots inside a pane and reports whether one took focus, and the compact home passes the composer's available height through ComposerMaxHeightContext for the composer to cap its own editor. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
force-pushed
the
bb/composer-prep-thr_ceyxptezcc
branch
from
October 22, 2026 18:20
8876894 to
af18409
Compare
ymichael
added a commit
that referenced
this pull request
Oct 22, 2026
## Human comments ## What was wrong bb's composer was core code, so the only way to change how the prompt box looks or edits was to change bb itself. The thread list is already a bundled plugin that a fork can replace. The composer had no such slot: plugins could add actions, popups and decorations to it, but couldn't draw it. ## What changed Builds on #6121. - **The composer is now the bundled Composer plugin** (`plugins/composer`, `bb--composer`). It registers through a new `app.slots.experimental_composer` slot. - Core renders every composer surface through `ComposerBox`: follow-up, new thread, queued and sent message editors, side chat, embedded chat. - `ComposerBox` resolves the slot and hands the plugin its input, view and host services. - With no composer plugin enabled, no composer is shown, the same rule as the thread list. - Appearance gets a Composer picker; the preference is `composer.provider`. - **How the plugin talks to bb:** - it reads and writes the draft through `useComposer()`; - it connects through `experimental_ComposerRoot` and `experimental_useComposerContributions()`; - it searches mentions and commands through `experimental_useComposerMentionSearch` / `CommandSearch`, which take the query from the composer. - **The renderer contract is shaped for any composer, not bb's own box:** - `submission.enter` / `.modifier` are actions the host works out from the surface and the "Enter steers" setting (kind send/queue/steer, `requiresInput`, shortcut, `run()`). Programmatic `submit()` uses the same choice, only where Enter sends. - `compact` is `{ when: "always" | "narrow", placeholder }`. - The host calls `editor.focusEnd()` itself and measures the menu the composer hands to `ComposerRoot`. - Services are grouped: `threadLinks.{parse, cached, resolve}`, `clipboard.{readMessage, readMessageImage}`, `attachmentSrc`. bb releases local previews when attachments leave the draft. - The composer is a remembered page-drawing surface, so it loads with the first plugins. Composer CSS moves from `app.css` into `plugins/composer/src/composer.css`. - Plugin Guide card, `docs/api_to_audit.md` entries and bb-guide references are added. `@bb/app` lists the composer plugin as a workspace dependency, as it does thread-list, so CI's filtered install includes it. Plugin SDK 0.6.71. - While the composer plugin loads, the page skeleton and `ComposerBox` draw the same loading block at the composer's real size, so it doesn't jump between two skeletons. On a phone thread the page skeleton now draws the one-line composer, fixing a jump main also has. - `dropdown-menu`'s compact-sheet context and `menu-item-hover`'s last-hovered context are shared across bundled copies (`Symbol.for` on `globalThis`, like the persistent drawer stack). bb's send and `+` menu items for other plugins now render inside the composer plugin's phone sheet instead of crashing, and hovering between the plugin's items and bb's leaves one row highlighted. Known deviation: a plugin's `submit()` on a sent-message editor rejects, matching #6104. ## How you verified - `pnpm exec turbo run typecheck lint --filter='...[origin/main]'` (160/160). - Tests pass for `@bb/app`, `@bb/server`, the composer plugin, `@get-bb/plugin-sdk`, plugin-api-docs, bb-guide, `@bb/web`, `@bb/client-core` and `@bb/scripts`. - `composer-contract.test.tsx` runs bb's composer and a minimal textarea composer against every surface. - Live on a `start:worktree` server: - the composer renders from the plugin, and @mention, pasted-thread-link pills, the slash menu and attachments work; - Enter sends while idle; while a turn runs, Enter steers and Cmd+Enter queues; - the send menu shows Queue / Save draft / Send later; - at phone width a blurred editor collapses to the one-line form, and a short desktop pane uses the narrow CSS form. > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- 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
Moving bb's composer into a bundled plugin (the stacked PR) needs a few core changes that have nothing to do with plugins. The thread-link parser was buried in the paste code. The composer handle carried four loose voice methods. Split panes and the phone home screen reached into the composer's DOM to focus it and size it. And the command menu still had "load more" code that could never run, because
useCommandSuggestionsalways returnedhasMore: false. Landing these first keeps the composer PR down to the plugin move.What changed
Five commits, no intended behaviour change:
hasMore/isLoadingMore/loadMorefrom the hook and the typeahead config, along with the prefetch effect, the ArrowDown hold at the last command, the menu's scroll handler andmention-menu-scroll.lib/thread-links.parseThreadLinksits next to the batched resolver, and the paste code takes a parser function instead of an origin. A link without a project names the personal project instead ofnull, which matches the same threads as before.voice.{textBeforeCursor, deliverTranscript, playCompletionTransition}.focusPaneComposerreports whether a pane's composer took focus, and the compact home passes the available height throughComposerMaxHeightContextfor the composer to cap its own editor. The formula is the same as before.How you verified
pnpm exec turbo run typecheck lint --filter='...[origin/main]'and the affected@bb/apptests at each commit;@bb/appand@bb/client-coresuites on the head.start:worktreeserver running the stack:🤖 Generated with Claude Code