Skip to content

feat(theme): rebuild the XP theme — Luna chrome, face and Start panel - #8

Draft
doodlewind wants to merge 2 commits into
mainfrom
fix/xp-luna-chrome
Draft

feat(theme): rebuild the XP theme — Luna chrome, face and Start panel#8
doodlewind wants to merge 2 commits into
mainfrom
fix/xp-luna-chrome

Conversation

@doodlewind

@doodlewind doodlewind commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Supersedes #6 (closed). The xp theme painted flat approximations of Luna and
kept Windows 98's bones underneath. Every raised Luna surface is a gel — a
bright two-pixel crown, a dark plateau, a lifting seat, a dark closing line —
and three gradient stops cannot hold that shape.

Chrome. The theme boundary now also carries paint-only layer tables:
absolutely positioned strips the chrome renders before a surface's content. Two
of them buy corner-selective rounding the single radius prop cannot express —
a rounded cap over a square body gives windows Luna's rounded top and square
bottom, and the Start button's rounded body overhangs its overflow-hidden
container so it meets the screen edge square. Colors are sampled from a 96dpi
Luna capture, row by row: window frame (1px border, 2px band, 1px light client
ring, caption edge to edge under the border, drop shadow, square corners while
maximized), caption crown/plateau/seat, 21px gel controls, taskbar crown and
seat, gel task buttons, the notification area's own cyan gradient, menus in
Luna's #aca899 and #316ac5, and a desktop of sky with a grass band fading
in over it.

Caption glyphs. Drawn instead of gridded — filled quads and rects in a 16px
tile, so the close mark's diagonals carry analytic coverage instead of
stair-stepping. The screenshot capture also bakes its pak at density 2 like the
macOS plan does, so docs/*.png stop showing 1x art upscaled.

Face. Luna's Tahoma and Trebuchet MS are Microsoft's, so the theme bakes the
vendored Inter (OFL, attributed in THIRD_PARTY.md) into two new atlas slots
and keeps its coverage instead of thresholding it the way the W95FA bitmap face
needs. A theme maps text roles onto slots (fontSlot), read by UiText,
measure and the wrap helpers, so a switch reflows every string; menu-bar hit
widths are re-measured in the incoming face. spec.ts caps the atlas at 24
slots and Classic holds three, so Luna's xl role lands on its bold face.

Start panel. The button drops its mark for Luna and opens the XP panel: user
header, a programs column with All Programs pinned at its foot, a places column,
and Turn Off Computer in the bottom strip. Both panels come out of one pure
layout (wm.ts startLayout) driven by Start metrics — Classic sets its header
and footer to zero and gets its rail back — so paint and hit testing cannot
drift apart, and flyouts anchor off the same row rectangles.

Classic 98 Windows XP
classic xp

Validation

  • bun run check (typecheck, 50 unit, 4 sim, 3 wrap)
  • bun run capture; Classic's render is unchanged apart from its 16px icons
    sharpening at the new capture density
  • caption, frame, taskbar and Start-button columns diffed against the reference
    capture row by row
  • confirmed on the native gpui host (bun run macos), not only the simulator

🤖 Generated with Claude Code

Every raised Luna surface is a gel: a bright two-pixel crown, a dark
plateau, a lifting seat and a dark closing line. Three gradient stops
cannot hold that shape, so the XP theme painted flat approximations —
rounded window bottoms, a start button with no crown, menus outlined in
one blue line.

The theme boundary now also carries paint-only layer tables: absolutely
positioned strips the chrome renders before a surface's content. Two of
them make corner-selective rounding the single `radius` prop cannot:
a rounded cap over a square body gives windows Luna's rounded top and
square bottom, and the Start button's rounded body overhangs its
overflow-hidden container so it meets the screen edge square. Classic
returns empty tables everywhere and renders byte-identically.

Chrome rebuilt against colors sampled from a 96dpi Luna capture:

- window frame: 1px outer border, 2px band, 1px light client ring, the
  caption edge-to-edge under the border (new `captionTop` metric), a
  drop shadow, and square corners while maximized
- caption: crown, plateau, seat and two closing lines; 21px gel controls
  with a white ring, an inner rim and 10px glyphs on a 16px tile
- taskbar: dark top line, 4px crown, seated bottom; gel task buttons;
  the notification area with its own cyan gradient and divider
- Start button: green gel with a translucent crown that keeps the
  button's own corner radius
- menus and the Start panel: white with Luna's #aca899 border, #316ac5
  highlights, single separators and a drop shadow
- desktop: sky gradient with a grass band fading in over it

Verified against docs/xp-theme.png, the sim harness and the native gpui
host; docs/classic-theme.png is unchanged.
Four things still read as Windows 98 wearing Luna's colors: the caption
marks were pixel grids that stair-stepped at 2x, the Start button carried
the Pocket mark, every string was the W95FA bitmap face, and the Start
menu was a 98 rail with a green stripe.

Caption glyphs are drawn instead of gridded — filled quads and rects in a
16px tile, so the close mark's diagonals carry analytic coverage. The
screenshot capture now bakes its pak at density 2 like the macOS plan
does, so `docs/*.png` stop showing 1x art upscaled (Classic's snapped
W95FA is unchanged by that; only its 16px icons sharpen).

Luna's own Tahoma and Trebuchet MS cannot be redistributed, so the theme
bakes the vendored Inter (OFL) into two new slots and keeps its coverage
instead of thresholding it the way the bitmap face needs. A theme now maps
text roles onto slots (`fontSlot`), which UiText, `measure` and the wrap
helpers all read, so a switch reflows every string; menu-bar hit widths
are re-measured in the incoming face. spec.ts caps the atlas at 24 slots
and Classic holds three, so Luna's `xl` role lands on its bold face.

The Start button drops its mark for Luna and opens the XP panel: user
header, a programs column with All Programs pinned at its foot, a places
column, and Turn Off Computer in the strip along the bottom. Both panels
come out of one pure layout (`wm.ts startLayout`) driven by Start metrics
— Classic sets its header and footer to zero and gets its rail back — so
paint and hit testing cannot drift apart, and the flyouts anchor off the
same row rectangles.

Verified with `bun run check`, `bun run capture` and the native gpui host.
@doodlewind doodlewind changed the title fix(theme): rebuild the XP chrome from Luna measurements feat(theme): rebuild the XP theme — Luna chrome, face and Start panel Aug 23, 2026
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