From 48d493e9cc4f752c928e5ab1293c4061dbe3a9bc Mon Sep 17 00:00:00 2001 From: giles Date: Sat, 14 Mar 2026 11:57:40 +0000 Subject: [PATCH] Fix init.sx: move out of component directory to avoid server-side eval init-client.sx contains browser-only code (dom-listen, collect! cssx). It was in sx/sx/ which load_sx_dir scans and evaluates server-side, causing "Undefined symbol: dom-listen". Move to sx/init-client.sx which is outside the component load path. Co-Authored-By: Claude Opus 4.6 (1M context) --- sx/app.py | 2 +- sx/{sx/init.sx => sxc/init-client.sx.txt} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename sx/{sx/init.sx => sxc/init-client.sx.txt} (100%) diff --git a/sx/app.py b/sx/app.py index 12cb008..6499893 100644 --- a/sx/app.py +++ b/sx/app.py @@ -71,7 +71,7 @@ def create_app() -> "Quart": # sx docs uses custom highlight.py, not Prism; body.js is for legacy apps # Load init SX from file — styles + nav behavior, no inline Python strings import os as _os - _init_path = _os.path.join(_os.path.dirname(__file__), "sx", "init.sx") + _init_path = _os.path.join(_os.path.dirname(__file__), "sxc", "init-client.sx.txt") with open(_init_path) as _f: _init_sx = _f.read() app.config["SX_SHELL"] = { diff --git a/sx/sx/init.sx b/sx/sxc/init-client.sx.txt similarity index 100% rename from sx/sx/init.sx rename to sx/sxc/init-client.sx.txt