Skip to content

Migrate legacy color token aliases to canonical semantic tokens #1957

Description

@kmcginnes

Migrate all ~117 usages of legacy color token aliases (across 64 files) to canonical semantic tokens, then delete the legacy alias section from index.css (lines 116–148).

Legacy tokens to migrate:

Legacy token Current alias target Likely canonical replacement
text-primary foreground (gray-900) text-foreground
text-secondary muted-foreground (gray-500) text-muted-foreground
background-default background (white) bg-background
background-secondary primary-subtle (brand-50) bg-primary-subtle
primary-light brand-300 evaluate per-site
primary-main primary (brand-500) bg-primary / text-primary
primary-dark primary-foreground (brand-700) text-primary-foreground
error-light red-300 evaluate per-site
error-main danger (red-500) text-danger / bg-danger
error-dark danger-foreground (red-700) text-danger-foreground
success-main success (emerald-500) text-success / bg-success
warning-main warning (amber-500) text-warning / bg-warning
background-color-default background bg-background
background-color-secondary muted (gray-100) bg-muted
background-color-secondary-subtle primary-subtle (brand-50) bg-primary-subtle
background-color-brand primary (brand-500) bg-primary
background-color-brand-hover primary-hover (brand-600) bg-primary-hover
background-color-brand-subtle primary-subtle (brand-50) bg-primary-subtle
background-color-brand-subtle-hover primary-subtle-hover (brand-100) bg-primary-subtle-hover
text-color-danger danger-foreground (red-700) text-danger-foreground
text-color-brand primary-foreground (brand-700) text-primary-foreground
border-color-input input-border (gray-300) border-input-border

Process:

  • Batch by token (one commit per legacy token or small group)
  • For each usage, choose the canonical token based on intent, not mechanical alias following
  • If a usage doesn't map cleanly to any existing semantic token, that's a gap — add a new token with justification and update the draft design.md
  • After all usages migrated, delete the entire legacy section from index.css

Acceptance Criteria

  • Zero usages of any legacy token alias in the codebase
  • Legacy alias section (lines 116–148) deleted from index.css
  • Any new tokens added are documented in draft design.md
  • pnpm checks passes
  • pnpm test passes
  • Visual verification: app looks the same

Related Issues


Important

Internal only — this issue is maintained by the core team and is not accepting external contributions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    internalSignals that the team will work on this issue internally.ready-for-agentfully specified, ready for an AFK agent

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions