The lake preview ("the joy of sx") was flashing because:
1. SSR renders preview in lake (server-only guard)
2. replaceChildren swaps island DOM (lake now empty)
3. rebuild-preview effect was either skipped or deferred (rAF/setTimeout)
4. Browser paints empty lake → visible flash
Fix: first-run effect uses queueMicrotask instead of schedule-idle.
Microtasks fire after the current synchronous code (including
replaceChildren) but BEFORE the browser paints. The lake is filled
before any frame renders with empty content.
Also restored the (when (not (client?))) lake guard — the client
can't render steps-to-preview (returns raw SX expressions that
render-to-dom shows as source text, not rendered HTML).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>