Repository navigation
Publish the shared-ui components built-in plugins use as registry items - #4179
Merged
SawyerHood merged 1 commit intoSep 23, 2026
Merged
Conversation
SawyerHood
force-pushed
the
bb/forkable-02-registry-items
branch
from
September 23, 2026 16:36
84b94c2 to
c2d91cd
Compare
SawyerHood
force-pushed
the
bb/forkable-02-registry-items
branch
from
September 23, 2026 16:47
c2d91cd to
859b6de
Compare
SawyerHood
force-pushed
the
bb/forkable-02-registry-items
branch
2 times, most recently
from
September 23, 2026 20:40
f11056c to
e646268
Compare
SawyerHood
marked this pull request as ready for review
September 23, 2026 21:07
Built-in plugins import nine shared-ui components that the component registry does not provide, so a copy of any of them cannot write the component into itself: activity-row-styles, branch-picker-primitives, coarse-pointer-visibility, delayed-loading, option-display, plugin-icon, resource-list, resource-pagination, and workflow-progress. The app uses each of them too, so they become registry items rather than plugin copies. resource-list re-exports seven files under components/ui/resource/. The registry generator flattened every components/ui file into components/ui/<basename>, which broke their relative imports, and named the items after the bare basename (`row`, `toolbar`). Files in a subdirectory now keep their path, and their item names carry the directory: resource-row, resource-toolbar, and so on. No existing item changes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
SawyerHood
force-pushed
the
bb/forkable-02-registry-items
branch
from
September 23, 2026 22:10
e646268 to
d10a8ec
Compare
SawyerHood
added a commit
that referenced
this pull request
Sep 23, 2026
## Human comments ## What was wrong Third PR in the forkable built-ins stack; it builds on #4179. Seven built-ins import no workspace package, but a copy of each still failed `pnpm check:plugin-forks`: - custom-instructions - drafts - environment-personal-workspace - pdf-preview - plugin-api-tester - provider-retry - push-notifications The failures: - **Shared vitest config.** Their `vitest.config.ts` imported the repository's `vitest.shared.ts`. - **Missing test peers.** The fork installs with `--legacy-peer-deps`, so the SDK test harness's optional peers never arrive: - `createFakePluginHost` loads `better-sqlite3`, `cron-parser`, and `hono`. - `renderSlot` needs `@testing-library/dom`. Without it, `@testing-library/react`'s types lose `waitFor`, `fireEvent`, and every query on `RenderedSlot`. ## What changed - **Test config:** each plugin's vitest config uses `defineConfig`, and each declares the dev dependencies its tests load. - **Lint scripts:** each plugin gets a `lint` script, so the forkable import rule runs on it. That surfaced two things: - code comments in provider-retry, now removed; - a deliberate field-level dependency list in pdf-preview's `useMemo`, now marked for the linter instead of changed. - **Removed test:** push-notifications' `public-sdk-only.test.ts` is gone. The lint rule and the fork check enforce the same boundary, and its assertion that `@bb/plugin-build` is a dev dependency fails in a copy, which drops it. - **SDK types:** push-notifications' tsconfig no longer maps `@get-bb/plugin-sdk` onto the repository's bundled declarations, a path a copy doesn't have. The package's `types` condition already names them. - **Cleanup:** drafts drops an unused `@bb/shared-ui` dependency. - **Turbo:** each plugin's `test` task depends on `@get-bb/plugin-sdk#build`, because vitest now resolves the SDK's built entries. - **List:** all seven go into `scripts/forkable-plugins.json`. Behavior for users is unchanged; the built-ins' names are unchanged. ## How you verified - `pnpm exec turbo run typecheck test lint` for the seven plugins, including push-notifications' typecheck without the path mapping. - `pnpm check:plugin-forks`: all eight listed plugins install, typecheck, test, and `bb plugin build` in a copy, including environment-personal-workspace's host tests, which fail before #4178. 🤖 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
Second PR in the forkable built-ins stack; it builds on #4178. Built-in plugins import nine shared-ui components that the component registry doesn't provide, so a fork can't write them into its copy:
The app uses each of them too, so they belong in the registry rather than in plugin copies.
The generator had a second problem: it flattened every
components/uifile tocomponents/ui/<basename>and named the item after the bare basename. resource-list re-exports seven files undercomponents/ui/resource/. Flattened, their relative imports broke, and they would have been published as items namedrow,toolbar, andatoms.What changed
registry.jsonlists the nine components. Their import closures addresource-route-labeland the sevenresource-*files.build-registry.mjskeeps a component's subdirectory in its target, socomponents/ui/resource/row.tsxstays at that path. The item name carries the directory:resource-row,resource-toolbar, and so on. No existing item changes.How you verified
vendor-all-items.test.tsvendors every item into one plugin and runsbb plugin build. With the old flattened targets it fails (Could not resolve "./resource/atoms"); with this change it passes.pnpm exec turbo run typecheck test --filter=@bb/plugin-registry, which includesbuild-registry.mjs --check.plugin-forks.test.mjssuite passes against the new items.🤖 Generated with Claude Code