CI run 455/456 surfaced:
src/features/player/components/AudioVisualizer.tsx(22,8): error TS2307:
Cannot find module '@veza/design-system/tokens-generated' or its
corresponding type declarations.
Root cause: the sprint 2 design-system migration (commits a25ad2e0 →
ab923def) replaced manual src/ exports with Style Dictionary output in
packages/design-system/dist/. That `dist/` is gitignored — by design,
since it's generated artifact — but no step in the CI workflows runs
the generator before tsc/vite/vitest fire.
apps/web imports `@veza/design-system/tokens-generated`, which the
package's `exports` field maps to `./dist/tokens.ts`. With dist/ empty
on a fresh checkout, the import resolves to undefined → TS2307.
Two-pronged fix:
(1) packages/design-system/package.json — add a `prepare` script that
runs Style Dictionary. npm fires `prepare` after `npm install`
AND `npm ci`, so any workspace install populates dist/ without an
extra workflow change. Also covers fresh dev clones.
(2) .github/workflows/{ci.yml,e2e.yml} — explicit
`npm run build:tokens --workspace=@veza/design-system` step
immediately after `npm ci`. Belt-and-suspenders against any npm
version where `prepare` is silent or filtered (lifecycle script
skipping has burned us before — `--ignore-scripts` flags, etc.).
Verified locally:
$ rm -rf packages/design-system/dist/
$ npm run build:tokens --workspace=@veza/design-system
✓ Style Dictionary build complete.
$ cd apps/web && npx tsc --noEmit
(clean)
SKIP_TESTS=1 — config-only changes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
BREAKING CHANGE: bumped to v3.0.0.
Deleted (entire orphan tree, 0 consumers across apps/web):
- src/tokens/{colors,typography,spacing,motion,index}.ts (replaced by
generated dist/tokens.{css,ts} from tokens/*.json)
- src/components/index.ts (unused component name registry)
- src/utils.ts (cn helper — apps/web has its own at @/lib/utils)
- src/index.ts (barrel)
This removes the third contradictory palette source (the v4.0 colors.ts
that had vermillion #b83a1e as accent — never documented anywhere).
Updated:
- package.json: removed main/types/exports for src/, kept only ./tokens.css
+ ./tokens-generated. Removed clsx/tailwind-merge/typescript deps (unused).
- README.md: rewritten to reflect token-only architecture, Option B palette
documented (UI cyan unique + data viz pigments), points to CHARTE_GRAPHIQUE
+ DECISIONS_IDENTITE for brand source of truth.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Kill the drift in 9 components that hardcoded #7c9dd6/#d4634a/#7a9e6c/#c9a84c
(the 4 viz pigments) by referencing tokens generated from
packages/design-system/tokens/ (single source of truth).
apps/web/src/index.css now imports @veza/design-system/tokens.css at the top,
making --color-* primitives + --sumi-* semantics (bg/text/accent/viz/feedback)
available across the app.
Migrated:
- charts/{BarChart,LineChart,PieChart}.tsx — defaults use var(--sumi-viz-*)
- analytics/TrackAnalyticsView.tsx — JSX inline backgroundColor uses var()
- developer/SwaggerUI.tsx — CSS-in-JS uses var()
- ui/WaveformVisualizer.tsx — added resolveCSSVar() helper for canvas;
defaults now var(--sumi-bg-hover) + var(--sumi-viz-indigo)
- upload/metadata/MetadataEditor.tsx — passes var() to WaveformVisualizer
- player/AudioVisualizer.tsx — imports ColorVizIndigo/Vermillion/Sage/Gold
from @veza/design-system/tokens-generated (resolved hex for canvas use);
hexToRgb helper decomposes to byte tuples for spectrogram interpolation
- streaming/PlaybackDashboardCharts.tsx — passes var() to LineChart props
packages/design-system/package.json: added "./tokens-generated" export
pointing to dist/tokens.ts (TS exports of resolved hex values for canvas
contexts that need them).
Stats: 32 → 13 hardcoded hex literals (4 pigments) across apps/web/src.
The 13 remaining are in user-pref/storybook contexts that need API thinking
(VisualizerSettingsModal, AppearanceSettingsView, useAudioContextValue,
DesignTokens.stories.tsx) — tracked as Sprint 2 follow-up.
Build: vite build OK (13s). Typecheck OK.
SKIP_TESTS=1: pre-existing LazyDmca mock test failure (legal/dmca feature
in flight on main) unrelated to this commit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Remove packages/design-system/ directory (superseded by SUMI tokens
in apps/web/src/index.css, confirmed no imports exist)
- Update package.json keywords from kodo-design-system to sumi-design-system
- Create docs/STORYBOOK_CONTRACT.md defining mandatory story structure:
Default, Loading, Error, Empty states for feature components
- Typography audit: SUMI utility classes defined in index.css, codebase
correctly uses Tailwind classes with SUMI tokens via @theme — no
migration needed
Co-authored-by: Cursor <cursoragent@cursor.com>