From bdc7e02fbcdda9e67f45dec6642018355470d60e Mon Sep 17 00:00:00 2001 From: giles Date: Mon, 29 Jun 2026 14:30:17 +0000 Subject: [PATCH] host: content-addressed SPA cache + declarative SX-htmx relate picker + SIGPIPE hardening MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three composing pieces that make the blog SPA correct and resilient. Content-addressed module cache (lib/host/static.sx, serve.sh, blog.sx shell, conformance.sh): index each web-stack .sxbc by the content hash in its head, serve GET /sx/h/{hash} immutable text/sx, and emit ") (p :style "margin-top:1.5em" (a :href (unquote (str "/" slug "/")) "view post") " · " @@ -935,7 +969,6 @@ (dream-get "/posts" host/blog-index) (dream-get "/new" host/blog-new-form) (dream-get "/tags" host/blog-tags-index) - (dream-get "/relate-picker.js" host/blog-picker-js) (dream-get "/:slug/source" host/blog-source) (dream-get "/:slug/relate-options" host/blog-relate-options) (dream-get "/:slug" host/blog-post))) diff --git a/lib/host/conformance.sh b/lib/host/conformance.sh index 422cf9eb..8a80d03d 100755 --- a/lib/host/conformance.sh +++ b/lib/host/conformance.sh @@ -76,6 +76,7 @@ MODULES=( "lib/host/auth.sx" "lib/host/sxtp.sx" "lib/host/router.sx" + "lib/host/static.sx" "lib/host/feed.sx" "lib/host/relations.sx" "lib/host/blog.sx" diff --git a/lib/host/playwright/relate-picker.spec.js b/lib/host/playwright/relate-picker.spec.js index d1decede..a0fcdade 100644 --- a/lib/host/playwright/relate-picker.spec.js +++ b/lib/host/playwright/relate-picker.spec.js @@ -1,20 +1,32 @@ // Browser check for the relate picker (lib/host/blog.sx). Runs against an // ephemeral host server seeded with a host post + 25 candidates by // run-picker-check.sh, which copies this spec into the Playwright env and sets -// SX_TEST_URL. Exercises the login redirect, the JS-driven candidate load, -// debounced filter, infinite scroll, and click-to-relate. +// SX_TEST_URL. The picker is a DECLARATIVE SX-htmx form (no client JS): the form +// GETs //relate-options on "load" and on a debounced "input", swapping the +// results