Repository navigation
Make the Plugin Guide plugin forkable - #4194
Merged
Merged
Conversation
SawyerHood
force-pushed
the
bb/forkable-13-plugin-guide
branch
2 times, most recently
from
September 23, 2026 17:53
07ba57c to
de2af7c
Compare
SawyerHood
force-pushed
the
bb/forkable-13-plugin-guide
branch
from
September 23, 2026 20:40
de2af7c to
c745b89
Compare
SawyerHood
marked this pull request as ready for review
September 23, 2026 21:07
plugins/plugin-api-docs was a small shell around @bb/plugin-api-map, a workspace package whose only consumer was this plugin. A copy of the plugin could not install it. Through the map, the plugin also depended on @bb/shared-ui/icon, @bb/shared-ui/switch, and @bb/text-utils, and the map imported 31 other plugins' package.json files by relative path. Its vitest config imported the repository's vitest.shared.ts. The map's source, tests, and surface-entry scaffold now live in the plugin under src/, test/, and scripts/, and the package is gone. Icons, the switch, and cn come through the registry aliases, as they do in thread-list. escapeHtmlText is copied into the plugin. The first-party plugin manifests become src/first-party-plugins.json, a 31-row table of id, display name, and built-in icon. The Guide still uses that table for Used by links and for fallback icons of plugins that are neither installed nor in the catalog. The app bundle no longer inlines every first-party package.json, so it shrinks by 33 KB. test/setup.ts installs the SDK test runtime, which @/components/ui/icon renders through. The plugin now has a lint script, its tsconfig covers the tests, and turbo gives its test task the SDK build and the registry flavors. Checks that read files outside the plugin stay in the repository: - The source anchors in the anatomy manifest were already checked for every fixture by apps/app's docs-anatomy-manifest test. That test now reads the manifest from the plugin, and the plugin keeps only the fixture-label half of its duplicate. - The check that ThreadDetailView creates the Info tab before the Diff tab moves into the same app test. The plugin keeps the check that its wireframe draws them in that order. - A new @bb/scripts test checks each first-party table row against the plugin's manifest, so a renamed plugin still fails a test. AGENTS.md, the plugin-guide-maintenance skill, and the verify-bb recipes point at the new paths. The scaffold command runs with --filter=bb-plugin-plugin-api-docs. A render comparison against the base found no change. It covered every slide and card, on desktop and mobile in jsdom, the nav panel, the copied clipboard payload, and every server mention resolution. app.css gains 8 unused scoped rules from class names that appear only in test assertions. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
SawyerHood
force-pushed
the
bb/forkable-13-plugin-guide
branch
from
September 23, 2026 22:10
c745b89 to
8025f78
Compare
SawyerHood
added a commit
that referenced
this pull request
Sep 23, 2026
## Human comments ## What was wrong Thirteenth PR in the forkable built-ins stack; it builds on #4194. `plugins/environment-modal-sandbox` couldn't be copied out of the repository: - **Shared UI:** its app imported seven `@bb/shared-ui` modules. - **Test config:** its vitest config used `vitest.shared.ts`. - **SDK paths:** its tsconfig mapped `@get-bb/plugin-sdk` and its testing entry onto the bundled `.d.ts` files. Once vitest follows tsconfig paths, that loads the declaration files as the SDK at runtime. - **Test peers:** the SDK test harness's `cron-parser`, `hono`, and `better-sqlite3` types, and the react-dom types the registry's responsive overlay needs, were undeclared. The Worktree and Project checkout plugins stay as they are: they share host helpers with the daemon through `bb-environment-provider-host`, and isolating them would mean copying those helpers into each plugin. ## What changed - **Imports:** button, coarse-pointer-sizing, dropdown-menu, icon, input, option-display, and `lib/utils` come from the registry through `@/`, with thread-list's tsconfig paths. - **Config:** the two SDK path entries are gone; the package's `types` condition already points tsc at the same files. The vitest config uses `defineConfig`, and the plugin declares its test peers. - **Lint and turbo:** the lint script ignores `node_modules` and `dist` like the other listed plugins, and the turbo tasks take the registry flavors as inputs and build the SDK before tests. - **List:** the plugin joins `scripts/forkable-plugins.json`. ## How you verified - `pnpm exec turbo run typecheck test lint --filter=bb-plugin-environment-modal-sandbox`. - `pnpm check:plugin-forks plugins/environment-modal-sandbox` passes in a copy. - Whole-repo `turbo run typecheck lint` at the top of the stack. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED
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
Twelfth PR in the forkable built-ins stack; it builds on #4193.
plugins/plugin-api-docs, the Plugin Guide, was a small shell around@bb/plugin-api-map, a workspace package whose only consumer was this plugin.Through the map, the plugin also depended on
@bb/shared-ui/icon,@bb/shared-ui/switch, and@bb/text-utils. The map imported 31 other plugins'package.jsonfiles by relative path, and some of its tests read app source.What changed
src/,test/, andscripts/, and@bb/plugin-api-mapis gone.cncome through the registry aliases.escapeHtmlTextis copied in.src/first-party-plugins.json, a table of id, name, and icon. The Guide still uses it for "Used by" links and fallback icons.app.jsshrinks by 33 KB because it no longer inlines every first-partypackage.json.apps/app'sdocs-anatomy-manifesttest, which now reads the manifest from the plugin.@bb/scriptstest checks each first-party table row against the plugin's manifest.AGENTS.md, theplugin-guide-maintenanceskill, the verify-bb recipes, andturbo.jsonpoint at the new paths.How you verified
pnpm exec turbo run typecheck test lint --filter=bb-plugin-plugin-api-docs, with every moved file's test count unchanged;@bb/scripts(a mutated table row fails the new test);@bb/apptypecheck and tests.pnpm check:plugin-forks plugins/plugin-api-docspasses in a copy.app.cssgains 8 unused scoped rules from class names that appear only in test assertions.🤖 Generated with Claude Code