Fix JIT compiler, CSSX browser support, double-fetch, SPA layout
JIT compiler: - Fix jit_compile_lambda: resolve `compile` via symbol lookup in env instead of embedding VmClosure in AST (CEK dispatches differently) - Register eval-defcomp/eval-defisland/eval-defmacro runtime helpers in browser kernel for bytecoded defcomp forms - Disable broken .sxbc.json path (missing arity in nested code blocks), use .sxbc text format only - Mark JIT-failed closures as sentinel to stop retrying CSSX in browser: - Add cssx.sx symlink + cssx.sxbc to browser web stack - Add flush-cssx! to orchestration.sx post-swap for SPA nav - Add cssx.sx to compile-modules.js and mcp_tree.ml bytecode lists SPA navigation: - Fix double-fetch: check e.defaultPrevented in click delegation (bind-event already handled the click) - Fix layout destruction: change nav links from outerHTML to innerHTML swap (outerHTML destroyed #main-panel when response lacked it) - Guard JS popstate handler when SX engine is booted - Rename sx-platform.js → sx-platform-2.js to bust immutable cache Playwright tests: - Add trackErrors() helper to all test specs - Add SPA DOM comparison test (SPA nav vs fresh load) - Add single-fetch + no-duplicate-elements test - Improve MCP tool output: show failure details and error messages Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1
shared/static/wasm/sx/cssx.sx
Symbolic link
1
shared/static/wasm/sx/cssx.sx
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../shared/sx/templates/cssx.sx
|
||||
3
shared/static/wasm/sx/cssx.sxbc
Normal file
3
shared/static/wasm/sx/cssx.sxbc
Normal file
File diff suppressed because one or more lines are too long
@@ -256,6 +256,25 @@
|
||||
"sx:afterSwap"
|
||||
(dict "target" target-el "swap" swap-style)))))))
|
||||
|
||||
(define
|
||||
flush-cssx!
|
||||
:effects (mutation io)
|
||||
(fn
|
||||
()
|
||||
(let
|
||||
((rules (collected "cssx")))
|
||||
(clear-collected! "cssx")
|
||||
(when
|
||||
(not (empty? rules))
|
||||
(let
|
||||
((style (dom-query "#sx-css")))
|
||||
(when
|
||||
style
|
||||
(dom-set-prop
|
||||
style
|
||||
"textContent"
|
||||
(str (dom-get-prop style "textContent") (join "" rules)))))))))
|
||||
|
||||
(define
|
||||
handle-sx-response
|
||||
:effects (mutation io)
|
||||
@@ -508,7 +527,8 @@
|
||||
(sx-hydrate root)
|
||||
(sx-hydrate-islands root)
|
||||
(run-post-render-hooks)
|
||||
(process-elements root)))
|
||||
(process-elements root)
|
||||
(flush-cssx!)))
|
||||
|
||||
(define
|
||||
process-settle-hooks
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user