Repository navigation
Make the sidebar navigation plugin forkable - #4183
Merged
SawyerHood merged 1 commit intoSep 23, 2026
Merged
Conversation
SawyerHood
force-pushed
the
bb/forkable-05-navigation
branch
from
September 23, 2026 16:47
5a4f3aa to
0ce5069
Compare
SawyerHood
force-pushed
the
bb/forkable-05-navigation
branch
from
September 23, 2026 17:50
0ce5069 to
be459c3
Compare
SawyerHood
force-pushed
the
bb/forkable-05-navigation
branch
from
September 23, 2026 20:40
be459c3 to
388bb8d
Compare
SawyerHood
marked this pull request as ready for review
September 23, 2026 21:07
plugins/navigation replaces bb's whole sidebar navigation region, but a copy of its directory could not build on its own. It imported ten @bb/shared-ui components and helpers, its vitest config imported the repository's vitest.shared.ts, and a copy installed without npm's peer resolution was missing @testing-library/dom and @types/react-dom, which renderSlot and the test's typecheck load. The plugin now follows thread-list's conventions. It imports every component through the registry alias (@/components/ui/button, @/lib/utils, and so on; all ten are registry items), and its tsconfig maps @/* onto packages/shared-ui/src and @/components/ui/icon onto the registry's host-backed icon. The tsconfig now covers app.test.tsx. The vitest config uses defineConfig with tsconfig paths, the package gets a lint script, and turbo gives its typecheck and test tasks the registry flavors as inputs and the SDK build as a test dependency. The app's navigation test fixture imported the plugin's app.tsx by a literal path, which pulled the plugin's files into @bb/app's typecheck, where @/ means the app's own source. It now loads the module by a resolved path and checks the export, as the sidebar bench does for thread-list. The built bundle is unchanged apart from module order and names: app.css and server.js are byte-identical, and in app.js the plugin's own icons render through the SDK's experimental_Icon, which the host binds to the same Icon component the @bb/shared-ui/icon shim provides. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
SawyerHood
force-pushed
the
bb/forkable-05-navigation
branch
from
September 23, 2026 22:10
388bb8d to
4b867be
Compare
SawyerHood
added a commit
that referenced
this pull request
Sep 23, 2026
## Human comments ## What was wrong Sixth PR in the forkable built-ins stack; it builds on #4183. `plugins/monaco-editor`, the file opener that edits files in Monaco, couldn't be copied out of the repository: - It imported `cn` from `@bb/shared-ui/lib/utils`. - Its vitest config used `vitest.shared.ts`. - Its tests loaded SDK test-harness peers it didn't declare. pdf-preview, the other file opener, went in #4180. ## What changed - **Registry import:** `@/lib/utils`, the registry's utils item. thread-list's tsconfig paths, and `defineConfig` with tsconfig paths in vitest. `app.test.tsx` and `server.test.ts` join the tsconfig `include`, so tsc checks them. - **Declared peers:** `better-sqlite3`, `cron-parser`, and `hono` for `createFakePluginHost`; `@testing-library/dom` for `renderSlot`. - **Lint:** the new lint script surfaced code comments in the Monaco build script and bundle entries, now removed. The README keeps the one reason they gave that it didn't already cover: the icon webfont is inlined so the bundle stays three files. `bb plugin build` still leaves Monaco out of `app.js`; a copy installed from a path builds `dist/monaco` on first open with its own esbuild, the same way a source checkout does. ## How you verified - `pnpm exec turbo run typecheck test lint --filter=bb-plugin-monaco-editor`, plus `@bb/plugin-api-map` and `@bb/scripts` tests. - **Fork check:** `pnpm check:plugin-forks plugins/monaco-editor` passes in a copy. In the kept copy, the `assets` RPC built all three Monaco files byte-identical to the built-in's. - **Bundle identity:** - `server.js` and `app.css` are byte-identical. - `prepare:bundled` stages Monaco assets (`editor.js`, `editor.css`, `editor.worker.js`) with the same sha256 as before. 🤖 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
Fifth PR in the forkable built-ins stack; it builds on #4181.
plugins/navigationreplaces bb's whole sidebar navigation region, which makes it the cleanest fork after the sidebar thread list (#4140). A copy of its directory still couldn't build on its own:@bb/shared-uicomponents and helpers. All ten have registry items.vitest.shared.ts.@testing-library/domand@types/react-dom.What changed
@/components/ui/button,@/lib/utils, …).@/*ontopackages/shared-ui/srcand@/components/ui/icononto the registry's host-backed icon.customConditions: ["source"]is gone.app.test.tsxis now typechecked.defineConfigwith tsconfig paths.apps/app/src/test/fixtures/navigation-plugin.tsimported the plugin'sapp.tsxby a literal path. That pulled the plugin into@bb/app's typecheck, where@/means the app's own source. The fixture now loads the module by a resolved path and checks the export, as the sidebar bench already does for thread-list.How you verified
pnpm exec turbo run typecheck test lint --filter=bb-plugin-navigation,@bb/apptypecheck, and the three app test files that load the plugin:NavigationPlugin,SidebarNavigationRegion,plugin-slot-mounts.@bb/plugin-api-maptests pass; it anchorsNavigation.tsx.pnpm check:plugin-forks plugins/navigation: install, typecheck, test, andbb plugin buildpass in a copy.app.cssandserver.jsare byte-identical before and after. An unminifiedapp.jsdiffers only in module order and names. The plugin's own icons now render through the SDK'sexperimental_Icon, which the host binds to the sameIconcomponent that the old@bb/shared-ui/iconshim provided.🤖 Generated with Claude Code