Skip to content

Make homepageSection, browserToolbarAction and threadList props honest - #7871

Merged
ymichael merged 4 commits into
mainfrom
bb/honest-homepagesection-browsertoolbaraction-thre-thr_wzimcbuwmm
Nov 20, 2026
Merged

ymichael merged 4 commits into
mainfrom
bb/honest-homepagesection-browsertoolbaraction-thre-thr_wzimcbuwmm

Conversation

@ymichael

@ymichael ymichael commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

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; Honour plugin composer and header contributions where they render #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

AGENT GENERATED

@ymichael
ymichael force-pushed the bb/honest-homepagesection-browsertoolbaraction-thre-thr_wzimcbuwmm branch 3 times, most recently from 1aac42c to 7b7b491 Compare November 20, 2026 19:05
ymichael and others added 4 commits November 20, 2026 11:10
homepageSection now receives the project selected in the New thread
composer instead of route state, which is always empty on "/" because
/projects/:id redirects there. It shares one value with the New thread
panel actions.

browserToolbarAction's threadId is documented as what it is: the
desktop-browser owner key (a thread id on threads, a panel key on the
New thread screen and plugin pages). Three community plugins pass it to
sdk.experimental_desktopBrowsers, so its value is unchanged.

experimental_threadList's searchQuery is retired from the published
types via @internal; the host keeps passing "" because community lists
call searchQuery.trim() on it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ymichael
ymichael force-pushed the bb/honest-homepagesection-browsertoolbaraction-thre-thr_wzimcbuwmm branch from 7b7b491 to f77e885 Compare November 20, 2026 19:11
@ymichael
ymichael merged commit da248ce into main Nov 20, 2026
53 checks passed
@ymichael
ymichael deleted the bb/honest-homepagesection-browsertoolbaraction-thre-thr_wzimcbuwmm branch November 20, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant