Island SSR: spreads work, CSS classes render, context primitive registered
Root causes: - make-spread/spread?/spread-attrs were stubbed (always false/empty) → now create/detect/unwrap Spread values properly - "context" primitive missing from Sx_primitives registry → CEK deref frame handler couldn't read reactive scope stacks Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -565,8 +565,21 @@ let make_server_env () =
|
||||
| [Component c] -> Env c.c_closure
|
||||
| [Island i] -> Env i.i_closure
|
||||
| _ -> Dict (Hashtbl.create 0));
|
||||
bind "spread?" (fun _args -> Bool false);
|
||||
bind "spread-attrs" (fun _args -> Dict (Hashtbl.create 0));
|
||||
bind "spread?" (fun args ->
|
||||
match args with [Spread _] -> Bool true | _ -> Bool false);
|
||||
bind "spread-attrs" (fun args ->
|
||||
match args with
|
||||
| [Spread pairs] ->
|
||||
let d = Hashtbl.create 4 in
|
||||
List.iter (fun (k, v) -> Hashtbl.replace d k v) pairs;
|
||||
Dict d
|
||||
| _ -> Dict (Hashtbl.create 0));
|
||||
bind "make-spread" (fun args ->
|
||||
match args with
|
||||
| [Dict d] ->
|
||||
let pairs = Hashtbl.fold (fun k v acc -> (k, v) :: acc) d [] in
|
||||
Spread pairs
|
||||
| _ -> Nil);
|
||||
bind "is-html-tag?" (fun args ->
|
||||
match args with
|
||||
| [String s] -> Bool (Sx_render.is_html_tag s)
|
||||
|
||||
Reference in New Issue
Block a user