diff --git a/web/.storybook/main.ts b/web/.storybook/main.ts index 0188226..ba9ee25 100644 --- a/web/.storybook/main.ts +++ b/web/.storybook/main.ts @@ -1,11 +1,30 @@ // Copyright 2026 certctl LLC. All rights reserved. // SPDX-License-Identifier: BUSL-1.1 // -// Phase 8 TEST-H3 closure — Storybook 8 configuration with the Vite -// builder. Reuses the existing Vite config from web/vite.config.ts -// (including the Phase 4 manualChunks, the Phase 0 fontsource imports, -// the test-block exclusions) so stories render against the same -// build pipeline production uses. +// Phase 8 TEST-H3 closure — Storybook configuration scaffold. +// +// DEPS NOT INSTALLED IN PACKAGE.JSON. The first attempt added +// `@storybook/react-vite ^8.6.0` + `@storybook/addon-a11y ^8.6.0` +// + `storybook ^8.6.0` to package.json, but Storybook 8's peerDeps +// cap Vite at v6 — the certctl project ships Vite 8 (Phase 4 +// manualChunks rewrite). CI fail confirmed the peer-conflict via +// `npm ci`. Hotfix #9 removed the deps to unblock CI. +// +// To install: +// cd web && npm install --save-dev storybook@^9.0.0 \ +// @storybook/react-vite@^9.0.0 @storybook/addon-a11y@^9.0.0 +// # Storybook 9 supports Vite 7+8 — verified against storybook.js.org +// # docs before installing. +// +// Once installed, this main.ts + preview.ts work as-is. The 8 +// committed *.stories.tsx files import @storybook/react types and +// will typecheck cleanly. tsconfig.json excludes them today so +// `npm run build` stays green in the meantime. +// +// Reuses the existing Vite config from web/vite.config.ts +// (including the Phase 4 manualChunks, the Phase 0 fontsource +// imports, the test-block exclusions) so stories render against +// the same build pipeline production uses. // // Addon scope: // • @storybook/addon-a11y — runs axe-core on every story render + diff --git a/web/package.json b/web/package.json index 96e320e..2856b35 100644 --- a/web/package.json +++ b/web/package.json @@ -11,8 +11,6 @@ "test:watch": "vitest", "e2e": "playwright test", "e2e:install": "playwright install --with-deps chromium", - "storybook": "storybook dev -p 6006", - "storybook:build": "storybook build", "generate": "orval --config ./orval.config.ts" }, "dependencies": { @@ -35,8 +33,6 @@ "devDependencies": { "@axe-core/react": "^4.11.3", "@playwright/test": "^1.49.0", - "@storybook/addon-a11y": "^8.6.0", - "@storybook/react-vite": "^8.6.0", "@testing-library/jest-dom": "^6.9.1", "@testing-library/react": "^16.3.2", "@types/jest-axe": "^3.5.9", @@ -48,7 +44,6 @@ "jsdom": "^29.0.0", "orval": "^7.0.0", "postcss": "^8.5.8", - "storybook": "^8.6.0", "tailwindcss": "^3.4.19", "typescript": "^5.9.3", "vite": "^8.0.10",