Spec explorer: fix SxExpr rendering bugs, add drill-in UX, Playwright tests
Fix 3 OCaml bugs that caused spec explorer to hang: - sx_types: inspect outputs quoted string for SxExpr (not bare symbol) - sx_primitives: serialize/to_string extract SxExpr/RawHTML content - sx_render: handle SxExpr in both render-to-html paths Restructure spec explorer for performance: - Lightweight overview: name + kind only (was full source for 141 defs) - Drill-in detail: click definition → params, effects, signature - explore() page function accepts optional second arg for drill-in - spec() passes through non-string slugs from nested routing Fix aser map result wrapping: - aser-special map now wraps results in fragment (<> ...) via aser-fragment - Prevents ((div ...) (div ...)) nested lists that caused client "Not callable" 5 Playwright tests: overview load, no errors, SPA nav, drill-in detail+params Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -437,17 +437,9 @@
|
||||
(let
|
||||
((f (trampoline (eval-expr (first args) env)))
|
||||
(coll (trampoline (eval-expr (nth args 1) env))))
|
||||
(map
|
||||
(fn
|
||||
(item)
|
||||
(if
|
||||
(lambda? f)
|
||||
(let
|
||||
((local (env-merge (lambda-closure f) env)))
|
||||
(env-bind! local (first (lambda-params f)) item)
|
||||
(aser (lambda-body f) local))
|
||||
(cek-call f (list item))))
|
||||
coll))
|
||||
(let
|
||||
((results (map (fn (item) (if (lambda? f) (let ((local (env-extend (lambda-closure f)))) (env-bind! local (first (lambda-params f)) item) (aser (lambda-body f) local)) (cek-call f (list item)))) coll)))
|
||||
(aser-fragment results env)))
|
||||
(= name "map-indexed")
|
||||
(let
|
||||
((f (trampoline (eval-expr (first args) env)))
|
||||
|
||||
Reference in New Issue
Block a user