From 652e7f81c86f47e3c2d5aaafeff55bac08e9d6da Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 6 Mar 2026 12:57:17 +0000 Subject: [PATCH] Add Isomorphism as top-level section in sx-docs Move isomorphic architecture roadmap and bundle analyzer from Plans into their own top-level "Isomorphism" section. The roadmap is the default page at /isomorphism/, bundle analyzer at /isomorphism/bundle-analyzer. Plans section retains reader macros and SX-Activity. Co-Authored-By: Claude Opus 4.6 --- sx/sx/layouts.sx | 1 + sx/sx/nav-data.sx | 8 +++---- sx/sx/plans.sx | 4 ++-- sx/sxc/pages/docs.sx | 57 +++++++++++++++++++++++++++++++++----------- 4 files changed, 50 insertions(+), 20 deletions(-) diff --git a/sx/sx/layouts.sx b/sx/sx/layouts.sx index 6c5efbb..817f450 100644 --- a/sx/sx/layouts.sx +++ b/sx/sx/layouts.sx @@ -14,6 +14,7 @@ (dict :label "Essays" :href "/essays/") (dict :label "Specs" :href "/specs/") (dict :label "Bootstrappers" :href "/bootstrappers/") + (dict :label "Isomorphism" :href "/isomorphism/") (dict :label "Plans" :href "/plans/")))) (<> (map (lambda (item) (~nav-link diff --git a/sx/sx/nav-data.sx b/sx/sx/nav-data.sx index 2d75117..093cb9a 100644 --- a/sx/sx/nav-data.sx +++ b/sx/sx/nav-data.sx @@ -102,11 +102,11 @@ (dict :label "call/cc" :href "/specs/callcc") (dict :label "Deps" :href "/specs/deps"))) +(define isomorphism-nav-items (list + (dict :label "Roadmap" :href "/isomorphism/") + (dict :label "Bundle Analyzer" :href "/isomorphism/bundle-analyzer"))) + (define plans-nav-items (list - (dict :label "Isomorphic Architecture" :href "/plans/isomorphic-architecture" - :summary "Making the server/client boundary a sliding window — per-page bundles, smart expansion, SPA routing, client IO, streaming suspense.") - (dict :label "Bundle Analyzer" :href "/plans/bundle-analyzer" - :summary "Live per-page component dependency analysis — see which components each page needs and the payload savings.") (dict :label "Reader Macros" :href "/plans/reader-macros" :summary "Extensible parse-time transformations via # dispatch — datum comments, raw strings, and quote shorthand.") (dict :label "SX-Activity" :href "/plans/sx-activity" diff --git a/sx/sx/plans.sx b/sx/sx/plans.sx index 7e2a34b..5212469 100644 --- a/sx/sx/plans.sx +++ b/sx/sx/plans.sx @@ -625,7 +625,7 @@ (div :class "flex items-center gap-2 mb-2" (span :class "inline-block px-2 py-0.5 rounded text-xs font-bold bg-green-600 text-white uppercase" "Complete") (a :href "/specs/deps" :class "text-green-700 underline text-sm font-medium" "View canonical spec: deps.sx") - (a :href "/plans/bundle-analyzer" :class "text-green-700 underline text-sm font-medium" "Live bundle analyzer")) + (a :href "/isomorphism/bundle-analyzer" :class "text-green-700 underline text-sm font-medium" "Live bundle analyzer")) (p :class "text-green-900 font-medium" "What it enables") (p :class "text-green-800" "Per-page component bundles instead of sending every definition to every page. Smaller payloads, faster boot, better cache hit rates.")) @@ -677,7 +677,7 @@ (li "15 dedicated tests: scan, transitive closure, circular deps, compute-all, components-needed") (li "Bootstrapped output verified on both host targets") (li "Full test suite passes with zero regressions") - (li (a :href "/plans/bundle-analyzer" :class "text-violet-700 underline" "Live bundle analyzer") " shows real per-page savings on this app")))) + (li (a :href "/isomorphism/bundle-analyzer" :class "text-violet-700 underline" "Live bundle analyzer") " shows real per-page savings on this app")))) ;; ----------------------------------------------------------------------- ;; Phase 2 diff --git a/sx/sxc/pages/docs.sx b/sx/sxc/pages/docs.sx index 78829b0..944ea4b 100644 --- a/sx/sxc/pages/docs.sx +++ b/sx/sxc/pages/docs.sx @@ -387,6 +387,49 @@ :bootstrapper-source bootstrapper-source :bootstrapped-output bootstrapped-output)))) +;; --------------------------------------------------------------------------- +;; Isomorphism section +;; --------------------------------------------------------------------------- + +(defpage isomorphism-index + :path "/isomorphism/" + :auth :public + :layout (:sx-section + :section "Isomorphism" + :sub-label "Isomorphism" + :sub-href "/isomorphism/" + :sub-nav (~section-nav :items isomorphism-nav-items :current "Roadmap") + :selected "Roadmap") + :content (~plan-isomorphic-content)) + +(defpage isomorphism-page + :path "/isomorphism/" + :auth :public + :layout (:sx-section + :section "Isomorphism" + :sub-label "Isomorphism" + :sub-href "/isomorphism/" + :sub-nav (~section-nav :items isomorphism-nav-items + :current (find-current isomorphism-nav-items slug)) + :selected (or (find-current isomorphism-nav-items slug) "")) + :content (case slug + "bundle-analyzer" (~bundle-analyzer-content + :pages pages :total-components total-components :total-macros total-macros) + :else (~plan-isomorphic-content))) + +(defpage bundle-analyzer + :path "/isomorphism/bundle-analyzer" + :auth :public + :layout (:sx-section + :section "Isomorphism" + :sub-label "Isomorphism" + :sub-href "/isomorphism/" + :sub-nav (~section-nav :items isomorphism-nav-items :current "Bundle Analyzer") + :selected "Bundle Analyzer") + :data (bundle-analyzer-data) + :content (~bundle-analyzer-content + :pages pages :total-components total-components :total-macros total-macros)) + ;; --------------------------------------------------------------------------- ;; Plans section ;; --------------------------------------------------------------------------- @@ -413,20 +456,6 @@ :current (find-current plans-nav-items slug)) :selected (or (find-current plans-nav-items slug) "")) :content (case slug - "isomorphic-architecture" (~plan-isomorphic-content) "reader-macros" (~plan-reader-macros-content) "sx-activity" (~plan-sx-activity-content) :else (~plans-index-content))) - -(defpage bundle-analyzer - :path "/plans/bundle-analyzer" - :auth :public - :layout (:sx-section - :section "Plans" - :sub-label "Plans" - :sub-href "/plans/" - :sub-nav (~section-nav :items plans-nav-items :current "Bundle Analyzer") - :selected "Bundle Analyzer") - :data (bundle-analyzer-data) - :content (~bundle-analyzer-content - :pages pages :total-components total-components :total-macros total-macros))