Skip to content

chore(tokens): migrate hardcoded hex colors to design tokens - #19

Open
juancarlosbs wants to merge 7 commits into
mainfrom
chore/migrate-hex-to-tokens
Open

chore(tokens): migrate hardcoded hex colors to design tokens#19
juancarlosbs wants to merge 7 commits into
mainfrom
chore/migrate-hex-to-tokens

Conversation

@juancarlosbs

Copy link
Copy Markdown
Owner

Resolves the tech debt deferred from PR #15 (CodeRabbit finding on docs/ui.md): three components carried hardcoded hex colors in violation of the token-only styling convention.

Spec: docs/superpowers/specs/2026-07-27-hex-to-tokens-design.md · Plan: docs/superpowers/plans/2026-07-27-hex-to-tokens.md

  • Four new tokens in src/App.css (@theme): --color-env-development/staging/production/neutral, keeping the exact traffic-light values the dots already use.
  • New envDotClass() helper in src/lib/envColor.ts replaces the environment-color map that was duplicated in EnvSelector and SettingsDialog; dots now use bg-env-* classes instead of inline styles.
  • EnvSelector, SettingsDialog, and WorkspaceSwitcher migrated to existing surface tokens (bg-card, bg-secondary, border-border, bg-sidebar-accent) — all value-identical swaps.
  • Only visual change: the SettingsDialog sidebar background #141414bg-sidebar (#18181b), an imperceptible shift approved in the spec to avoid a single-use token.
  • Docs: --env-* family added to docs/stack.md and docs/ui.md.

Verification: hex sweep over src/ (excluding App.css/assets) returns empty · pnpm test 111 passed · tsc --noEmit clean · vite build output confirmed to contain the generated bg-env-* utilities. Built task-by-task with per-task review plus a final whole-branch review (clean).

🤖 Generated with Claude Code

https://claude.ai/code/session_013r5tZbG4bjfbK1aqj1SyzQ

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.

1 participant