Expand description
Runtime shell for GPUI Storybook.
gpui-storybook-core owns the UI runtime used by the public facade crate:
window creation, the searchable gallery layout, story container panel
behavior, title-bar composition, local preference resolution and
persistence, embedded localization/assets, and shared registry entry types.
Most applications should start with gpui-storybook. Use this crate
directly only when you need runtime-level control over the shell.
Important module boundaries:
story: thestory::Storycontract,story::StoryContainer, duplicate-title variant groups whose members remain concrete previews, section helpers with stable sub-story capture metadata, runtime startup, and standard window helpersgallery: searchable sidebar plus active-story displaycontrols,workbench, andpresentation: typed live field editing, per-window selection and preview state, theme editing, story source details, focus-scoped actions and key bindings, optional GPUI profiler telemetry and Inspector integration, grouped-story selection, viewport presets, and canvas settingstheme_workbench: deterministic session drafts layered over the selected base theme, including token rebuilding and external-reload rebasingautomation: shared controller and command types for live story listing, story opening, control reads/edits/resets, serialized capture controls, screenshot capture, runtime action discovery, route-local structured value reads, closed in-process interaction batches, and the optional default automation global consumed by the base gallery constructor. The gallery uses one frame-aware executor and one exclusive mutation/capture guard.capture_region: story-view and sub-story capture bounds, semantic interaction targets, and structured values used by automationstorybook_window_ui: customization hooks for application menu and title-bar additionslanguage,preferences, andi18n: typed locale abstraction, saved/resolved runtime state, and bridge intoes-fluent,gpui-es-fluent, andgpui-componentassets: embedded Storybook assets plus delegated component assetsregistry: typedinventoryentry definitions shared with the facade and macro crates, plus registration metadata copied into runtime story containerscatalog: static story registration autodocs and deterministic JSON export for tooling that must inspect stories without constructing a GPUI window
The preference runtime treats saved intent and resolved presentation as
separate state. Standard windows feed appearance and activation events into
resolution, selecting a named theme activates its matching appearance while
preserving the opposite light/dark slot, and locale changes fan out to
Storybook, the consumer adapter, CurrentLanguage, and GPUI Component.
PersistenceStatus reports storage activity only; locale failures remain
retryable diagnostics.
Modulesยง
- actions
- app_
menus - assets
- automation
- Live-window automation shared by gallery, dock, and MCP integrations.
- capture_
region - catalog
- Static Storybook catalog and registration autodocumentation.
- controls
- Typed story controls shared by the workbench and automation surfaces.
- gallery
- i18n
- language
- preferences
- GPUI-owned resolved preference state and runtime orchestration.
- presentation
- Window-local preview presentation settings.
- registry
- story
- storybook_
window_ ui - theme_
workbench - Session-scoped theme drafts used by the Storybook workbench.
- title_
bar - tokio_
bridge - Tokio runtime shared by one Storybook GPUI app context.
- workbench
- Window-scoped Storybook workbench state and UI.