feat(ui): lift the window-level roles into the shared tokens
Merged
CH
4d ago+331+331+012345678901234567890123456789-294-294-012345678901234567890123456789
Phase 2, T1: the roles the desktop and web defined for themselves, which @luke/ui already read or which keep coming back, are now shared tokens. Every reader uses the shared name.
New tokens
Profiles (desktop and web set the same values for each)
--luke-z-menu20,--luke-z-dialog30,--luke-z-tooltip30,--luke-z-toast31.dialog.cssandtooltip.cssno longer read the app's own--z-*with a fallback.--luke-focus-ring-width/offset/inset/reach/room. These were defined in the desktop'sbase.cssand read by@luke/uiwith a2pxfallback.--luke-menu-glyph(16px, moved out of the.luke-menuscope) and--luke-menu-shadow. The menu, the tooltip card and the diff-settings popover now read the shadow token.--luke-page-measure720px, read by DetailPage, CollectionPage and the desktop's documents (was--reading-width).--luke-settings-measure640px, read by SettingsPage and the desktop's--settings-widthreaders.--luke-list-gap(space-2) and--luke-type-reading-leading1.6. The reading leading is used by the web body text and the desktop's two code blocks.
Palettes (desktop light-dark(), web light and dark)
--luke-color-well,--luke-color-sidebar(light#f3f3f4, dark = overlay#111114),--luke-color-sidebar-ink--luke-color-attention-filland--luke-color-on-attention(was the attention mark's ground and ink)--luke-color-ink-inverse(words on a text-coloured fill: the composer's submit button and the primary sign-in button)--luke-color-identity-1..6now come in light/dark pairs; the light values are the desktop's light workspace hues--luke-color-chart-1(was the web's--chart-1)
What moved
- Workspace hues are now the identity roles, and the workspace tile's ink is
--luke-color-on-identity. --settings-row-heightis now--luke-settings-row-min-height.--sidebar-row-lineis now--luke-type-label-leading. Both had the same value.- Desktop
--desktop-well/--desktop-sidebar/--sidebar-ink/--list-gap/--menu-*/--reading-width/--z-*/--focus-ring-*, and the web's--chart-1: every reader moved and every definition is deleted. No aliases remain. - The
--actor-sizeladder is left for S19 (it is more than a trivial swap).
Visible changes
- Avatar discs in light appearance (desktop and web light pages): the six identity hues shift to the light workspace hues they now share, e.g.
#4f63b8ā#4a5fc0. The difference is a few RGB steps. Dark appearance and workspace tiles look the same as before.
I added no screenshots because nothing else changes on screen. No layout changes.
Tests
tokens.test.tsalready checks that both profiles and every palette set the same set of names and that everyvar(--luke-*)a sheet reads is defined. It passes with the new roles. CSS-only otherwise, so no new behaviour tests.pnpm check:affectedpasses.
Not verified on a Mac.
š¤ Generated with Claude Code
Summary by cubic
Lifts the window-level roles the desktop and web defined locally into @luke/ui's shared profiles and palettes; every reader now uses the shared names, and the local definitions and aliases are deleted.
New tokens
- Profiles:
--luke-z-menu/dialog/tooltip/toast,--luke-focus-ring-*,--luke-menu-glyphand--luke-menu-shadow,--luke-page-measureand--luke-settings-measure,--luke-list-gap,--luke-type-reading-leading. - Palettes:
--luke-color-well,--luke-color-sidebarand--luke-color-sidebar-ink,--luke-color-attention-filland--luke-color-on-attention,--luke-color-ink-inverse, identity hues now in light/dark pairs,--luke-color-chart-1.
Side effects
- The terminal's ground is now hard-coded per appearance because xterm cannot read a
light-dark()value. - Avatar discs in light appearance shift a few RGB steps to the light identity hues; nothing else changes on screen.
- All retired local names were removed, including the desktop alias block; no compatibility names remain.