From 8e817e974f5bc6cda2dd2a2897320d3006890025 Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 19 Jun 2026 20:04:24 +0000 Subject: [PATCH] =?UTF-8?q?host:=20scope=20Phase=205=20=E2=80=94=20generic?= =?UTF-8?q?=20interactive=20SX-page=20serving=20(host=20SSR)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Frame the editor as one instance of a general gap: the host serves JSON + static content but cannot serve interactive SX component/island pages. Scope the generic capability — reuse the kernel's existing shell pipeline (~shared:shell/ sx-page-shell + http_inject_shell_statics + http_render_page) rather than reinvent — in 5 gated sub-steps: page-render from a handler, shell statics, static-asset serving, island hydration, editor POC. Documents why render-to-html alone fails (mangles evaluated-component attributes) and that component SSR is slow until the JIT loop lands. Modern editor = SX reactive island (defisland + signals) over a content-on-sx model; replace the legacy Lexical/Koenig editor, don't resurrect it (the POST /new ingest already speaks sx_content). Co-Authored-By: Claude Opus 4.8 --- plans/host-on-sx.md | 61 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/plans/host-on-sx.md b/plans/host-on-sx.md index afb2711b..003d3a3c 100644 --- a/plans/host-on-sx.md +++ b/plans/host-on-sx.md @@ -192,6 +192,67 @@ lib/host/sxtp.sx subsystem APIs (feed/search/commerce/… - [ ] (gated) adopt `dream-on-sx` session/CSRF ergonomics; re-home external adapters as native where replacements land. +## Phase 5 — Generic interactive SX-page serving (host SSR) + +**The generic gap.** A host serves three classes: (1) JSON/data endpoints — +DONE; (2) static content pages — DONE (`render-to-html` on *parsed* markup, e.g. +blog post `sx_content`); (3) **interactive UI pages** — component/island trees +with attributes + client behaviour — **the host cannot do this at all.** The +"editor problem" is one instance; dashboards, account, market-browse, any admin +screen are the same gap. The capability — not the editor — is the deliverable. + +**Why `render-to-html` alone is insufficient (proven).** `render-to-html` on +parsed markup handles attributes (`
`); but an *evaluated* component +tree mangles them (`(form :id ..)` → `
idpost-new-form…`) because in the +host preload tags don't collect keyword args as attrs. The `--http` docs server +already does this correctly via its component-render + shell pipeline. So: reuse +that pipeline, don't reinvent or patch per-component. + +**Reuse, don't rebuild.** The kernel already has: `~shared:shell/sx-page-shell` +(emits `` + inlined component/island defs in `