paperclip/ui
scotttong be63424987 refactor(ui): extract size/spacing/radius/shadow values to tokens (Phase 2 batch 3/4)
Batch 3/4 of the design-token extraction (design/token-extraction). Replaces
hardcoded Tailwind arbitrary-bracket values for width/height/min/max,
padding/margin/gap/inset/translate, radius (incl. directional), ring/outline
width, and box-shadow in ui/src/components/** and ui/src/pages/** (including
*.test.tsx companions) with references to new CSS custom-property tokens in
ui/src/index.css. Zero visual change, proven by the Phase 0 Storybook
snapshot baseline.

Counts:
- 407 sites rewritten across 140 files (127 component/page + 13 test files
  updated in lockstep with the components they assert against).
- 163 new tokens minted: 127 --sz-* (one shared family across
  width/height/spacing/gap/inset/translate lengths, including 42
  --sz-calc-N compound calc()/min()/max()/clamp() expressions and 2
  --sz-safe-* env(safe-area-inset-*) wrappers), 8 --rad-* (shared across
  radius/ring-width/outline-width), 5 --pct-* (incl. --pct-neg-50 kept
  distinct per the source bracket's own negative sign), 23
  --shadow-extract-* (38 sites, deduped by exact value).
- 11 var()-only passthrough sites (--radix-*-trigger-width/height,
  --new-issue-dialog-height) rewritten to the bare paren form with no new
  token minted, per DESIGN.md's runtime-library-variable special case.
- 3 sites resolved Tailwind's build-time calc(theme(spacing.N)-Mpx) into a
  byte-equivalent runtime calc() (components/IssueRow.tsx), verified via
  headless-browser computed-style comparison against the pre-change built
  CSS.
- 2 sites skipped/allowlisted: rounded-[inherit] (CSS keyword, not a
  literal) and drop-shadow-[...] (different utility than this batch's
  shadow-[...] mandate) — logged as a Needs-human-decision item.

Three gotchas found and fixed during verification (all documented in the
codemod header and TOKEN-AUDIT.md's Batch 3 log): a boundary regex bug that
false-positived inside Tailwind's own slide-out-to-top-[1%] compound
utility, a calc()-operator-spacing bug that could corrupt
env(safe-area-inset-*) identifiers, and a generated-CSS-comment bug where a
literal "*/" substring in prose silently dropped the entire token block
from the compiled CSS (root cause of an initial 222-test snapshot failure,
fully resolved to 510/510 passing).

Verify: rg gates clean, pnpm build-storybook exit 0, Storybook visual
snapshot suite 510/510 (509 clean + 1 known-benign flaky retry), pnpm
typecheck exit 0, codemod re-run confirmed idempotent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:15:08 -07:00
..
public [codex] Bundle UI webfonts with the app (#9020) 2026-07-06 11:02:45 -05:00
src refactor(ui): extract size/spacing/radius/shadow values to tokens (Phase 2 batch 3/4) 2026-07-06 15:15:08 -07:00
storybook storybook: primitive coverage stories + deterministic-render fixes 2026-07-06 13:48:17 -07:00
README.md [codex] add comprehensive UI Storybook coverage (#4132) 2026-04-20 12:13:23 -05:00
components.json Overhaul UI with shadcn components and new pages 2026-02-17 09:07:32 -06:00
index.html feat(ui): default to system prefers-color-scheme for first-time visitors (supersedes part of #3732) (#5873) 2026-06-12 14:03:54 -07:00
package.json Add browser SSH terminal for custom image setup (#8911) 2026-07-03 16:44:21 -07:00
tsconfig.json [codex] add comprehensive UI Storybook coverage (#4132) 2026-04-20 12:13:23 -05:00
vite.config.ts [codex] fix worktree dev dependency ergonomics (#3743) 2026-04-15 09:47:29 -05:00
vitest.config.ts Add sandbox environment support (#4415) 2026-04-24 12:15:53 -07:00
vitest.setup.ts feat(ui): NUX rework behind enableConferenceRoomChat experimental flag — capsule onboarding, conference-room chat, unified composer (#8000) 2026-06-11 16:32:55 -05:00

README.md

@paperclipai/ui

Published static assets for the Paperclip board UI.

What gets published

The npm package contains the production build under dist/. It does not ship the UI source tree or workspace-only dependencies.

Storybook

Storybook config, stories, and fixtures live under ui/storybook/.

pnpm --filter @paperclipai/ui storybook
pnpm --filter @paperclipai/ui build-storybook

Typical use

Install the package, then serve or copy the built files from node_modules/@paperclipai/ui/dist.