Files
openclaw/ui
Peter Steinberger c59ef0b40c fix(test): serve deep-link assets like the Gateway in the Control UI e2e preview server
Root cause of the checks-ui-e2e boot-stall flake (run 31867505277): the
built index.html references modules relatively (./assets/*), and the real
Gateway resolves /assets/ at any path depth (src/gateway/control-ui.ts),
but the e2e preview server let Vite's SPA fallback answer
/chat/assets/index-*.js with index.html as text/html. The browser rejects
that module silently (console-only, no pageerror), so a document reloaded
on a deep link like /chat/research never boots. Under CPU load the
harness's replaceState("/")+reload pair raced the router's redirect and
reloaded on the deep link, producing the all-null 30s poll.

- Preview server now mirrors the Gateway's depth-insensitive /assets/
  resolution; the racy replaceState canonicalization hack is deleted.
- Deterministic regression test boots a document directly on
  /chat/research; mutation-proven (fails with the middleware disabled).
- Failure diagnostics generalized: boot waits capture screenshot, script/
  resource evidence, pageErrors, and a navigation-traced event ring.

Proof: Testbox tbx_01m022feapn38ypws3mb2b9jhv saturated loops — pre-fix
2/10 failed with the exact CI signature; post-fix 0/14 at the same pace.
2026-08-15 00:12:14 -07:00
..