Rename all 1,169 components to path-based names with namespace support

Component names now reflect filesystem location using / as path separator
and : as namespace separator for shared components:
  ~sx-header → ~layouts/header
  ~layout-app-body → ~shared:layout/app-body
  ~blog-admin-dashboard → ~admin/dashboard

209 files, 4,941 replacements across all services.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 22:00:12 +00:00
parent de80d921e9
commit b0920a1121
209 changed files with 4620 additions and 4620 deletions

View File

@@ -6,14 +6,14 @@
;; --- Demo components with different affinities ---
(defcomp ~aff-demo-auto (&key (label :as string?))
(defcomp ~affinity-demo/aff-demo-auto (&key (label :as string?))
(div :class "rounded border border-stone-200 bg-white p-4"
(div :class "flex items-center gap-2 mb-2"
(span :class "inline-block w-2 h-2 rounded-full bg-stone-400")
(span :class "text-sm font-mono text-stone-500" ":affinity :auto"))
(p :class "text-stone-800" (or label "Pure component — no IO calls. Auto-detected as client-renderable."))))
(defcomp ~aff-demo-client (&key (label :as string?))
(defcomp ~affinity-demo/aff-demo-client (&key (label :as string?))
:affinity :client
(div :class "rounded border border-blue-200 bg-blue-50 p-4"
(div :class "flex items-center gap-2 mb-2"
@@ -21,7 +21,7 @@
(span :class "text-sm font-mono text-blue-600" ":affinity :client"))
(p :class "text-blue-800" (or label "Explicitly client-rendered — even IO calls would be proxied."))))
(defcomp ~aff-demo-server (&key (label :as string?))
(defcomp ~affinity-demo/aff-demo-server (&key (label :as string?))
:affinity :server
(div :class "rounded border border-amber-200 bg-amber-50 p-4"
(div :class "flex items-center gap-2 mb-2"
@@ -29,27 +29,27 @@
(span :class "text-sm font-mono text-amber-600" ":affinity :server"))
(p :class "text-amber-800" (or label "Always server-rendered — auth-sensitive or secret-dependent."))))
(defcomp ~aff-demo-io-auto ()
(defcomp ~affinity-demo/aff-demo-io-auto ()
(div :class "rounded border border-red-200 bg-red-50 p-4"
(div :class "flex items-center gap-2 mb-2"
(span :class "inline-block w-2 h-2 rounded-full bg-red-400")
(span :class "text-sm font-mono text-red-600" ":affinity :auto + IO"))
(p :class "text-red-800 mb-3" "Auto affinity with IO dependency — auto-detected as server-rendered.")
(~doc-code :code (highlight "(render-target name env io-names)" "lisp"))))
(~docs/code :code (highlight "(render-target name env io-names)" "lisp"))))
(defcomp ~aff-demo-io-client ()
(defcomp ~affinity-demo/aff-demo-io-client ()
:affinity :client
(div :class "rounded border border-violet-200 bg-violet-50 p-4"
(div :class "flex items-center gap-2 mb-2"
(span :class "inline-block w-2 h-2 rounded-full bg-violet-400")
(span :class "text-sm font-mono text-violet-600" ":affinity :client + IO"))
(p :class "text-violet-800 mb-3" "Client affinity overrides IO — calls proxied to server via /sx/io/.")
(~doc-code :code (highlight "(component-affinity comp)" "lisp"))))
(~docs/code :code (highlight "(component-affinity comp)" "lisp"))))
;; --- Main page component ---
(defcomp ~affinity-demo-content (&key components page-plans)
(defcomp ~affinity-demo/content (&key components page-plans)
(div :class "space-y-8"
(div :class "border-b border-stone-200 pb-6"
(h1 :class "text-2xl font-bold text-stone-900" "Affinity Annotations")
@@ -59,9 +59,9 @@
" function in deps.sx combines the annotation with IO analysis to produce a per-component boundary decision."))
;; Syntax
(~doc-section :title "Syntax" :id "syntax"
(~docs/section :title "Syntax" :id "syntax"
(p "Add " (code ":affinity") " between the params list and the body:")
(~doc-code :code (highlight "(defcomp ~my-component (&key title)\n :affinity :client ;; or :server, or omit for :auto\n (div title))" "lisp"))
(~docs/code :code (highlight "(defcomp ~affinity-demo/my-component (&key title)\n :affinity :client ;; or :server, or omit for :auto\n (div title))" "lisp"))
(p "Three values:")
(ul :class "list-disc pl-5 text-stone-700 space-y-1"
(li (code ":auto") " (default) — runtime decides from IO dependency analysis")
@@ -69,18 +69,18 @@
(li (code ":server") " — always render server-side; never sent to client as SX")))
;; Live components
(~doc-section :title "Live Components" :id "live"
(~docs/section :title "Live Components" :id "live"
(p "These components are defined with different affinities. The server analyzed them at registration time:")
(div :class "space-y-4 mt-4"
(~aff-demo-auto)
(~aff-demo-client)
(~aff-demo-server)
(~aff-demo-io-auto)
(~aff-demo-io-client)))
(~affinity-demo/aff-demo-auto)
(~affinity-demo/aff-demo-client)
(~affinity-demo/aff-demo-server)
(~affinity-demo/aff-demo-io-auto)
(~affinity-demo/aff-demo-io-client)))
;; Analysis table from server
(~doc-section :title "Server Analysis" :id "analysis"
(~docs/section :title "Server Analysis" :id "analysis"
(p "The server computed these render targets at component registration time:")
(div :class "overflow-x-auto rounded border border-stone-200"
(table :class "w-full text-left text-sm"
@@ -114,7 +114,7 @@
components)))))
;; Decision matrix
(~doc-section :title "Decision Matrix" :id "matrix"
(~docs/section :title "Decision Matrix" :id "matrix"
(div :class "overflow-x-auto rounded border border-stone-200"
(table :class "w-full text-left text-sm"
(thead (tr :class "border-b border-stone-200 bg-stone-100"
@@ -155,7 +155,7 @@
(td :class "px-3 py-2 text-stone-600" "Both affinity and IO say server"))))))
;; Per-page render plans
(~doc-section :title "Page Render Plans" :id "plans"
(~docs/section :title "Page Render Plans" :id "plans"
(p "Phase 7b: render plans are pre-computed at registration time for each page. The plan maps every component needed by the page to its render target.")
(when (> (len page-plans) 0)
@@ -184,7 +184,7 @@
page-plans))))
;; How it integrates
(~doc-section :title "How It Works" :id "how"
(~docs/section :title "How It Works" :id "how"
(ol :class "list-decimal list-inside text-stone-700 space-y-2"
(li (code "defcomp") " parses " (code ":affinity") " annotation between params and body")
(li "Component object stores " (code "affinity") " field (\"auto\", \"client\", or \"server\")")
@@ -201,6 +201,6 @@
(p :class "font-semibold text-amber-800" "How to verify")
(ol :class "list-decimal list-inside text-amber-700 space-y-1"
(li "View page source — components with render-target \"server\" are expanded to HTML")
(li "Components with render-target \"client\" appear as " (code "(~name ...)") " in the SX wire format")
(li "Components with render-target \"client\" appear as " (code "(~plans/content-addressed-components/name ...)") " in the SX wire format")
(li "Navigate away and back — client-routable pure components render instantly")
(li "Check the analysis table above — it shows live data from the server's component registry")))))