Skip to content

feat(storybook): unify plugin Storybooks into one composed host#55

Open
antfubot wants to merge 2 commits into
mainfrom
feat/unified-storybook
Open

feat(storybook): unify plugin Storybooks into one composed host#55
antfubot wants to merge 2 commits into
mainfrom
feat/unified-storybook

Conversation

@antfubot

@antfubot antfubot commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

What & why

Each devframe plugin ships its own framework-specific Storybook (git = React, inspect = Vue, code-server = vanilla, and now terminals = Svelte, a11y = Solid). Storybook is single-framework per builder, so "one Storybook with different pages" is done with Storybook Composition: a thin host whose sidebar shows each plugin as its own section.

Changes

  • New @devframes/storybook host — composes every plugin's Storybook via refs, resolving to live dev-server ports in dev and to per-plugin static subfolders in a build, plus a branded Overview page.
  • Scaffolded the two missing Storybooksterminals (Svelte, App empty state) and a11y (Solid, severity Summary), so all five plugins appear as sections.
  • Aligned every Storybook on v10 — dropped @storybook/addon-essentials/@storybook/vue3 (folded into core), added @storybook/svelte-vite + storybook-solidjs-vite; this also resolves git's previous v10-framework-on-v8-core mismatch.
  • Consistent .dark-class theme toggle across every surface; a unique dev port per plugin.

Usage

  • pnpm storybook — run the host + all five plugin dev servers in parallel.
  • pnpm storybook:build — build one composed static bundle (storybook/storybook-static/).

Also: examples/storybook-hub

A second take on the unified view — instead of Storybook Composition, use @devframes/hub as the shell and surface each plugin's Storybook as its own lazily-mounted iframe dock, alongside the live terminals plugin (mounted via mountDevframe).

  • dev (vite) — the plugin's storybook dev is spawned on first dock open and iframed live (the on-demand embed pattern the code-server plugin uses).
  • build (vite preview) — the pre-built storybook/storybook-static/<id> is served by the hub on one origin.
  • Both are unified behind a storybook-hub:ensure RPC; each dock's iframe is created lazily and kept mounted so its state survives tab switches.

Notes

  • Dev composition / dev-spawned Storybooks use localhost/port URLs resolved in the browser, so those ports must be reachable locally; the composed static build and the hub's preview mode each serve on a single origin.
  • Verified locally: lint, typecheck (9/9), build (14/14), test (532/532), a full storybook:build of all six, and the hub example booting with an on-demand storybook dev serving through a dock.

This PR was created with the help of an agent.

Add a single Storybook UI that composes every plugin's framework-specific Storybook (React, Vue, Svelte, Solid, vanilla) as its own section, so the whole devframe surface can be browsed in one place.

- add the @devframes/storybook host that composes each plugin via refs (live dev-server ports in dev, per-plugin static subfolders in build)
- scaffold Storybooks for terminals (Svelte) and a11y (Solid)
- align every Storybook on Storybook 10 and a shared dark/light theme toggle
@netlify

netlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit ac8440d
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a44bfd22a7307000832af92
😎 Deploy Preview https://deploy-preview-55--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

…the hub

A second take on the unified Storybook: instead of Storybook Composition, use @devframes/hub as the shell and surface each plugin's Storybook as its own lazily-mounted iframe dock, alongside the live terminals plugin.

- dev: the plugin's `storybook dev` is spawned on first dock open and iframed live (the on-demand embed pattern code-server uses)
- build: the pre-built storybook-static/<plugin> is served by the hub on one origin
- both unified behind a `storybook-hub:ensure` RPC; each dock's iframe is created lazily and kept mounted to preserve its state
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