Skip to content

feat: token contract, example truth and shadcn/ui structure parity - #47

Merged
codingcodax merged 63 commits into
mainfrom
codingcodax/spec-35-compat
Oct 21, 2026
Merged

codingcodax merged 63 commits into
mainfrom
codingcodax/spec-35-compat

Conversation

@codingcodax

Copy link
Copy Markdown
Member

Closes #35
Closes #36
Closes #37
Closes #38
Closes #39
Closes #40
Closes #41
Closes #42
Closes #43
Closes #44
Closes #45
Closes #46

What this fixes

State colour never worked. success, warning and info were defined in the Base colors but never mapped in @theme, so Badge, Alert and Toast rendered colourless — and a consumer who installed a single component got no tokens at all. destructive-foreground was referenced in eight places and defined nowhere, which is why destructive-outline stayed black.

Tokens now have one source. The Base color definitions drive the light/dark declarations, the @theme colour mappings, the generated docs stylesheet and the per-item declarations, so a partial install is self-sufficient. destructive-foreground joins as the seventh state token.

Examples now show the shipped design. The two Drawer footers and the Alert Dialog footer stopped overriding the default variant, close buttons and the Sheet footer came back, status dots use state tokens instead of bg-emerald-500, and an allowlist test fails on any future override that isn't explained.

Structure parity is restored: render returned to 33 components, Alert Dialog gained Action/Cancel/Media, shadcn/ui export names exist for pure renames, InputOTP has a real indexed adapter, and toast exposes shadcn's surface on Base UI's manager. sonner is absent and explained; 15 names are Pending; data-table, typography and date-picker are Compositions; aspect-ratio and direction shipped.

Field remains a deliberate divergence — shadcn's Field is a layout wrapper, ours is Field.Root. It is documented, not aliased.

Verification

  • bun run check — clean
  • bun run check-types — clean
  • bun test — 40 pass, 0 fail, 2742 assertions
  • bun run registry:build — clean, and the new sync step is idempotent
  • Visual: 98 captures (49 Examples × 2 schemes), CI uploads them as artifacts without gating on pixel diffs
  • Review: two-axis code review plus a fix pass; every finding either fixed or explicitly rejected in the commits

Notes

  • Table is a consumer-visible behaviour change: className and render now land on the rendered element, not the inner <table>.
  • apps/web/public/r/** stays gitignored; the install suite rebuilds it.
  • ADR-0005 records the seventh token, the derived bridge and the Design/Structure split.

- autocomplete, combobox: drop upstream-removed aria labels
- segmented-control: add indicator constants and current variants
- tabs: import the indicator surface and keep reduced-motion guard
- VERSION: re-pin the four items and bump fetched revision
Assert the pin record names every catalog Port, stays ordered and carries one sha256 per row without reaching coss.com.
…label and pagination

Match upstream useRender + mergeProps plumbing on the 33 components that
lost the render prop, keeping every class string and data-slot verbatim.
Extend the render fixtures and install suite so a Consumer rendering a
Card header, Dialog footer and Table as another element typechecks.
Add InputOTP, InputOTPGroup, InputOTPSlot and InputOTPSeparator over the Base UI OTP field. The indexed slot API maps to segments via maxLength, with coss styling and labels intact.

Install fixture now typechecks a pasted shadcn/ui OTP snippet.
Merges codingcodax/t42-otp. Ticket branch predates the #39 render commits, so the merge-base is 218c994; the merge keeps spec work and applies the ticket's 3-file change only.
Context Menu, Combobox and Drawer parts now answer to shadcn/ui names. Synthesize AvatarBadge, CalendarDayButton, InputGroupButton, PopoverHeader, Select scroll buttons, buttonGroupVariants and tabsListVariants. Consumer fixture pastes each snippet and typechecks.
Add a Playwright harness that screenshots each Example's live docs preview, a manifest test that keeps coverage exact, and a non-blocking CI workflow that uploads the captures as artifacts.
Mark the preview wrapper rather than the whole card, and filter captures with VISUAL_EXAMPLES so a local run can check a few Examples first.
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ui-web Ready Ready Preview Oct 21, 2026 12:16am UTC

@codingcodax
codingcodax merged commit d7eb8ec into main Oct 21, 2026
4 checks passed
@codingcodax
codingcodax deleted the codingcodax/spec-35-compat branch October 21, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment