Files
certctl/web/package.json
T
shankar0123 622c19cafe feat(web): close TEST-H3 — install Storybook 10 + wire scripts + dropt tsconfig exclude
Closes frontend-design-audit finding TEST-H3 (High):

  Zero Storybook — 9 production components live without isolated
  rendering or designer-handoff surface

Phase 8 originally shipped the scaffold (.storybook/main.ts +
preview.ts + 8 *.stories.tsx files) but couldn't land the deps:
  • Storybook 8.6 peer-capped at Vite 6, project ships Vite 8
    (Phase 4 manualChunks rewrite). Hotfix #9 ripped the deps.
  • The .storybook/main.ts header speculated "Storybook 9 supports
    Vite 7+8" — that was wrong. Verified at install time today:
    Storybook 9.1.20's peer range is Vite 5/6/7. ERESOLVE'd again.
  • Storybook 10.4.0 is the first release with explicit Vite 8 in
    its peer range (^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0). Installed
    cleanly via `npm install --save-dev`.

═══════════════════════════ CHANGES ═══════════════════════════════

package.json + package-lock.json:
  • storybook ^10.4.0
  • @storybook/react-vite ^10.4.0
  • @storybook/addon-a11y ^10.4.0
  All resolve without --legacy-peer-deps. 93 packages added.
  Scripts: `npm run storybook` (dev server on :6006) and
  `npm run storybook:build` (→ .storybook-static).

tsconfig.json:
  Dropped the `src/**/*.stories.tsx` + `src/**/*.stories.ts`
  exclusions. Storybook 10's @storybook/react types are stable;
  the 8 committed story files typecheck cleanly inside the main
  `npm run build` step. Phase 8's "stories excluded so build stays
  green in the meantime" caveat is now retired.

web/src/components/Banner.stories.tsx:
  Fixed stale prop name: stories used `severity: 'error'` but the
  Banner primitive's prop is `type: 'error'` (BannerType union).
  4-line edit, replace_all on `severity:` → `type:`. The Banner
  component never had a `severity` prop — the story was authored
  against a different draft of the API. Typecheck now passes.

web/.storybook/main.ts:
  Replaced the "deps not installed" header block with a
  version-selection history block documenting the 8 → 9 → 10
  trail so the next operator who upgrades Vite doesn't re-walk
  the same wall.

.gitignore:
  Added `web/.storybook-static/` (Storybook build output, like
  web/dist/).

═══════════════════════════ VERIFICATION ═══════════════════════════

  • npm install — exit 0, 93 packages, no peer warnings, no
    ERESOLVE.
  • npx tsc --noEmit — exit 0 with stories included (was running
    excluded; now they're in the typecheck graph).
  • npx storybook build — built in 3.09s, 17 chunks emitted to
    .storybook-static. All 8 stories rendered without errors.
  • npx vitest run src/components — 16 files / 161 tests pass
    (no regression from Storybook install / story-file fix).
  • npx vite build — production build green in 3.35s.
  • CI guards: no-raw-table 17/17, no-unbound-label 134/134,
    no-raw-toLocaleString clean.

Operator follow-ups (none blocking):
  • `npm run storybook` locally opens the dev server with hot-
    reload + addon-a11y panel.
  • `npm run storybook:build` for an immutable static deploy
    (e.g. cert-ctl.io/storybook).
  • New components SHOULD ship a sibling *.stories.tsx going
    forward; can wire a CI guard if desired (fe-component-has-
    story.sh — scaffold mentioned in the audit's executable
    prompt for Phase 8 TEST-H3 but deferred).

Ground-truth: origin/master tip bc417fc (UX-M9 just pushed)
verified via GitHub API BEFORE commit.
2026-05-14 19:59:08 +00:00

62 lines
1.7 KiB
JSON

{
"name": "certctl-dashboard",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"test": "vitest run",
"test:watch": "vitest",
"e2e": "playwright test",
"e2e:install": "playwright install --with-deps chromium",
"generate": "orval --config ./orval.config.ts",
"storybook": "storybook dev -p 6006",
"storybook:build": "storybook build --output-dir=.storybook-static"
},
"dependencies": {
"@floating-ui/react": "^0.27.19",
"@fontsource-variable/inter": "^5.2.8",
"@fontsource/jetbrains-mono": "^5.2.8",
"@headlessui/react": "^2.2.10",
"@hookform/resolvers": "^5.2.2",
"@tanstack/react-query": "^5.90.21",
"cmdk": "^1.1.1",
"lucide-react": "^1.16.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.75.0",
"react-router-dom": "^6.30.3",
"recharts": "^3.8.0",
"sonner": "^2.0.7",
"zod": "^4.4.3"
},
"devDependencies": {
"@axe-core/react": "^4.11.3",
"@playwright/test": "^1.49.0",
"@storybook/addon-a11y": "^10.4.0",
"@storybook/react-vite": "^10.4.0",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@types/jest-axe": "^3.5.9",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.1",
"autoprefixer": "^10.4.27",
"jest-axe": "^10.0.0",
"jsdom": "^29.0.0",
"orval": "^7.0.0",
"postcss": "^8.5.8",
"storybook": "^10.4.0",
"tailwindcss": "^3.4.19",
"typescript": "^5.9.3",
"vite": "^8.0.10",
"vitest": "^4.1.0"
},
"overrides": {
"picomatch": "^4.0.4",
"lodash": ">=4.18.0"
}
}