Repository navigation
Conversation
Issue #3204 reports that `experimental_setThreadRowStatus.icon` "cannot draw a plugin's own declared icon". Probing it in a running app shows the surface already can: `Icon` checks the `app.experimental_icons.register()` registry before built-ins, so any name a plugin registers — flat or namespaced — paints that plugin's artwork on every host icon surface, thread row statuses included. What fails is only the manifest's `bb.branding.experimental_icons` vocabulary, which shares the `"<pluginId>/<name>"` spelling but is a separate server-resolved registry that just three declaration sites accept. The defect is documentation. Every icon field said "BB icon name" or "icon hint" and named no way to supply plugin-owned artwork, and the Plugin Guide said registered names render "with experimental_Icon" while the declared-icon entry enumerated three sites without saying what app surfaces take instead. Read together they imply the stock icon set is the only option, which is what the issue concluded. Restate the eleven icon fields across the app and backend contracts, give `ExperimentalIconRegistration` the canonical explanation of the registry's reach and its split from the manifest map, and cross-reference the two vocabularies in the quickstart and frontend-components references. No behavior changes. Covered by a ThreadRow test that renders a registered namespaced name as the plugin's artwork and an unregistered one as the Zap fallback; it fails when the row stops passing the status icon through. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The previous commit restated the same four-line explanation on every icon field, which is the shape that let the contract drift out of date in the first place: the next icon field added would have been described by whichever neighbour got copied. Name the concept instead. `BbIconName` is a module-local alias for `string`, so it documents without narrowing, and each field keeps only what is specific to its surface — that panel actions and plus-menu rows prefer the plugin's logo, that thread row statuses do not. Deliberately not exported: `app.ts` re-exports app-contract wholesale, so an exported alias would be a new public `@get-bb/plugin-sdk/app` member and would owe an `experimental_` prefix and an api_to_audit entry (AGENTS.md) for what is really a doc comment with a name. Unexported, it still rides into bundled-types/bb-plugin-sdk-app.d.ts with its JSDoc, which is where plugin authors read it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The quickstart listed a bridge row, a tool presentation and `bb.providers.register`, and the previous commit added "Those are the only sites that resolve a declared glyph" next to that list. The list was two short: `bb.experimental_environments.register` (concrete and composed) and `bb.experimental_machines.register` also take a namespaced glyph and enforce ownership, and their SDK declarations have always said so (environment-provider.ts, machine-provider.ts). All five funnel through `undeclaredIconProblem` in host-policy.ts, which is the single rule; say that rather than re-deriving a count that drifts. This list is the one the reporter of #3204 quoted to conclude thread row statuses were excluded from something. Leaving it incomplete while adding an "only" in front of it would have made it more authoritative and no more correct. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The doc comments on app-contract.ts and backend-contract.ts are published content: they ride into bundled-types/*.d.ts, which is what a plugin author reads. 0.4.99 has been published to npm since this branch started, and a published version is never republished, so without a bump these changes would never reach npm consumers. Both guards agree and both are now satisfied: check-plugin-sdk-version.mjs (surface file touched without touching plugin-sdk-version.ts) and check-npm-version-guard.mjs (packed content differs from the published version). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
ymichael
force-pushed
the
bb/3204-plugin-declared-icons-cannot-be-used-for-si-thr_j3bafmianm
branch
from
September 17, 2026 18:13
f9d8299 to
3a875ef
Compare
The two additions restated things the surrounding prose already establishes and spelled out surface lists twice. Same facts, ~30% fewer lines: the quickstart no longer re-enumerates the app surfaces it already points at frontend-components.md for, and frontend-components.md drops the parenthetical repetition of which surfaces are plugin-badged. Unchanged: that a registration beats a built-in, that the plugin-badged surfaces prefer the plugin's own branding icon while thread row statuses do not, that the manifest map is a separate vocabulary, and the corrected list of all five sites that resolve a declared glyph. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
These fields said they are drawn "when the plugin ships no logo" and that the surfaces "prefer the plugin's logo". PluginIcon never reads a logo. Its precedence is compactIconUrl, then branding.icon, then the contribution's hint, then Zap — and both of the first two come from the same manifest field, `bb.branding.icon` (a `./file.svg` becomes compactIconPath, a bare name stays a glyph). `logoUrl`/`logoDarkUrl` are in the store but PluginIcon ignores them; logos are for roomy Settings rows. The consequence a plugin author needs is sharper than "prefer" suggests: a manifest that declares `bb.branding.icon` — most of them — makes these `icon` fields dead, because the branding icon always wins. Only a plugin whose manifest carries a logo and no icon ever sees its own hint drawn here. Two of the five were pre-existing wording carried forward; the other three were mine, paraphrasing the inherited claim into something more confident than the original. Same error either way. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The quickstart already tells a manifest author that app icon fields take a BB icon name and that the two share a spelling but not a registry, and the BbIconName alias says it for anyone reading the types. Repeating it here told a reader who had already found `app.experimental_icons.register()` what the other thing is not. Leaves frontend-components.md with the one fact it owns: a registration is a BB icon name at every host icon field, and which surfaces override it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
bb had two icon vocabularies sharing one spelling. `"<pluginId>/<name>"` resolved at five server-side declaration sites but silently became `Zap` at every app surface, while `app.experimental_icons.register()` names resolved at app surfaces and nowhere else. Which registry a name landed in depended on which field it was written into, and nothing about the name said which. That is what #3204 hit, and documenting it only made the split easier to describe. Make it one vocabulary. `Icon` now resolves a registration, then a built-in, then a manifest-declared glyph, so a declared icon works everywhere a BB icon name is accepted — thread row statuses, sidebar footer items, composer `+` rows, message actions, nav panels, panel tabs and actions, mention rows — as well as in the declarations that already took one. Strictly additive: registrations still shadow built-ins, and both still shadow a declared icon, so every name that resolved before resolves to the same artwork. Only names that previously fell back to `Zap` change. The two sources keep distinct lifecycles rather than being merged into one store, because they genuinely differ: declared icons come from the server inventory and exist even when a plugin ships no frontend bundle or is stopped; registrations are React components tied to a bundle generation. `plugin-frontend.ts` pushes the declared map in the same pass that already populates plugin logos, which runs before any bundle loads, so a declared glyph never renders a frame of fallback first. The declaration sites keep their stricter ownership check: a glyph there must name the registering plugin and a declared icon, because those references persist in timeline rows and are revalidated at ingest. App surfaces resolve any declared glyph, matching the app icon registry, which has always been global across plugins. Verified in a running app with a probe plugin: a manifest-declared glyph that drew `Zap` on a sidebar thread row before now draws the plugin's own SVG, while flat and namespaced registrations are unchanged. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
frontend-components.md listed the seven surfaces that "everywhere one is accepted" already covers, and carried a sentence about `bb.branding.icon` precedence that belongs on the fields it governs, where it now lives. quickstart.md named `undeclaredIconProblem`, an internal helper no plugin author calls, and enumerated three register() entry points to correct a list that had named one. "A provider declaration" covers all three and cannot go stale the way an enumeration does — the same failure that put the wrong count there to begin with. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The same bullet already states it four sentences later, and states it better: it names the ingest case and the `server: "bb"` nuance that a tool row is checked against the plugin that registered the tool. Mine restated the weaker half above it. The quickstart edit is now the one thing that changed: a declared glyph resolves anywhere a BB icon name is accepted, not only in the declarations that enforce ownership. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
ymichael
deleted the
bb/3204-plugin-declared-icons-cannot-be-used-for-si-thr_j3bafmianm
branch
September 17, 2026 19:37
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
bb had two icon vocabularies that shared one spelling, so
"<pluginId>/<name>"meant different things in different fields and nothing about the name said which.bb.branding.experimental_icons, added 2026-08-23 in Provider plugins: one API for Codex, Claude Code, pi, and ACP agents #2325 for provider and tool rows) resolved at five server-side declaration sites and silently renderedZapeverywhere else.app.experimental_icons.register(), added 2026-09-11 in Unify plugin icon registration and provider artwork rendering #3513) resolved at app surfaces and nowhere else.#3204 was filed 2026-09-07, between those two, and was accurate when written: app icon fields really were limited to BB's built-in names, so a plugin could not paint its own artwork on a sidebar thread row. #3513 fixed that general problem four days later — in its own words, "Plugin app icons were effectively limited to BB's built-in names" — but never referenced #3204, and documented the new registry only as something
experimental_Iconrenders. So the issue stayed open, the docs still read as if the stock set were the only option, and the half of the complaint that was still true (declared icons don't work there) stayed true.What changed
Behavior.
Icon(packages/shared-ui/src/components/ui/icon.tsx) now resolves a registration, then a built-in, then a manifest-declared glyph. A declared icon works everywhere a BB icon name is accepted — thread row statuses, sidebar footer items, composer+rows, message actions, nav panels, panel tabs and actions, mention rows — as well as in the declarations that already took one. One vocabulary, one resolution order.Strictly additive: registrations still shadow built-ins and both still shadow a declared icon, so every name that resolved before resolves to the same artwork. Only names that previously fell back to
Zapchange.icon-registry.tsgains a declared-icon store beside the app-icon store. The two sources keep distinct lifecycles rather than being merged, because they genuinely differ: declared icons come from the server inventory and exist even when a plugin ships no frontend bundle or is stopped; registrations are React components tied to a bundle generation.plugin-frontend.tspushes the declared map in the same pass that already populates plugin logos. That pass runs before any bundle loads, so a declared glyph never renders a frame of fallback first.Docs, now describing one vocabulary rather than a split: a module-local
BbIconNamealias carries the resolution order once, replacing ten near-identical comments that each restated it (and were the reason the contract drifted). It is deliberately unexported —app.tsre-exports app-contract wholesale, so exporting it would make a doc comment a public SDK member owing anexperimental_prefix and anapi_to_audit.mdentry. The guide references say when to register versus declare, and the quickstart's site list is corrected from three to five.No wire change, so no
HOST_DAEMON_PROTOCOL_VERSIONbump. Plugin SDK bumped to 0.4.100, since JSDoc ships inbundled-types/*.d.ts.How you verified
A probe plugin in a running dev app declaring one manifest icon and registering two, driving three sidebar rows through
experimental_setThreadRowStatus:iconpassed"probe-flat"app.experimental_icons.register()"icon-probe/registered"app.experimental_icons.register()"icon-probe/declared"bb.branding.experimental_iconsZapTests: the declared-glyph tier resolves, a registration of the same name shadows it, removing the registration restores it, and an undeclared namespaced glyph still falls back. Plus a
ThreadRowtest that a registered namespaced name draws the plugin's artwork — mutation-checked by stubbing the status-icon pass-through, which fails it along with the four existing plugin-status tests.pnpm exec turbo run typecheck lint --filter='...[origin/main]'— 101 tasks, clean. The filter earned its keep: editingicon.tsxstaled the checked-in@bb/plugin-registrymirror, regenerated withbuild-registry.mjs.@bb/app4811 passed,@get-bb/plugin-sdk291 passed,@bb/server2913 passed with one unrelated failure (project-attachment-accounting, a timing bound) that passes in isolation.Fixes #3204
🤖 Generated with Claude Code