Skip to content

refactor(ui): tighten design system governance - #416

Merged
Astro-Han merged 3 commits into
apache:mainfrom
somewan820:codex/design-system-governance
Jul 1, 2026
Merged

refactor(ui): tighten design system governance#416
Astro-Han merged 3 commits into
apache:mainfrom
somewan820:codex/design-system-governance

Conversation

@somewan820

Copy link
Copy Markdown
Contributor

Summary

  • Tighten the design system governance from issue chore(ui): design system refactor — close gap with Craft Agents #406 by separating primary CTA semantics from accent usage.
  • Add the radius token vocabulary: control, surface, modal, and pill, with the 12px ceiling documented.
  • Remove default decorative entrance animation while keeping intentional state/feedback motion tokens.
  • Add design governance contract tests and Storybook token/animation catalog stories to prevent regressions.

Tests

  • npm run typecheck
  • npm --workspace @maka/ui test
  • npm --workspace @maka/desktop run build-storybook
  • npm --workspace @maka/desktop run build:main && node --test apps/desktop/dist/main/__tests__/design-system-governance-406-contract.test.js apps/desktop/dist/main/__tests__/ chat-preview-cascade-contract.test.js apps/desktop/dist/main/__tests__/chat-tool-card-cascade-contract.test.js apps/desktop/dist/main/__tests__/radius-converge-contract.test.js apps/desktop/dist/main/__tests__/motion-token-converge-contract.test.js
  • npm test

@Astro-Han

Copy link
Copy Markdown
Contributor

Pushed c1b80dc with the review-response changes.

Covered:

  • expanded motion governance to scan packages/ui/src/**/*.{ts,tsx} plus renderer CSS, with only functional motion allowlisted;
  • added the 1px ring through --shadow-maka-panel so Dialog and Select still have a visible edge;
  • changed gap 5 to action / control tokens instead of flipping primary to foreground, with light/dark contrast contracts;
  • replaced the touched chat.tsx arbitrary radius values with radius tokens;
  • split token stories into Colors, Radius, and Primary Actions, tightened Colors, labeled Animation samples, and redesigned Radius so labels do not overlap.

Verified with npm run typecheck, npm test, the design-system/storybook contracts, and npm run -w @maka/desktop build-storybook. I also checked the Radius story in desktop and narrow iframe views.

- Redesign Colors story: semantic groups (base colors, emphasis aliases,
  foreground scale) with usage annotations per swatch
- Fix Radius story: preview blocks were white-on-white (invisible in light
  mode); switch to foreground-filled blocks with contrast text
- Redesign PrimaryActions story: cover all 6 variants, disabled states,
  and size+icon combinations instead of only 3 variants
- Darken --action (L 0.52 → 0.46) to separate from --control (L 0.52),
  giving three distinct greens: accent (garnish) > control (checked) > action (CTA)
- P2: narrow radius test name from 'single radius token vocabulary' to
  'radius tokens for preview card surfaces' — reflects actual coverage
- P3: fix motion allowlist substring match (includes) to exact match (Set.has)
  so 'maka-pulse-enter-card' is correctly rejected
- P3: remove snapshot-lite assertions from storybook baseline contract
  (wordBreak, gridTemplateColumns, fontSize, '6px', 'Action primary')
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.

2 participants