Symptom
When navigating between pages on paweldregan.com, the inverse theme briefly flashes for a split second before the correct theme settles. Per Chris's 2026-05-07 11:36 AM task drop:
"when you change pages there, it briefly shows/flashes the inverse theme for a split second, and i thought i fixed it in a stx version already, but please improve this UX issue too"
Reference
This was supposedly fixed upstream in stx via:
f34f9b7 chore: bump @stacksjs/stx to ^0.2.40 — fix theme-color flash on SPA hop in light mode(visible in paweldregan's git log as a dep bump). If the flash is reproducing on a build that genuinely uses stx ≥0.2.40, that's an upstream regression.
Diagnosis order
- Confirm paweldregan's lockfile is on stx ≥0.2.40. Check
bun.lockfor@stacksjs/stxresolved version. Also check what version is actually loaded at build time (bun pm why @stacksjs/stx). - If pinned to <0.2.40 (transitive shenanigans, override, etc.): bump it here. Verify flash is gone.
- If already ≥0.2.40: this is an stx regression. Capture a minimal repro (single-page → single-page nav, light mode, dark mode), file as an issue on
stacksjs/stx, and link back here. - Test cross-browser (Chrome + Safari at minimum — Safari handles
<meta name="theme-color">differently from Chrome). - Test in both light + dark system preferences and after manual theme toggle.
Acceptance
- No visible inverse-theme flash on SPA navigation between any of the 5 pages (
/,/about,/races,/coaching,/404) in light mode. - Same in dark mode.
- Same after manual theme toggle (theme-toggle button in nav).
- Same across en/de/pl locale switches.
- If the fix lands upstream in stx, issue closed by a
@stacksjs/stxversion bump in this repo's lockfile (no in-repo workaround).
Notes
- The recent layouts-migration commit
353e857reorganized the head; if the flash is new since that commit, the regression may be in our layout, not in stx. Worth comparing pre/post353e857behavior.