CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

storybookjs/storybook

Scanned commit dc9b30e8fd dated 2026-10-02 — last upstream commit. Generated by codevetter 1.15.0 on 2026-10-02.

github.com/storybookjs/storybook ↗ · 3999 files · 19.6 MB · scan capped

Build bulletproof UI components faster Storybook is a frontend workshop for building UI components and pages in isolation.

Deep analysis by cli:codex via the codex CLI on 2026-10-02 (463s) — every claim below links to its cited source files. Source inspection; upstream code and tests were not executed.

Overview

Storybook is a frontend workshop for developing, documenting, and testing components and pages in isolation. This TypeScript monorepo publishes a core runtime, framework integrations, builders, renderers, and addons; its Node server coordinates a manager UI and a separate preview iframe. At commit dc9b30e8fd8a71383ec01b9510f38bee51457e8a, it also exposes registered agent toolsets through CLI, SDK, and MCP interfaces, including documentation lookup, story previews, reviews, and tests.

System map

The product separates Node configuration and build orchestration from browser navigation and component execution. Framework presets select builders and renderers, while the published core package supplies shared APIs and runtime infrastructure. State spans browser storage, runtime service state, generated static artifacts, and a local instance registry. Contributor tooling and agent evaluation form separate workspace concerns.

Feature catalog

The inspected feature surface covers story navigation, live component manipulation, documentation, accessibility, automated testing, and static publication. CLI commands provide development, builds, indexing, and agent access. Addons extend the workshop with panels and runtime hooks. This is a bounded catalog of evidenced capabilities, not an exhaustive enumeration of every screen or integration.

Data flow

Configuration enters through CLI options and project presets, then supplies story discovery, builders, and runtime feature gates. The server produces an index whose import paths connect static discovery to executable preview modules. Channel events carry selections, args, and results between realms. Persistence is explicit: browser preferences, rewritten story files, static snapshots, and instance discovery records have different owners.

Behavior traces

Three concrete flows were followed through implementation: development startup, selecting and rendering a story, and saving Controls changes to source. Startup has separate configuration-discovery and final preset passes. Selection branches between stories and docs and handles asynchronous replacement of an existing render. Saving crosses from browser events to AST mutation and filesystem output, then returns through correlated response events.

Testing signals

Tests and CI definitions were inspected, not executed; no passing result or measured coverage is asserted. Vitest combines package projects with a separate browser-backed Storybook UI project. Inspected tests exercise rendering contracts, source mutation, token validation, and CLI attachment. Explicit exclusions and mocked boundaries limit what those tests demonstrate, and the inventory is bounded rather than exhaustive.

Risk map

The principal sensitive boundaries are dev-server access, source-file rewriting, output-directory deletion, package execution, and instance-token persistence. The source contains safeguards, including token comparison, Host checks, and owner-only registry permissions. Findings below are source observations or explicitly labeled hypotheses, not confirmed vulnerabilities. Partial inspection cannot establish whole-repository test gaps or the absence of additional protections.

Extension points

Storybook exposes extension seams at configuration presets, builders, renderers, manager addons, story indexers, and schema-driven services. Agent transports share registered toolsets instead of independently implementing operations. Registration and initialization conditions are part of those contracts. New integrations should preserve runtime ownership and use the existing hooks appropriate to their boundary.

Contributor handoff

Use this report as a source map for the pinned commit, then recheck checkout-specific instructions and implementation before editing. Tests and CI were inspected, not executed; verification commands below are guidance for subsequently authorized implementation work. Investigation covered more than twelve implementation files and three concrete flows, but remains bounded rather than exhaustive. Keep edits within the owning package and preserve contracts across server, manager, preview, and agent transports.

Languages

LanguageFilesShare of source
TypeScript479689%
Markdown1183docs/config
JSON596docs/config
JavaScript3466%
Vue1192%
Svelte1112%
CSS59docs/config
YAML54docs/config

Start reading here

Probable source entrypoint: code/ — inferred from the directory tree and manifest, not the upstream docs.

Source roots

code/ (2064 files) agent-eval/ (438 files) CONTRIBUTING/ (1 files)

Source layout — agent-eval/

PathFiles
agent-eval/app/10
agent-eval/baselines/19
agent-eval/evals/103
agent-eval/.env.example1
agent-eval/.gitignore1
agent-eval/README.md1
agent-eval/eval-matchers.d.ts1
agent-eval/eval.d.ts1

Repository structure

Top-level pathFiles
code/2064
docs/865
agent-eval/438
test-storybooks/293
scripts/202
.github/43
.agents/28
.claude/14

Docs found: AGENTS.mdCLAUDE.mdCONTRIBUTING.mdREADME.mddocs/_snippets/actions-filtering-example.mddocs/_snippets/actions-spyon-basic-example.mddocs/_snippets/addon-a11y-add.mddocs/_snippets/addon-a11y-config-context-in-story.mddocs/_snippets/addon-a11y-config-in-meta-and-story.mddocs/_snippets/addon-a11y-config-in-preview.md

Package

package.json — @storybook/root, 13 declared dependencies.

@nx/workspace@playwright/test@types/kill-porthttp-serverhuskyjitikill-portlint-stagednxoxfmtstd-envvite

CI & config entrypoints

Structural health signals

Average score 8.3/10 across 96 analyzed source files; 2 hotspots surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history