Skip to content

feat(storybook): add dashboard stories, MCP, and browser tests - #346

Open
alterdianne wants to merge 3 commits into
thedesignproject:trunkfrom
alterdianne:Storybook
Open

alterdianne wants to merge 3 commits into
thedesignproject:trunkfrom
alterdianne:Storybook

Conversation

@alterdianne

@alterdianne alterdianne commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Adds a root Storybook for developing and testing dashboard components, with MCP access for coding agents. Includes a documented, React 18-compatible Button component with five variants, two sizes, navigation links, disabled states, and forwarded refs.

  • Loads the dashboard tokens, styles, and fonts with light/dark theme controls.
  • Adds colocated stories for Button, AgentLauncher, BillingPage, ProjectPrivacy, and StatusBar, including interaction tests and a CSS rendering check.
  • Uses MSW fixtures on a reserved test domain for billing and privacy flows without API credentials.
  • Configures Storybook MCP at http://localhost:6006/mcp, Chromium-backed Vitest tests, accessibility reporting, and the Chromatic addon. CI installs Chromium before running coverage.
  • Keeps existing workflow dependency versions and patches intact in the refreshed lockfile.

Validation: 2,779 tests passed (163 skipped) across unit and Storybook browser suites with VITE_USE_MOCKS set to an empty value to override the local preview environment. Storybook and application type checks, the static Storybook build, and a Bun 1.4 frozen-lockfile install passed. Diff line and branch coverage against origin/trunk are both 100%. Storybook MCP tools were unavailable during this validation; browser stories ran through the local Vitest integration.

Accessibility findings remain advisory (test: 'todo'). The existing Button documentation records the destructive variant's light-theme contrast issue. Chromatic requires a separately connected project.

- Root Storybook (React/Vite) with docs, a11y, and theme addons, loading the
  dashboard token/style stack so components render as in the app
- Button (apps/dashboard/components/Button.tsx) built from the Figma Button
  set: primary/secondary/ghost/destructive/link, sm/md, hover/pressed/
  focus/disabled; renders <a> when given href, otherwise <button>
- Autodocs page from TypeScript + JSDoc and a Usage page (MDX) with rules,
  variant guidance, and common mistakes

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

alterdianne and others added 2 commits October 20, 2026 14:56
React 18 does not pass `ref` to function components as a prop, so the
ref test failed in the react 18 CI job. Wrap Button in forwardRef and
cover link refs too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@alterdianne alterdianne changed the title feat(storybook): add Storybook with documented Button component feat(storybook): add dashboard stories, MCP, and browser tests Oct 21, 2026

This branch has not been deployed

No deployments
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