fix(visual): deterministic baselines + vendored lit (WHYNOT-WP-0002 T11)

Regenerate the four whynot-control visual baselines against the T06 token
regen, and make the harness render deterministically:

- serve.json (cleanUrls:false): serve was 301-redirecting /…/index.html and
  stripping the trailing slash, shifting the document base so every relative
  asset 404'd (also broke `pnpm showcase` in a browser).
- examples/whynot-control/index.html: token stylesheet pointed at a
  non-existent root path; repoint to ../../src/styles/colors_and_type.css so
  the page actually loads the T06 tokens.
- examples/vendor/lit.js: vendor a self-contained esbuild lit bundle and point
  the showcase importmap at it, removing the multi-hop live esm.sh dependency.
- tests/visual/ui-kit.spec.mjs: abort the unused Google-Fonts CDN (fonts are
  system-ui post-IBM-Plex); a hung font request blocked module execution.

The showcase "every component" test is marked test.fixme: that page wedges the
renderer main thread (a demo composition loops) and has never produced a
baseline. Tracked as WHYNOT-WP-0002-T11. Components + vendored lit render fine
in isolation; the four control baselines pass deterministically.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-26 21:08:06 +02:00
parent 0d688ca94a
commit 0f96736bb7
12 changed files with 102 additions and 5 deletions

View File

@@ -35,6 +35,25 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Version
(`--status-error/warn/success/info` + `-bg`) were added. **Visual change — Playwright
baselines need review + `pnpm test:visual:update`.**
### Fixed
- **Visual-regression harness now renders deterministically.** Regenerated the four
`examples/whynot-control` baselines against the new tokens. Along the way:
- `serve.json` (`cleanUrls:false`) — the static server was 301-redirecting
`/…/index.html` to a trailing-slash-stripped URL, shifting the document base and
404'ing every relative asset (also broke `pnpm showcase` in the browser).
- `examples/whynot-control/index.html` — token stylesheet linked a non-existent
root path; repointed to `../../src/styles/colors_and_type.css` so the page picks
up the design tokens.
- `examples/vendor/lit.js` — vendored a self-contained esbuild bundle of `lit` and
pointed the showcase importmap at it, replacing the multi-hop live esm.sh module
graph (regen command noted in the showcase importmap comment).
- `tests/visual/ui-kit.spec.mjs` — abort the (unused, post-IBM-Plex) Google-Fonts
CDN in tests; a hung font request was blocking module execution and `load`.
- The `showcase` "every component" visual test is `test.fixme` pending
**WHYNOT-WP-0002-T11** — that page wedges the renderer main thread (a demo
composition loops); the four control baselines are unaffected.
## [0.2.0] — 2026-05-25
**Architectural reframe.** The system is now delivered as three stacked layers — tokens + CSS, Lit web components, optional framework adapters. The previous React-only component layer has been removed.