mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
Server-side preflight writes the scaffold to source before variants are ready, triggering a full Astro page reload via HMR. After reload the browser calls injectVariantsFromSource, finds the empty scaffold wrapper (no variants yet), and calls recoverEmptyCycling which destroys the session. When the agent then writes real variants and posts done, there is no active session to receive it, so the browser never enters CYCLING. Fix: in GENERATING state, an empty wrapper is expected (the agent is still writing variants). Return early without touching the session so the next HMR or done SSE can deliver the full variant set. Fixes the intermittent astro-vite7 CYCLING timeout in live-e2e smoke.