Move CSSX rules to <head>, skip client-affinity components in SSR

- Shell inlines CSSX flush logic in <head> (collected/clear-collected!)
  so island CSS rules survive #main-panel morphs during SPA navigation
- OCaml render_to_html skips :affinity :client components during
  Phase 1b SSR (prevents ~cssx/flush rendering inside body-html)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-23 18:14:43 +00:00
parent 5b370b69e3
commit fe84b57bed
2 changed files with 9 additions and 2 deletions

View File

@@ -255,6 +255,7 @@ and render_list_to_html head args env =
(try
let v = env_get env name in
(match v with
| Component c when c.c_affinity = "client" -> "" (* skip client-only *)
| Component _ -> render_component v args env
| Island _i ->
(* Islands: SSR via the SX render-to-html from adapter-html.sx.