Skip to content

Add a mention-aware thread title and the environment provider catalog for plugin lists - #4026

Merged
SawyerHood merged 2 commits into
thread-list/1d-row-hooksfrom
thread-list/1e-title-and-env-providers
Sep 22, 2026
Merged

SawyerHood merged 2 commits into
thread-list/1d-row-hooksfrom
thread-list/1e-title-and-env-providers

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

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 resolve environment.providerId against 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 through resolveThreadTitleDisplayText. The mapper cache now keys on the mention resources as well as the host names.
  • ThreadTitle component (apps/app/src/components/plugin/PluginThreadTitle.tsx) renders ThreadTitleMentions for a thread id.
  • useEnvironmentProviders() → { status, providers } narrowed to id, display name, description, icon, logo, plugin, and machine provider.
  • Harness fakes, guide, API index, and surfaces updated.

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

AGENT GENERATED

@SawyerHood
SawyerHood added this pull request to stack #4028 September 21, 2026 23:01
@SawyerHood
SawyerHood force-pushed the thread-list/1e-title-and-env-providers branch from 271fb88 to 69a2998 Compare September 21, 2026 23:37
@SawyerHood
SawyerHood force-pushed the thread-list/1e-title-and-env-providers branch from 69a2998 to ff4829c Compare September 21, 2026 23:57
SawyerHood and others added 2 commits September 21, 2026 17:07
… 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]>
@SawyerHood
SawyerHood force-pushed the thread-list/1e-title-and-env-providers branch from ff4829c to b4be34a Compare September 22, 2026 00:08
@SawyerHood
SawyerHood marked this pull request as ready for review September 22, 2026 00:15
@SawyerHood
SawyerHood merged commit cb830ac into main Sep 22, 2026
16 checks passed
@SawyerHood
SawyerHood deleted the thread-list/1e-title-and-env-providers branch September 22, 2026 00:18
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]>
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