Fix spec-explorer-data: pass metadata from SX routing instead of env lookup

The helper was trying to look up all-spec-items from get_component_env(),
but that only contains defcomp/defmacro — not regular defines. Now the
SX routing layer calls find-spec and passes filename/title/desc directly.

Also adds boundary declaration for spec-explorer-data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 00:22:25 +00:00
parent 4aa2133b39
commit c5a4340293
3 changed files with 17 additions and 31 deletions

View File

@@ -352,9 +352,15 @@
:else (cond
(starts-with? slug "explore/")
(let ((spec-slug (slice slug 8 (string-length slug)))
(data (spec-explorer-data spec-slug)))
(if data
(~spec-explorer-content :data data)
(spec (find-spec spec-slug)))
(if spec
(let ((data (spec-explorer-data
(get spec "filename")
(get spec "title")
(get spec "desc"))))
(if data
(~spec-explorer-content :data data)
(~spec-not-found :slug spec-slug)))
(~spec-not-found :slug spec-slug)))
:else (let ((spec (find-spec slug)))
(if spec