Repository navigation
Conversation
ymichael
force-pushed
the
bb/sent-editor-header-thread-actions-honour-plugin-thr_gzhwb84v53
branch
from
November 20, 2026 04:25
f4dfa10 to
c3f6a0a
Compare
The sent-message editor showed other plugins' + rows but resolved popups, send rows, effects and observers with a null scope and skipped composer commands, so Prompt Library's "Prompts…" row did nothing there. ComposerBox now resolves every contribution kind through one hook with one rule: what a user invokes on a composer (+ rows, the popups they open, composer commands) runs in every composer; what mounts by scope (actions, banners, send rows, rich-text effects, draft observers) mounts only where plugin customizations are allowed. Desktop header thread actions read only label, disabled and run, while the same actions folded into the compact menu showed icon, detail and the destructive variant. The header button and split-button rows now draw the icon, detail (tooltip on the button, second line in the menu) and variant as the menu rows do; bb's own Commit gains its GitBranch icon. Contract tests cover + rows opening popups, send rows, banners, actions and scopes on every composer surface, plugin commands in a suppressed composer, and header action presentation; each fails on main. Plugin SDK 0.6.167 documents both rules. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
force-pushed
the
bb/sent-editor-header-thread-actions-honour-plugin-thr_gzhwb84v53
branch
from
November 20, 2026 09:16
c3f6a0a to
fc14800
Compare
ymichael
deleted the
bb/sent-editor-header-thread-actions-honour-plugin-thr_gzhwb84v53
branch
November 20, 2026 19:01
ymichael
added a commit
that referenced
this pull request
Nov 20, 2026
#7873 left frontend-hooks-and-ui.md at 501 lines, failing the shipped skills quality test on main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
added a commit
that referenced
this pull request
Nov 20, 2026
#7871) ## Human comments ## What was wrong Three plugin slot props did not match their types and JSDoc. - `homepageSection` read `projectId` from route state. The New thread screen always lives at `/`, because `/projects/:id` redirects there, so plugins always got `null`. - `experimental_browserToolbarAction`'s `threadId` was documented as "Thread that owns the Browser tab". On the New thread screen it is `"root-compose"`, and on plugin pages it is a panel key such as `plugin-panel:automations:automations:pane-1`. It is really the desktop browser's owner key, which `sdk.experimental_desktopBrowsers` also takes under the name `threadId`. - `experimental_threadList`'s required `searchQuery` has always been `""` since the sidebar search field was removed. ## What changed - **homepageSection:** `RootComposeView` computes the composer's project once (`surfaceProjectId`, null for "No project"). It passes it through `RootComposeSecondaryContent` to `PluginHomepageSections`, which no longer reads route state. The New thread panel actions use the same value. - **browserToolbarAction:** the runtime value is unchanged and the docs now say what it is: - a thread id in a thread's panel, an opaque panel key elsewhere, to be passed with `tabId` to `sdk.experimental_desktopBrowsers` - updated in the JSDoc, the authoring reference and `docs/api_to_audit.md` - the audit entry records the owner-key rename and whether to add a nullable thread id Making it `string | null` would break 3 of the 10 community plugins that register the slot, because they pass it to `experimental_desktopBrowsers`: better-browser (cookie sync and handoff), rebryk annotate (notes on New thread) and doc-review (capture). - **threadList `searchQuery`:** marked `@internal`, like the existing retired members, so published declarations drop it. The host still passes `""` because 11 community lists read it at runtime, most of them as `searchQuery.trim()`. I removed the open audit item and added it to Scheduled removals. The bundled thread-list tests no longer pass it. - Plugin SDK bumped to 0.6.170. - `frontend-hooks-and-ui.md` trimmed back to the 500-line reference limit; #7873 left it at 501, failing `shipped-skills-quality.test.ts` on main. No server or daemon wire changes, and no CLI changes. ## How you verified - **Live, `pnpm desktop:worktree`, with a probe plugin that prints its props:** | Prop | Before (main) | After | | --- | --- | --- | | homepageSection `projectId`, project "QA Alpha" | `null` | `"proj_…"` | | homepageSection, picker set to "Don't work in a project" | – | `null` | | homepageSection, picker set back to QA Alpha | – | `"proj_…"` | | toolbar `threadId` | `"root-compose"`, plugin-page key, real thread id | unchanged | | threadList `searchQuery` | `""` | `""` | - **Tests that fail before and pass after:** - `RootComposeView.contract.test.tsx` checks that homepage sections receive the composer's project for a known, an unset and a deleted project. Against main's source the known-project case fails: expected `proj_alpha`, got "no project". - `bundled-types.test.ts` checks that the published `PluginThreadListProps` declares no `searchQuery`. - The existing `PluginThreadList.test.tsx` still covers the runtime `""`. - **Commands:** - `pnpm exec turbo run typecheck --filter='./plugins/*' --filter=@bb/app --filter=@get-bb/plugin-sdk` - `turbo run test` for `@get-bb/plugin-sdk`, `bb-plugin-thread-list`, `bb-plugin-bb-guide` and `bb-plugin-plugin-api-docs` - vitest for the affected `@bb/app` files - `turbo run lint` and `oxfmt` 🤖 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
Two plugin surfaces rendered contributions that then didn't behave as the types and docs say.
ComposerBoxresolved plugin+rows with the composer's scope. It resolved popups, send rows, rich-text effects and draft observers with a null scope when customizations were suppressed, and it turned composer commands off. So the sent-message editor showed Prompt Library's "Prompts…" row, and clicking it did nothing: the editor had no popups, soopenPopupForPluginreturned false. Ctrl+R did nothing there either.placement: "header"thread actions read onlylabel,disabledandrun. It droppedicon,detailandvariant. The same actions showed all three once they folded into the compact thread menu.What changed
One rule for composer contributions.
ComposerBoxnow resolves every contribution kind through one hook,useResolvedComposerContributions(scopeKind, mountsScopedContributions), which replaces four separate hooks. The rule:+rows, the popups they open, and composer commands.+rows were already exempt on purpose (#4502), so bb's own Automation and Plugin rows keep working in the sent editor. Send rows stay out because "Send later" would schedule a new message instead of saving the edit.Header actions match the menu. The desktop header now draws what the compact menu draws:
detailis its tooltip, and destructive actions get red text.SplitButtongained an optionalvariant.I didn't narrow the type instead, because all 21 community header-action plugins return an
icon.experimental_bulkItemwas never used for header actions, which selection menus leave out; that is now documented.Docs.
PluginThreadActionPlacement,experimental_bulkItemandComposerCustomization.scopes.docs/api_to_audit.md.Known limitation, not changed here. Composer popups and the
@mention menu open above an inline editor. When the message being edited is near the top of the timeline, as the first message of a short thread is, they render off-screen. The same happens on main.How you verified
Each new test fails on main and passes with this change:
composer-contract.test.tsx: new rows on all six composer surfaces, using bb's composer:+rows each open their popup in that composer.scopesfilters every kind.On main, only the sent-message editor row fails: the popup never opens.
composer-commands.test.tsx: a plugin composer command runs in a composer with customizations suppressed.ThreadDetailHeader.test.tsx: three cases (a single button, a split button, a destructive main action) check the icon, the detail tooltip, destructive styling, and the menu rows' text, icon and variant.Commands run:
pnpm exec turbo run typecheck lint --filter=@bb/app --filter=@get-bb/plugin-sdk --filter=bb-plugin-plugin-api-docs: passed.pnpm exec turbo run test --filter=@bb/app --filter=bb-plugin-plugin-api-docs --filter=bb-plugin-bb--composer --filter=bb-plugin-bb-guide: passed (@bb/app: 7259 passed).Live check with
pnpm start:worktreein headless Chrome:+→ "Prompts…" in the sent-message editor opened nothing. With this change, the Prompt Library popup opens.🤖 Generated with Claude Code