Fix island SSR: rename signal special form, remove cek-try swallowing

Root cause: the new conditions system's 'signal' special form shadowed
the reactive 'signal' function. (signal 0) in island bodies raised
'Unhandled condition: 0' instead of creating a signal dict.

Fix: rename condition special form to 'signal-condition' in the CEK
dispatcher. The reactive 'signal' function now works normally.

adapter-html.sx: remove cek-try that swallowed island render errors.
Islands now render directly — errors propagate for debugging.

sx_render.ml: add sx_render_to_html that calls SX adapter via CEK.

Results: 4/5 island SSR tests pass:
- Header island: logo, tagline, styled elements ✓
- Navigation buttons ✓
- Geography content ✓
- Stepper: partially renders (code view OK, ~cssx/tw in heading)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 02:07:24 +00:00
parent e1ef883339
commit d0c03a7648
5 changed files with 2468 additions and 1786 deletions

View File

@@ -532,7 +532,7 @@
(make-raw-html
(join "" (map (fn (c) (render-to-html c env)) children)))))
(let
((body-html (cek-try (fn () (render-to-html (component-body island) local)) (fn (err) "")))
((body-html (render-to-html (component-body island) local))
(state-sx (serialize-island-state kwargs)))
(str
"<span data-sx-island=\""