Server (sx_server.ml): - Chunked HTTP transport (Transfer-Encoding: chunked) - Streaming page detection via scan_defpages (:stream true) - Shell-first render: outer layout + shell AST → aser → SSR → flush - Data resolution: evaluate :data, render :content per slot, flush __sxResolve scripts - AJAX streaming: synchronous eval + OOB swaps for SPA navigation - SX URL → flat path conversion for defpage matching - Error boundaries per resolve section - streaming-demo-data helper for the demo page Client (sx-platform.js): - Sx.resolveSuspense: finds [data-suspense] element, parses SX, renders to DOM - Fallback define for resolve-suspense when boot.sx imports fail in WASM - __sxPending drain on boot (queued resolves from before sx.js loads) - __sxResolve direct dispatch after boot Tests (streaming.spec.js): - 5 sandbox tests using real WASM kernel - Suspense placeholder rendering, __sxResolve replacement, independent slot resolution - Full layout with gutters, end-to-end resolve with streaming-demo/chunk components Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
29 KiB
29 KiB