From 91cf39153b4844611374babef9380539e507378c Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 24 Mar 2026 18:39:48 +0000 Subject: [PATCH] Add promise-delayed SSR stub; fix startup JIT DISABLED noise promise-delayed is a browser-only primitive used by the resource island demo. The SSR renderer needs it as a stub to avoid "Undefined symbol" errors during render-to-html JIT compilation. The stub returns the value argument (skipping the delay), so SSR renders the resolved state immediately. Co-Authored-By: Claude Opus 4.6 (1M context) --- hosts/ocaml/bin/sx_server.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/ocaml/bin/sx_server.ml b/hosts/ocaml/bin/sx_server.ml index 1bdade7..a53415a 100644 --- a/hosts/ocaml/bin/sx_server.ml +++ b/hosts/ocaml/bin/sx_server.ml @@ -329,6 +329,8 @@ let setup_browser_stubs env = bind "dom-get-data" (fun _args -> Nil); bind "event-detail" (fun _args -> Nil); bind "promise-then" (fun _args -> Nil); + bind "promise-delayed" (fun args -> + match args with _ :: [v] -> v | _ -> Nil); bind "schedule-idle" (fun _args -> Nil); bind "dom-query" (fun _args -> Nil); bind "dom-query-all" (fun _args -> List []);