Repository navigation
Publish the Plugin Guide on getbb.app with a blog embed - #4611
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3f7678ee3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const TWEET_RE = | ||
| /^tweet:(https:\/\/(?:www\.)?(?:x\.com|twitter\.com)\/[A-Za-z0-9_]+\/status\/(\d+)(?:\?.*)?)$/; | ||
| const VIDEO_RE = /^video:([^|]+)\|([^|]+)\|(.+)$/; | ||
| const PLUGIN_GUIDE_RE = /^component:plugin-guide(?::([a-z0-9-]+))?$/; |
There was a problem hiding this comment.
Validate plugin-guide slide IDs before accepting directives
When a post contains a lowercase typo or obsolete ID such as component:plugin-guide:composre, this regex accepts it as a component block. ProductMap cannot find that ID and silently selects index 0, so the published embed and its “Open the full Guide” link show the wrong slide instead of exposing the authoring error. Validate the captured value against the supported desktop/mobile slide IDs while parsing so invalid directives fail or remain text.
AGENTS.md reference: AGENTS.md:L13-L13
Useful? React with 👍 / 👎.
42d8eaa to
267b1f2
Compare
Add /plugin-guide to the web app, rendering the Guide straight from plugins/plugin-api-docs/src so the plugin stays forkable. The web supplies the registry modules the Guide imports through @/ (icon and switch re-export @bb/shared-ui; @/lib/utils already matches). Add the theme tokens the Guide uses, a component:plugin-guide[:slide] blog directive, a sitemap entry, turbo inputs, and deploy-web triggers for the Guide source. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e web Rewrite every card to one value-led lead (Add, Replace, Run, Provide, or Use) plus two to four short bullets, moving SDK detail out of the visible copy; the copied agent reference already carries the symbols. Rebuild each Used by row from built-in plugin source and add the six missing first-party rows. On getbb.app, copy a self-contained agent prompt and show built-in brand icons. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Give every mobile fixture one phone-shaped frame, anchor composer menus to their triggers, render the mobile command palette as a bottom sheet, align new-thread action and nav-panel highlights with their rows, keep the file tab from overrunning the panel icons, and on getbb.app lock phone-width viewers to the mobile view with the desktop toggle disabled. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Replace private *Area symbol names with their public PluginBbSdk paths, add uncovered public exports to their cards, and add a Provider bridges card for the provider-bridge entry points. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ight Co-Authored-By: Claude Opus 5.5 <[email protected]>
… clickable Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On phones the slide title only repeated the tab label, so keep it for screen readers and drop the blurb, and give the page heading less padding. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lay out mobile fixtures at one 350px column and scale them to the phone's width and height, so every mock fits with the tab bar visible at 360-390px. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The public marketplace has no built-in plugin pages yet, so link each Used by plugin to its directory in get-bb/bb instead of a 404ing /marketplace page. Co-Authored-By: Claude Opus 5.5 <[email protected]>
5e919a6 to
ab121e2
Compare
The compact header now applies only where the host opts into the mobile-only layout (getbb.app). The public page declares https://getbb.app/plugin-guide as canonical so ?slide= links fold into one indexed URL. Co-Authored-By: Claude Opus 5.5 <[email protected]>
## Human comments ## What was wrong The public Plugin Guide (#4611) had several visible issues: - **Page fonts and colors:** the Guide's theme stylesheet replaced the site's fonts and colors on every page that loads it. - **Phone mock:** it rescaled while mobile browser toolbars collapsed during scrolling. - **Safari menu:** Escape didn't close the Plugins menu after a mouse click. - **Narrow phones:** the site header overflowed screens narrower than about 341 px. - **Diff mock:** the removed line used a color token that doesn't exist, so it rendered uncolored. ## What changed - `/plugin-guide` and posts embedding the Guide now use the same fonts and colors as the rest of the site. - The Guide keeps the app's own colors inside an `.app-theme` wrapper. - The phone mock no longer rescales when mobile browser toolbars collapse. - Escape closes the Plugins menu from anywhere on the page, including in Safari. - Below 360 px the header hides its GitHub icon, which is still in the footer, so the header fits. - The diff mock's removed line is red again. - "Draft prompt highlighting" no longer lists Agent Annotations. - The web build dedupes React. - Guide-only Tailwind classes now ship only on Guide pages. - New web tests fail when the Guide uses an undefined theme token. - They also fail when a "Used by" name doesn't map to exactly one plugin. - `@bb/web#test` reruns when Guide sources or plugin manifests change. - A plugin folder whose `package.json` has no `bb` block is skipped instead of failing the web build. - Reading whole manifests adds about 52 KB raw to the lazy Guide chunk; other pages are unchanged. Header at 320 px: | Before | After | |---|---| |  |  | Diff mock, removed line: | Before | After | |---|---| |  |  | ## How you verified - **Remote CI:** passed on `ecdcca4aff`, including the new web tests on Linux and Windows. - **Page tokens (Chrome for Testing, 2×):** body fonts and colors on `/plugin-guide` match `/blog` in light and dark. - **Guide layout:** unchanged; the CSS layer order is `properties`, `landing-reset`, then Tailwind. - **Narrow widths:** at 320, 340 and 360 px nothing overflows; at 320×568 the phone mock fits. - **Safari 26.5.2:** with focus off the menu, Escape closes it and refocuses "Plugins". - **Turbo dry run:** `@bb/web#test` now hashes `plugins/plugin-api-docs/src/wireframes.tsx` and the plugin manifests. - **Manifest import (Chrome for Testing):** the Guide still shows 34 distinct source links and 13 brand icons. - **Not verified:** toolbar-collapse rescaling needs a real phone browser. - **Slop Cop review of `01797aa428`:** one P1, fixed in `9e6632ba86`. The test had been skipped when only Guide sources changed. ## Follow-ups (P2) - Share one head-links helper between the two routes. - Test that `plugin-guide.css` declares every `landing.css` layer, so a renamed layer can't outrank Tailwind. - `PluginComposerApi.onSubmitted` no longer lists a first-party user. Move it to the composer card that lists Agent Annotations. BB-Thread: [Public Plugin Guide on getbb.app](https://brsbl.getbb.app/projects/proj_khiw2za95v/threads/thr_ptdzpsxqum) 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
## Human comments ## What was wrong Core duplicated Side Chat's Send to main action and special full-thread chrome even though the plugin's embedded ThreadChat already supplies the action. Embedded timelines also suppressed slot actions in message rows but leaked them into assistant text-selection menus. Plugins lacked the recorded message sequence needed to use A2's individual-message links reliably for steers. ## What changed - Remove core Send to main and its hook/prop chain, the side-chat header pill, and the Side chat of composer relationship. Generated handoffs say Message from side chat; the generated-message Forked from path is removed. Full threads use ordinary fork behavior. - Honor includePluginMessageActions=false in both selection-menu activation and action collection. Side Chat's existing embedded consumer action remains available, with A3/A2's fitted inline actions and ⋯ ordering preserved. Add to chat stays core. - Expose ThreadChatMessageReference.experimental_messageSeq to slot actions, consumer actions, and selections; document it in the Plugin Guide and audit list. Bump Plugin SDK 0.6.21 → 0.6.22. No server/daemon wire change. Attachment sizes, global Send to main registration, action availability/role/placement fields, and React metadata slots are excluded. ## How you verified Rebased onto main after A2 and portable attachments merged. Only A4 remains; main's final Copy link behavior, portable attachment contract, automation links, and Sent to labels are preserved. Rebased again onto main at c5b97d7 (2026-10-05): main had taken 0.6.20 and 0.6.21, so the SDK is re-bumped to 0.6.22; the Plugin Guide message-actions bullets conflicted with #4611's shorter copy and now use main's wording, extended to say slot actions appear in the main timeline only and that actions receive the message's link sequence. All affected typechecks/lints passed, along with 105 app, 363 SDK, 20 Side Chat, 75 Plugin Guide, and 22 server documentation tests (585 total): - `pnpm exec turbo run typecheck lint --filter=@bb/app --filter=@bb/server --filter=@get-bb/plugin-sdk --filter=bb-plugin-side-chat --filter=bb-plugin-plugin-api-docs --concurrency=2` - `pnpm exec turbo run test --filter=@bb/app -- src/components/thread/timeline/ThreadTimelineRows.actions.test.tsx src/components/thread/timeline/MessageActionBar.test.tsx src/components/thread/timeline/GeneratedConversationMessage.test.ts src/components/thread/timeline/GeneratedConversationMessage.test.tsx src/components/thread/timeline/ConversationMessageContent.test.tsx src/components/plugin/docs-anatomy-manifest.test.tsx` - `pnpm exec turbo run test --filter=@get-bb/plugin-sdk --filter=bb-plugin-side-chat --filter=bb-plugin-plugin-api-docs --concurrency=2` - `pnpm exec turbo run test --filter=@bb/server -- test/services/plugins/plugin-authoring-docs.test.ts` The new selection-suppression and recorded-steer-sequence cases failed against the original pre-fix owner and passed with A4. Final-head live verification used persistent isolated `pnpm start:worktree` app/server/daemon instances: - Matched actual parent/head seeded UI captures reproduce the embedded selection leak and correction; full-thread Send/header/banner cleanup is retained. - Real Codex turns through the running BB UI/CLI → server → daemon verified main and Side Chat replies, one Send to main delivery to the correct destination with correct sender identity, and a steer during an active turn. - An external disposable observer plugin verified actual slot, main-selection, and separate embedded ThreadChat consumer callbacks. The steer reference keeps recorded sequence 41 separate from fork anchor 42; consumers receive the same message identity. The observer is disabled after QA. - Core Add to chat inserts the selected text in the embedded composer. Main selection actions remain. Compact coarse-pointer Chromium retains Copy link/Copy/plugin/Add/Fork controls, with no app-root inert or aria-hidden. Copy link writes the correct #msg=51 URL. No native iOS/Android claim. Before the latest rebase, the only red check was the SplitWorkspaceRoute bundle budget (0.1 KB over), which also failed on the parent. Main has since raised workspace route budgets by 5% (#4933). The isolated review fixture remains running locally. Normal BB Connect exposure was rejected by automatic approval review and requires specific destination/payload approval. Reload can temporarily show the existing Agent sender-label fallback until hidden-thread metadata is cached; visiting the source thread restores Message from side chat. This metadata lookup is unchanged by A4. > AGENT GENERATED
Human comments
What was wrong
The Plugin Guide only existed inside bb as the
plugin-api-docsplugin, so the upcoming plugins blog post had no public page to link to and couldn't embed it.What changed
/plugin-guideon getbb.app (apps/web/src/routes/plugin-guide.tsx): renders the Guide'sProductMapstraight fromplugins/plugin-api-docs/src. The current slide syncs to?slide=(replace navigation, so reload and shared links open the same map). Plugin names in "Used by" link to that plugin's source on GitHub (github.com/get-bb/bb/tree/main/plugins/<dir>), which exists for every built-in. Their icons come fromfirst-party-plugins.json, or from the plugin's own SVG logo, read through its manifest'sbb.branding.icon, for the five built-ins that ship one. "Copy for agent" copies a self-contained prompt: what to build, the surface's SDK symbols, the bb-plugin-authoring skill, and a link back to the slide. The in-app button copies a mention that only resolves inside bb. The Guide is client-only and lazy-loaded (ClientOnly+React.lazy), because its mobile/desktop layout readsmatchMediaon first render and would otherwise mismatch on hydration.The plugin stays forkable. The Guide's three
@/imports resolve through the web's existing@/alias to modules the web owns. This is the same contract a fork uses:@/means "the host's registry items".apps/web/src/components/ui/icon.tsxandswitch.tsxare one-line re-exports from@bb/shared-ui(new workspace dependency of@bb/web).@/lib/utilsalready exists in the web; itscnis identical to shared-ui's (twMerge(clsx(inputs))).@/import the web lacks fails the web build rather than resolving to the wrong module.resolveJsonModuleis on for the Guide's JSON fixtures.Theme (
apps/web/src/components/ui/theme.css): adds the tokens the Guide uses, copied from the app theme for light and dark:muted,timeline-accent/file-accent,border-hairline,border-seam,surface-recessed-solid,surface-raised(-solid),sidebar,sidebar-foreground,sidebar-accent,radius-sm,shadow-xs/md/lift,text-2xs. It also adds@sourcelines for the Guide and shared-ui's icon/switch. The Guide's stylesheet (plugin-guide/plugin-guide.css) loads only on/plugin-guideand on posts that embed it.Landing CSS can coexist with Tailwind:
landing.css's*/a/codereset moves into@layer landing-reset. Unlayered, it beat every Tailwind utility (e.g. allp-*/m-*) on pages that load both. Pages that load onlylanding.cssbehave the same.Blog directive (
apps/web/src/blog/parse-post.ts,post-body.tsx): a linecomponent:plugin-guideorcomponent:plugin-guide:<slide-id>becomes a{kind:"component", name:"plugin-guide", slide?}block. It renders the full carousel (opening on the app-window "anatomy" slide by default) with an "Open the full Guide" link..post-bodyh2/h3/p/ul/li/li::before/strong/coderules now skip.post-embeddescendants through:where(:not(.post-embed *)). They don't leak into the embed, and their specificity is unchanged, so existing overrides (lede, ordered lists, quotes, tweet text) still win.Top-nav Plugins menu (
apps/web/src/landing/site-chrome.tsx,landing.css): "Plugins" becomes a dropdown with Marketplace and Plugin Guide. It uses the same<details>/<summary>disclosure as the marketplace category picker. Escape closes it and returns focus; clicking or tabbing outside closes it. The page you are on is marked witharia-current, and "Plugins" is highlighted on both pages.Discoverability: a "Plugin Guide" link in the shared site footer, which appears on the home page, blog, changelog, privacy page, marketplace and the Guide itself. Also a sitemap entry and a canonical URL (
https://getbb.app/plugin-guide, so?slide=links count as one page) for/plugin-guide, plus links fromPLUGIN_OVERVIEW.mdand thebb-plugin-authoringskill.Rebuild triggers:
@bb/web#build/#typecheckinputs and thedeploy-web.ymlpaths now includeplugins/plugin-api-docs/src/**andpackages/shared-ui/src/**.Guide fixture fixes (
wireframes.tsx,product-map.tsx; also shown in the in-app Guide):mobileOnlyOnCompactViewport). The in-app Guide keeps both its desktop toggle and its slide header on phones.SDK coverage:
*Area.membernames that aren't public exports now use their importablePluginBbSdk.*paths.experimental_defineHostEntry,defineRpcContract,useSettings,BbNavigate.openThreadPanel, and the testing loaders)../provider-bridgeentry points.bb mark in slide titles: "The bb app window" shows the vector bb mark (
assets/bb-logo.svg, inverted in dark mode like the app'sBbLogo) instead of italic text.ProductMaptakes an optionalbrandMark; without it, the in-app Guide keeps the italic text.Card copy and Used by refresh (
plugins/plugin-api-docs/src/surfaces.ts,first-party-plugins.json). This also changes the in-app Guide.surfaces.test.tsnow enforces the shape: lead verb, at most 4 bullets, at most 100 characters each, no SDK identifiers.first-party-plugins.json: Agent Annotations, bb account, BB guide, PDF preview, Theme Preview, Thread list. Seven surfaces have no built-in user yet, so their row is hidden.Screenshots (after; new page)
Card with "Used by" and "Copy for agent" (copied state):
Agent providers card with built-in brand logos:
Top nav, before and after (
/blog, 1440 wide):Before
After
Plugins menu open on
/plugin-guide:Mobile (390 wide), before and after:
Before
After
Dark, on the marketplace:
Slide title with the bb mark, light and dark:
Mobile fixtures, one phone frame each (390 wide):
Desktop app window with "Your panel" hovered (#2) and the truncated file tab (#14):
The + menu opening from the + button, and the @ typeahead with its badge above it:
Site footer with the Plugin Guide link:
Plugin backend with a refreshed card:
Desktop, light (1440×900 @2x):
Desktop, dark, with a surface card open showing "Used by" links:
Mobile (390×844 @2x):
Blog post with
component:plugin-guide(local draft, not committed):In-app Guide on this branch (dev app), phone width: slide title and blurb kept, desktop toggle enabled:
In-app Guide on this branch, desktop:
How you verified
pnpm exec turbo run build --filter=@bb/webpasses. The client build emits the Guide chunks, and the Guide CSS contains the new token utilities (bg-sidebar,text-2xs,border-border-hairline,shadow-lift, …).bb plugin build plugins/plugin-api-docspasses, and itsapp.jsstill uses the host runtimeexperimental_Icon.vite dev) driven throughbb browser-automation, headless Chrome for Testing, 2× device scale:/plugin-guideat 1440×900: Guide content renders (7 slides, 68 annotation chips). Clicking a slide tab updates?slide=composer, ArrowRight moves to?slide=home, and loading?slide=settingsopens "Plugin settings page". A chip opens its card, and "Used by" links point to each plugin's GitHub source with icons. "Copy for agent" shows "Copied", and the clipboard receives the self-contained prompt; checked by stubbingnavigator.clipboard.writeText. Brand logos render, masked to the text color, on the Agent providers card.prefers-color-scheme: tokens resolve correctly.?slide=app-shell-thread), no horizontal overflow.component:plugin-guideandcomponent:plugin-guide:composer: two embeds at the 680px column width, opening on "The bb app window" and "The composer". Links go to/plugin-guideand/plugin-guide?slide=composer. Computed styles show no.post-bodyleak (Guideli::beforeisnone, Guidepis 13px), while the post's own list keeps its markers and spacing./plugin-guideand/marketplace. Checked at 390 px (panel stays on screen) and in dark mode. No console errors. On/, the open panel paints above the hero's "New" callout: hit-testing both rows lands on the links, and clicking Plugin Guide navigates. The header is lifted withposition: relative; z-index: 10because its entrance animation fill can trap the panel's z-index in Safari and Firefox./plugin-guidedesktop (slides,?slide=, all three composer menus, brand icons, Copy for agent), and 390 and 360 widths. Dark mode wasn't driven in Safari./,/blog, both posts,/changelog,/privacyand/marketplace, every element's computed margin, padding, color, font, line height, decoration, size and::beforewere captured, thenlanding.css/blog.csswere swapped in place for theirorigin/mainform (reset unlayered, no embed exclusion): 0 differences on every page. The same check flagged the lede and<ol>markers on/privacyagainst an earlier revision of this PR, which the review caught.parse-post.test.ts(directive with and without slide; near-misses stay paragraphs) and the sitemap test run in CI.pnpm dev,plugin-api-docsenabled), Chrome for Testing at 2×: at 1440×900 the slide header (italic bb, blurb) and toggle are unchanged; at 390×844 the slide title and blurb still show, the desktop toggle stays enabled, the phone mock fits at scale 1 and scrolls fully into view, and nothing overflows sideways. The web keeps the compact header (titlesr-only) and serves<link rel="canonical" href="https://getbb.app/plugin-guide">in the SSR HTML.Follow-ups (P2, not in this PR)
Close the Plugins menu on Escape after a mouse open. Safari doesn't focus the summary on click, so the details-scoped key handler doesn't fire. Use a document keydown listener. (Nav review, 4fa7844)
Drop Agent Annotations from "Draft prompt highlighting". It only uses
replaceandonSubmitted, never highlighting. (Card review, 1f09afd)Reword the app-wide scripts bullet "Clean up automatically when the window reloads". bb runs the returned disposer on unmount, which also happens on plugin reload and disable. (Card review)
Read
.bbfrom the default JSON import in the web brand-icon glob, so a future plugin manifest withoutbbcan't break the web build. (Card review)Link Plugin Guide plugins to their marketplace pages #4936 (draft, stacked on Add built-in plugin pages to the public marketplace #4608) switches "Used by" links to the built-in marketplace pages, falling back to GitHub for built-ins Add built-in plugin pages to the public marketplace #4608 leaves unlisted.
Validate
component:plugin-guide:<slide>ids at parse time. Right now a typo opens the first slide and the "Open the full Guide" link carries the bad id (Codex review).Add
packages/shared-ui/package.json,plugins/*/package.json,plugins/*/icons/*.svgandplugins/*/*.svgto the@bb/web#build/#typecheckinputs, and the same plusassets/bb-logo.svgandpnpm-lock.yamlto the deploy-web paths. The brand-icon glob reads every plugin manifest and SVG, so a manifest or icon change alone neither rebuilds nor redeploys the site. (Slop Cop architecture, code quality)Scan shared-ui's
motion.tswith Tailwind@source. The switch's transition classes currently survive only because the web'smotion.tshas the same string.Document, or test, the
@/modules the web supplies to the Guide (icon, switch, lib/utils). Today a new@/import in the Guide fails the web build with an error that points at web paths.Stop the Guide stylesheet from overriding landing tokens on
/plugin-guideand posts that embed it:theme.cssloads afterlanding.cssand replaces--font-sans(drops the size-matched Inter fallback),--font-mono(Fira Code, never loaded on the web),--border,--state-hoverand--surface-recessed. Scope the app values to the Guide or re-assert landing's after the import. (Slop Cop architecture, code quality)Size the web
PhoneFixtureagainstdocument.documentElement.clientHeightinstead ofwindow.innerHeight, so collapsing mobile browser toolbars don't rescale the phone mock and shift the page while scrolling. (Slop Cop performance)Build the web "Copy for agent" context from
pluginSurfaceAgentContextinstead of copied lines, with a web test. (Slop Cop architecture)Test that every theme token the Guide uses is defined in the web
theme.css, and that every "Used by" display name resolves to exactly one plugin manifest. (Slop Cop architecture, code quality)Add
resolve.dedupe: ["react", "react-dom"]to the web Vite config, and move the Guide's@sourcelines from the sharedtheme.cssintoplugin-guide.css. (Slop Cop architecture)BB-Thread: Public Plugin Guide on getbb.app
🤖 Generated with Claude Code