Skip to content

Add Theme Preview plugin - #75

Open
brsbl wants to merge 7 commits into
bb/endless-theme-refresh-thr_tkwwfu5nasfrom
bb/theme-preview-thr_tkwwfu5nas
Open

Add Theme Preview plugin#75
brsbl wants to merge 7 commits into
bb/endless-theme-refresh-thr_tkwwfu5nasfrom
bb/theme-preview-thr_tkwwfu5nas

Conversation

@brsbl

@brsbl brsbl commented Aug 21, 2026

Copy link
Copy Markdown
Owner

What changed

This adds Theme Preview, a nav-panel plugin for iterating on a live theme in a split beside an agent. The additive finishing commits complete and harden that workflow:

  • a background fs.watch service publishes theme-preview:changed; the app refreshes with useRealtime, while an active-file mtime check re-applies changed custom and plugin themes
  • stale catalog work cannot revert a newer picker selection, and out-of-order frontend responses cannot overwrite its state
  • plugin-contributed theme CSS resolves through sdk.plugins.list() plus each manifest's bb.themes[].css
  • partial themes inherit the base palette in both modes, shared :root declarations apply to both, and local var() references and fallbacks resolve before rows render
  • bb's six bundled palettes show real chips extracted from bb source at c942421a4
  • the mock is the main stage, with a compact view toggle and a right-hand style-guide rail topped by one combined theme/mode picker
  • Ink and Status rows show alpha-composited WCAG contrast ratios against the rendered surface
  • the bundled bb-theme-authoring skill documents the split workflow, theme file shape, tokens, application, and verification

The plugin stays on the released @get-bb/plugin-sdk 0.4.8 toolchain and retains engines.bbPluginSdk: ^0.4.1 and engines.bb: >=0.0.34.

Verification

  • npm run check --workspace=plugins/theme-preview — typecheck, build, 2 files / 10 tests
  • node tooling/check-repository.mjs — repository hygiene passed
  • Exact-head CI run 32528269658 fully green
  • Exact-head install in the desktop dev fixture
  • Mobile, narrow, normal desktop, and ultrawide captures inspected, plus dark mode and transition widths
  • Concurrency, translucent contrast, partial theme, shared root, and derived-variable regression tests pass

Evidence

These are renderer captures from the same desktop dev fixture, route, 1440×900 viewport, and device scale factor. Native window chrome is absent because the bb host did not have Screen Recording permission for this run.

Before — parent behavior on origin/main, plugin unavailable

Before — Theme Preview unavailable

After — exact PR head e07166b9f4f31de0883fb0a7be1648e96e938b24, live mock and inspector rail

After — Theme Preview

Responsive, dark-mode, transition, and functional evidence

BB-Thread-ID: thr_yqw7fnuxf6

@brsbl
brsbl force-pushed the bb/theme-preview-thr_tkwwfu5nas branch from 0c3cb15 to 2674ae8 Compare August 21, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant