* feat(workbench-ui): design system v1 scaffold * fix(workbench): close R1 (GroundingSource enum coverage) + R4 (digest test) R1 — Promote GroundingSource to a typed Literal in core/epistemic_state.py so it has the same single-source-of-truth shape as ReviewState. The existing epistemic_state_for_grounding_source() function already enumerates the six labels (pack, teaching, vault, partial, oov, none); this codifies them. scripts/dump-enums.py now snapshots GroundingSource via the existing literal_values helper. workbench-ui's enumCoverage.test.ts gains a fourth assertion that the badge mapping matches the Python source 1:1. Adding a grounding-source value on the Python side without updating the badge fails the build-time test loud — same discipline as the other three enums. R4 — Add an explicit DigestBadge test to StableJsonViewer.test.tsx: asserts the badge text matches the SHA-256 prefix of the source bytes, and clicking the badge copies the FULL digest (not the truncated prefix). Recomputes the expected digest via crypto.subtle to avoid hard-coding a hex string that could drift. R2 (component-level reduced-motion enforcement), R3 (EmptyState copy-CLI affordance), and R5 (`uv run core` packaging paper cut) are deferred — R2/R3 become meaningful with W-027/W-029, R5 is a packaging-layer concern outside this PR's scope. Validation: - pnpm test: 19 passed (was 17, +1 enum coverage, +1 digest test) - pnpm build: clean - pnpm test:enum-coverage: 4 passed - core test --suite smoke -q: 67 passed
45 lines
1.4 KiB
JSON
45 lines
1.4 KiB
JSON
{
|
|
"name": "core-workbench-ui",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"prebuild": "pnpm generate:tokens",
|
|
"build": "tsc -b && vite build",
|
|
"dev": "vite --host 127.0.0.1",
|
|
"preview": "vite preview --host 127.0.0.1",
|
|
"test": "vitest run",
|
|
"test:enum-coverage": "pnpm enum:snapshot && vitest run src/design/components/badges/enumCoverage.test.ts",
|
|
"generate:tokens": "tsx scripts/generate-tokens.ts",
|
|
"enum:snapshot": "cd .. && uv run python scripts/dump-enums.py > workbench-ui/enum-snapshot.json"
|
|
},
|
|
"dependencies": {
|
|
"@radix-ui/react-dialog": "1.1.15",
|
|
"@radix-ui/react-popover": "1.1.15",
|
|
"@radix-ui/react-slot": "1.2.3",
|
|
"class-variance-authority": "0.7.1",
|
|
"clsx": "2.1.1",
|
|
"lucide-react": "0.468.0",
|
|
"react": "18.3.1",
|
|
"react-dom": "18.3.1",
|
|
"tailwind-merge": "2.6.0"
|
|
},
|
|
"devDependencies": {
|
|
"@testing-library/jest-dom": "6.6.3",
|
|
"@testing-library/react": "16.1.0",
|
|
"@testing-library/user-event": "14.5.2",
|
|
"@types/node": "22.10.2",
|
|
"@types/react": "18.3.17",
|
|
"@types/react-dom": "18.3.5",
|
|
"@vitejs/plugin-react": "4.3.4",
|
|
"autoprefixer": "10.4.20",
|
|
"happy-dom": "15.11.7",
|
|
"postcss": "8.4.49",
|
|
"tailwindcss": "3.4.17",
|
|
"tsx": "4.19.2",
|
|
"typescript": "5.7.2",
|
|
"vite": "5.4.11",
|
|
"vitest": "2.1.8"
|
|
},
|
|
"packageManager": "pnpm@9.15.0"
|
|
}
|