Repository navigation
Add a mention-aware thread title and the environment provider catalog for plugin lists - #4026
Merged
SawyerHood merged 2 commits intoSep 22, 2026
Conversation
SawyerHood
force-pushed
the
thread-list/1e-title-and-env-providers
branch
from
September 21, 2026 23:37
271fb88 to
69a2998
Compare
SawyerHood
force-pushed
the
thread-list/1e-title-and-env-providers
branch
from
September 21, 2026 23:57
69a2998 to
ff4829c
Compare
… for plugin lists Thread titles carry @project:, @section:, and @thread: mentions that bb's row renders as chips. Give plugins the same renderer as ThreadTitle and the resolved plain text as displayTitle on the thread, and expose the environment provider catalog the thread's environment.providerId points into. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
SawyerHood
force-pushed
the
thread-list/1e-title-and-env-providers
branch
from
September 22, 2026 00:08
ff4829c to
b4be34a
Compare
SawyerHood
marked this pull request as ready for review
September 22, 2026 00:15
SawyerHood
added a commit
that referenced
this pull request
Sep 22, 2026
## Human comments ## What was wrong Plugin frontends run on the app origin and can already reach the public API with same-origin fetch (plugin-api-docs and inline-vis do), but there was no typed client. `@bb/sdk` is workspace-only and not shimmed, so a third party would hand-roll requests, and the guide steered authors toward a server-side RPC proxy for every write. The sidebar-as-plugin work needs section CRUD, thread moves, pins, and unarchive from the frontend. ## What changed - `useSdk(): PluginBrowserBbSdk` on `@get-bb/plugin-sdk/app`. The host binds its browser SDK instance per plugin in `apps/app/src/lib/plugin-bound-sdk.ts`, mirroring the backend `bb.sdk` narrowing: `spawn` and `fork` stamp `origin: "plugin"` and `originPluginId`, and the metadata calls default `pluginId`. One stable client per plugin, so it is safe in dependency lists. - `PluginBoundThreadsArea` and `PluginBrowserBbSdk` types, inlined into the bundled app declarations the same way the backend contract inlines `BbSdk`. No npm publish of `@bb/sdk` is needed. - The bundled-types guard that kept SDK areas out of the app entry is updated to assert the bound client instead; the app declarations still contain no `@bb/` imports. - Testing harness: `sdk` option with per-area partial fakes, `inspection.sdkCalls`, and a loud error for an unfaked method. - Guide (`frontend-hooks-and-ui.md`, registration example), API indexes, and surfaces updated. Prerequisite: #4026. ## How you verified Binding tests for attribution rules, explicit origins, metadata defaulting, passthrough, and identity caching. A harness test that serves a faked `threadSections.create`, records calls, and throws for `threads.pin`. `pnpm exec turbo run test build:types --filter=@get-bb/plugin-sdk`, app typecheck and hook suites, guide parity suite. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED --------- Co-authored-by: Claude Fable 5.1 <[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
Thread titles contain
@project:,@section:, and@thread:mentions that bb's row renders as chips and resolves to names for sorting and accessible labels. A plugin got the raw string. The DTO also told plugins to resolveenvironment.providerIdagainst the environment provider catalog but gave them no way to reach it.What changed
PluginSidebarThread.displayTitle: title, else fallback, else short id, with mentions resolved throughresolveThreadTitleDisplayText. The mapper cache now keys on the mention resources as well as the host names.ThreadTitlecomponent (apps/app/src/components/plugin/PluginThreadTitle.tsx) rendersThreadTitleMentionsfor a thread id.useEnvironmentProviders()→{ status, providers }narrowed to id, display name, description, icon, logo, plugin, and machine provider.Prerequisite: #4025.
How you verified
Mapper tests for the three display-title rules and a mention-bearing title; a component test that renders the chip and hides the raw mention; a hook test for the loading and ready shapes. Full typecheck and test filters as in the lower PRs.
🤖 Generated with Claude Code