Skip to content

J1: refuse raw values at type check #217

Closed

Description

@wab

Parent

#212 (PRD: website redesign v2, delivery steps J1 to J6)

What to build

After this ticket, a raw colour, radius, shadow or font size in app/ fails pnpm typecheck. CI runs that check on every PR.

  • Replace the about 240 raw values in app/ with tokens. Most are border widths and letter spacings. A value with no fitting token uses Panda's '[value]' escape hatch.
  • Turn on strictTokens in the Panda config.
  • Add a typecheck job to the CI workflow. It runs pnpm typecheck after pnpm prepare.
  • Add the strictTokens rule and the escape hatch rule to the design system section of CLAUDE.md.
  • Fix two bugs on the /design-system showcase page while cleaning app/:
    • app/components/design-system/borders-section.tsx: bleft: ' coral' has a leading space, so the coral border never renders. strictTokens rejects it anyway.
    • app/components/design-system/form-section.tsx: the Select's Label points to email_error, the email input's id. Give the Select its own id and point the label to it.

Fallback, from ADR 0002: if the escape hatch becomes the common case, strictTokens goes off again. A CI script then checks raw colours, off-scale radii and shadows, and inline display fonts. The PR reports the escape hatch count so the maintainer can judge.

Acceptance criteria

  • strictTokens is on and pnpm typecheck passes.
  • A raw value added to a component fails pnpm typecheck (checked by hand, not committed).
  • The CI workflow has a typecheck job, green on this PR.
  • The PR lists every escape hatch with its reason, and their total count.
  • The coral border shows on /design-system, and the Select label targets the Select.
  • Any page whose look changes because a raw value snapped to a token is added to the checklist from J1: design system v2 values on every page #216 (J1: design system v2 values on every page) and reviewed on the preview.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, AFK-ready for an agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions