Repository navigation
Make the Monaco file editor plugin forkable - #4184
Merged
SawyerHood merged 1 commit intoSep 23, 2026
Merged
Conversation
SawyerHood
force-pushed
the
bb/forkable-06-monaco-editor
branch
from
September 23, 2026 16:47
a41620b to
9128393
Compare
SawyerHood
force-pushed
the
bb/forkable-06-monaco-editor
branch
2 times, most recently
from
September 23, 2026 20:40
c04b540 to
529782e
Compare
SawyerHood
marked this pull request as ready for review
September 23, 2026 21:07
monaco-editor imported cn from @bb/shared-ui/lib/utils, a workspace package a copy cannot install. It now imports @/lib/utils, the registry's utils item, through the same tsconfig paths as thread-list, and its vitest config uses defineConfig with tsconfigPaths instead of the repository's vitest.shared.ts. app.test.tsx and server.test.ts join the tsconfig include so tsc checks them. The fork installs without npm's peer resolution, so the plugin declares the SDK test harness's peers its tests load: better-sqlite3, cron-parser, and hono for createFakePluginHost, and @testing-library/dom for renderSlot. The 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 did not 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. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
SawyerHood
force-pushed
the
bb/forkable-06-monaco-editor
branch
from
September 23, 2026 22:10
529782e to
118b46d
Compare
SawyerHood
added a commit
that referenced
this pull request
Sep 23, 2026
## Human comments ## What was wrong Seventh PR in the forkable built-ins stack; it builds on #4184. Five chat-surface built-ins couldn't be copied out of the repository: - side-chat - inline-vis - agent-annotations - scheduled-send - browser-automation They imported `@bb/shared-ui` by package name and used `vitest.shared.ts`. Their tests loaded SDK harness peers they didn't declare. ## What changed - **Imports and config:** UI through the registry alias, with thread-list's tsconfig paths. Test configs use `defineConfig` with tsconfig paths. Each plugin declares its test peers, and gets a lint script and turbo entries that depend on the SDK build. - **browser-automation:** - Its tsconfig no longer maps the SDK onto its bundled `.d.ts` files, which vitest would load as the SDK at runtime. The package's `types` condition already points tsc there. - Its process test and smoke scripts no longer pass `--conditions=source`, which pointed at SDK source the published package doesn't ship. - **Lint:** - scheduled-send's code comments are removed. - In agent-annotations, a test component that called a hook anonymously now has a name. - agent-annotations' submit subscription deliberately depends on `composer.experimental_onSubmitted` rather than on `composer`, which changes on every keystroke. The linter directive marks that. ## How you verified - `pnpm exec turbo run typecheck test lint` for the five plugins. - `pnpm check:plugin-forks`: all five pass in a copy. - `@bb/app` typecheck, and `@bb/plugin-api-map` and `@bb/scripts` tests. - **Bundle identity:** `app.js` differs from the base only in module order, names, and the plugin's own icon. The icon now comes from the registry flavor (`experimental_Icon`), which the host binds to the same shared-ui `Icon`. scheduled-send's `app.js` is byte-identical. browser-automation's host bundle now includes the SDK's `experimental_defineHostEntry` instead of plugin-build's fallback stub; both are the same code. 🤖 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
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:cnfrom@bb/shared-ui/lib/utils.vitest.shared.ts.pdf-preview, the other file opener, went in #4180.
What changed
@/lib/utils, the registry's utils item. thread-list's tsconfig paths, anddefineConfigwith tsconfig paths in vitest.app.test.tsxandserver.test.tsjoin the tsconfiginclude, so tsc checks them.better-sqlite3,cron-parser, andhonoforcreateFakePluginHost;@testing-library/domforrenderSlot.bb plugin buildstill leaves Monaco out ofapp.js; a copy installed from a path buildsdist/monacoon 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-mapand@bb/scriptstests.pnpm check:plugin-forks plugins/monaco-editorpasses in a copy. In the kept copy, theassetsRPC built all three Monaco files byte-identical to the built-in's.server.jsandapp.cssare byte-identical.prepare:bundledstages Monaco assets (editor.js,editor.css,editor.worker.js) with the same sha256 as before.🤖 Generated with Claude Code