refactor(desktop): remove the desktop's compatibility token aliases
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.cssandterminal/index.cssmove from--space-8,--text-primary,--hairline,--raised,--danger,--font-monoand 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.cssmaps--font-monoto--luke-font-mono. Before, thefont-monoutility (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 anddocs/DESIGN.mdnow say the desktop reads the roles directly, and DESIGN.md's desktop sections use the role names. - Nothing outside
apps/desktopread a desktop alias:@luke/uiand 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.
| Light | Dark | |
|---|---|---|
| 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











