paperclip/ui
scotttong a9399a4d21 refactor(ui): extract color literals to tokens (Phase 2 batch 1/4)
Mechanical, codemod-driven extraction of hardcoded hex/rgb/rgba color
literals in ui/src/components/** and ui/src/pages/** (including their
*.test.tsx companions) into CSS custom-property tokens in
ui/src/index.css, per DESIGN.md's Phase 2 extraction contract. Zero
visual change: verified against the Phase 0 Storybook snapshot
baseline.

- 69 sites rewritten across 31 files (Tailwind bracket hex classes,
  inline style={{ backgroundColor/color: ... }} literals, and
  bg-[gradient(...)] arbitrary values).
- 41 new tokens minted verbatim in a new non-@theme :root block
  (17 --hex-*, 24 --gradient-extract-*), 2 existing-token reuses
  (--status-task-in_progress, --status-task-done — exact
  case-insensitive match, mode-independent, no .dark override).
- 8 files allowlisted with inline `token-extraction: allowlisted`
  comments for functional/third-party literals that must stay
  hardcoded (xterm.js theme config, <input type="color"> value,
  color-picker seed state persisted to a create payload, a
  persisted/compared skill.color palette, a contrast-math fallback,
  a runtime-computed canvas fillStyle, and a half-migrated
  var(--x, fallback) pattern left for a human decision).
- Codemod script (scripts/codemod-extract-colors.mjs) uses a fixed,
  hand-audited site table rather than a blind hex regex, since a
  naive regex false-positives on strings like "acme/web#241".
- Bug caught by the visual suite and fixed before commit: gradient
  token values initially kept Tailwind's bracket-arbitrary-value
  underscore-for-space escaping (e.g. circle_at_top), which is
  invalid inside a real CSS custom property; converted back to
  literal spaces.

Verify: rg gate clean outside the allowlist; pnpm build-storybook
exit 0; Storybook visual snapshot suite 510/510 passed; pnpm
typecheck exit 0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:17:05 -07:00
..
public [codex] Bundle UI webfonts with the app (#9020) 2026-07-06 11:02:45 -05:00
src refactor(ui): extract color literals to tokens (Phase 2 batch 1/4) 2026-07-06 14:17:05 -07:00
storybook storybook: primitive coverage stories + deterministic-render fixes 2026-07-06 13:48:17 -07:00
README.md
components.json
index.html
package.json Add browser SSH terminal for custom image setup (#8911) 2026-07-03 16:44:21 -07:00
tsconfig.json
vite.config.ts
vitest.config.ts
vitest.setup.ts

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.