refactor(desktop): remove the desktop's compatibility token aliases

Merged
CH
2d ago
+980-1046

Z01, the first PR of the Completion stack. It is based on main.

Scope

F02 added packages/ui/src/tokens/legacy.css. It kept each app's old token names as aliases of the shared --luke-* roles so existing callers kept working. Every desktop surface has now migrated. This PR moves the desktop's remaining reads of the old names onto the roles, then deletes the desktop's alias block.

What changes

  • About 930 reads in 17 desktop files now use the role directly. base.css, desktop.css, tasks.css, settings.css, issues.css, shortcut.css, tooltip.css, tailwind.css and terminal/index.css move from --space-8, --text-primary, --hairline, --raised, --danger, --font-mono and the rest to the role each alias pointed at, e.g. --luke-space-8, --luke-color-text, --luke-color-border. The Tailwind arbitrary utilities (gap-(--control-gap), pt-(--section-gap), text-(color:--text-tertiary)), the terminal's font token and the code comments that named old tokens are updated too.
  • tailwind.css maps --font-mono to --luke-font-mono. Before, the font-mono utility (used by streamdown's code) got the shared face only through the deleted alias. Without this mapping it would fall back to Tailwind's default stack.
  • The desktop block is gone from legacy.css. The site's block stays for Z02. The file's header and docs/DESIGN.md now say the desktop reads the roles directly, and DESIGN.md's desktop sections use the role names.
  • Nothing outside apps/desktop read a desktop alias: @luke/ui and the catalog already used the roles. The web block's names are untouched.

Visible changes

None.

Evidence

Throwaway harness, not committed. It dumps the real DesktopShell markup from jsdom for four surfaces:

  • Home with the sidebar
  • Settings › Profile
  • Settings › Appearance
  • Settings › Keyboard shortcuts

It dumps once on main and once on this branch. Headless Chrome then draws each dump over that side's built dist/renderer/styles.css at 1280×840, in light and dark.

  • The markup is identical on both sides.
  • Every computed style except custom properties is identical on all 1,206 elements, in both themes (0 differences).
  • The 16 screenshots are byte-identical between before and after.
LightDark
home before
home after
settings-account before
settings-account after
settings-shortcuts before
settings-shortcuts after

(The harness has no window chrome or real layout height, so the sidebar ends where its content does.)

Tests

No behaviour changes, so there are no new tests. Existing tests pass. pnpm check:affected exits 0.

Not verified on a Mac

  • The real packaged window: vibrancy, traffic lights, SF fonts.
  • Surfaces outside the four drawn above. They read the same renamed tokens through the same mechanical rename.

🤖 Generated with Claude Code