Island guard in aser expansion + page helper IO tests (13 tests)
Fix: islands (defisland) pass component? check but must NEVER be expanded server-side — they use browser-only reactive primitives (signal, deref, computed). Added (not (island? comp)) guard in adapter-sx.sx aser component dispatch. New test file: shared/sx/tests/test_ocaml_helpers.py - TestHelperInjection: 5 tests — helper IO proxy, 2-arg calls, aser/aser_slot with helpers, undefined helper error - TestHelperIOPerformance: 2 tests — 20 sequential IO round-trips complete in <5s, aser_slot with 5 helpers in <3s - TestAserSlotClientAffinity: 6 tests — island exclusion, client affinity exclusion, server affinity expansion, auto affinity behavior in aser vs aser_slot eval_sx_url stays on bridge.aser() (server-affinity only) for now. Switching to aser_slot requires fixing the double-aser issue in _render_to_sx where content gets re-parsed and re-asered. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -87,6 +87,7 @@
|
||||
(and comp (macro? comp))
|
||||
(aser (expand-macro comp args env) env)
|
||||
(and comp (component? comp)
|
||||
(not (island? comp))
|
||||
(or expand-all
|
||||
(= (component-affinity comp) "server"))
|
||||
;; :affinity :client components are never expanded
|
||||
|
||||
Reference in New Issue
Block a user