SX request handler + AJAX nav + shared JIT globals + shell cleanup
- Remove prism.js, sweetalert2, body.js, sx-browser.js from shell — only WASM kernel (sx_browser.bc.wasm.js + sx-platform.js) loads - Restore request-handler.sx integration: SX handles routing + AJAX detection, OCaml does aser → SSR → shell render pipeline - AJAX fragment support: SX-Request header returns content fragment (~14KB) instead of full page (~858KB), cached with "ajax:" prefix - Fix language/applications/etc page functions to return empty fragment instead of nil (was causing 404s) - Shared JIT VM globals: env_bind hook mirrors ALL bindings to a single shared globals table — eliminates stale-snapshot class of JIT bugs - Add native `parse` function for components that need SX parsing - Clean up unused shell params (sx-js-hash, body-js-hash, head-scripts, body-scripts, use-wasm) from shell.sx, helpers.py, and server.ml 14/32 Playwright tests pass (navigation, SSR, isomorphic, geography). Remaining failures are client-side (WASM bytecode 404s block hydration). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
(content)
|
||||
(if (nil? content) (quote (~docs-content/home-content)) content)))
|
||||
|
||||
(define language (fn (content) (if (nil? content) nil content)))
|
||||
(define language (fn (content) (if (nil? content) (quote (<>)) content)))
|
||||
|
||||
(define
|
||||
geography
|
||||
@@ -32,9 +32,11 @@
|
||||
(content)
|
||||
(if (nil? content) (quote (~geography/index-content)) content)))
|
||||
|
||||
(define applications (fn (content) (if (nil? content) nil content)))
|
||||
(define
|
||||
applications
|
||||
(fn (content) (if (nil? content) (quote (<>)) content)))
|
||||
|
||||
(define etc (fn (content) (if (nil? content) nil content)))
|
||||
(define etc (fn (content) (if (nil? content) (quote (<>)) content)))
|
||||
|
||||
(define hypermedia (fn (content) (if (nil? content) nil content)))
|
||||
|
||||
@@ -668,11 +670,24 @@
|
||||
"/plan-"
|
||||
"-content"))
|
||||
|
||||
(define capabilities (fn (&key title &rest args) (quasiquote (~geography/capabilities-content))))
|
||||
(define
|
||||
capabilities
|
||||
(fn
|
||||
(&key title &rest args)
|
||||
(quasiquote (~geography/capabilities-content))))
|
||||
|
||||
(define modules (fn (&key title &rest args) (quasiquote (~geography/modules-content))))
|
||||
(define
|
||||
modules
|
||||
(fn (&key title &rest args) (quasiquote (~geography/modules-content))))
|
||||
|
||||
(define eval-rules (fn (&key title &rest args) (quasiquote (~geography/eval-rules-content))))
|
||||
(define
|
||||
eval-rules
|
||||
(fn (&key title &rest args) (quasiquote (~geography/eval-rules-content))))
|
||||
|
||||
|
||||
(define sxtp (make-page-fn "~applications/sxtp/content" "~applications/sxtp/" nil "-content"))
|
||||
(define
|
||||
sxtp
|
||||
(make-page-fn
|
||||
"~applications/sxtp/content"
|
||||
"~applications/sxtp/"
|
||||
nil
|
||||
"-content"))
|
||||
|
||||
Reference in New Issue
Block a user