Add sx:ready hydration signal, eliminate test sleeps

boot-init now sets data-sx-ready on <html> and dispatches an sx:ready
CustomEvent after all islands are hydrated. Playwright tests use this
instead of networkidle + hard-coded sleeps (50+ seconds eliminated).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-30 12:47:52 +00:00
parent fffb5ab0b5
commit e14947cedc
12 changed files with 131 additions and 137 deletions

View File

@@ -431,4 +431,10 @@
(sx-hydrate-islands nil)
(run-post-render-hooks)
(process-elements nil)
(dom-listen (dom-window) "popstate" (fn (e) (handle-popstate 0))))))
(dom-listen (dom-window) "popstate" (fn (e) (handle-popstate 0)))
(dom-set-attr
(host-get (dom-document) "documentElement")
"data-sx-ready"
"true")
(dom-dispatch (dom-document) "sx:ready" nil)
(log-info "sx:ready"))))