Skip to content

feat(ui): add Storybook renderer baseline - #370

Merged
Astro-Han merged 2 commits into
mainfrom
codex/storybook-baseline
Jun 30, 2026
Merged

feat(ui): add Storybook renderer baseline#370
Astro-Han merged 2 commits into
mainfrom
codex/storybook-baseline

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

Adds a renderer-aligned Storybook baseline for Maka UI primitives.

Why

Tracks #363. This gives frontend file-governance work an isolation gate: extracted primitives can be mounted outside the app shell while still using the renderer's Vite, Tailwind, CSS, token, and theme substrate.

Scope

Changed:

  • Added @maka/desktop Storybook scripts and dev dependencies: storybook and @storybook/react-vite.
  • Added .storybook/main.ts with React+Vite, Tailwind v4, and @maka/ui source aliases matching the renderer setup.
  • Added .storybook/preview.tsx that imports renderer styles.css and provides light/dark plus palette root decorators.
  • Seeded packages/ui with a small primitive story fixture covering Button, Alert, Empty, and Spinner.
  • Added a source contract test that keeps Storybook out of mandatory build / test while pinning the baseline setup.

Not included:

  • No visual redesign.
  • No mandatory CI gate for Storybook yet.
  • No app renderer stories yet; the first baseline only scans packages/ui stories.

Verification

  • npm run -w @maka/desktop build-storybook
  • npm run -w @maka/desktop typecheck
  • npm run -w @maka/desktop build
  • cd apps/desktop && node --test "dist/main/**/*.test.js" → 1621/1621 passing
  • npm run -w @maka/desktop build:main && cd apps/desktop && node --test dist/main/__tests__/storybook-baseline-contract.test.js
  • Storybook dev smoke: http://127.0.0.1:6006/index.json includes Primitives/Storybook Baseline

User-facing impact

None. This is dev tooling only; desktop app runtime and production build behavior are unchanged.

Reviewer notes

npm run -w @maka/desktop test currently stops in pretest at scripts/check-console.mjs because packages/headless/src/harbor-cli.ts has pre-existing console.error call sites. The desktop node test suite itself passes when run from apps/desktop after build:main.

npm audit reports 4 advisories against current direct/transitive tooling dependencies (vite, undici, esbuild, @babel/core). This PR does not broaden into dependency remediation.

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