c0665ba58e
Adopt Step 7 language features across SX codebase
...
112 conversions across 19 .sx files using match, let-match, and pipe operators:
match (17): type/value dispatch replacing cond/if chains
- lib/vm.sx: HO form dispatch (for-each/map/filter/reduce/some/every?)
- lib/tree-tools.sx: node-display, node-matches?, rename, count, replace, free-symbols
- lib/types.sx: narrow-type, substitute-in-type, infer-type, resolve-type
- web/engine.sx: default-trigger, resolve-target, classify-trigger
- web/deps.sx: scan-refs-walk, scan-io-refs-walk
let-match (89): dict destructuring replacing (get d "key") patterns
- shared/page-functions.sx (20), blog/admin.sx (17), pub-api.sx (13)
- events/ layouts/page/tickets/entries/forms (27 total)
- specs-explorer.sx (7), federation/social.sx (3), lib/ small files (3)
-> pipes (6): replacing triple-chained gets in lib/vm.sx
- frame-closure → closure-code → code-bytecode chains
Also: lib/vm.sx accessor upgrades (get vm "sp" → vm-sp vm throughout)
2650/2650 tests pass, zero regressions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-04 20:49:02 +00:00
b0920a1121
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 >
2026-03-12 22:00:12 +00:00
51ebf347ba
Move events/market/blog composition from Python to .sx defcomps (Phase 9)
...
Continues the pattern of eliminating Python sx_call tree-building in favour
of data-driven .sx defcomps. POST/PUT/DELETE routes now pass plain data
(dicts, lists, scalars) and let .sx handle iteration, conditionals, and
layout via map/let/when/if. Single response components wrap OOB swaps.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-05 08:17:09 +00:00
57a31a3b83
Convert all 23 register_custom_layout calls to register_sx_layout across 6 services
...
Layout defcomps are now fully self-contained via IO-primitive auto-fetch
macros, eliminating Python layout functions that manually threaded context
values through SxExpr wrappers.
Services converted:
- Federation (1 layout): social
- Blog (7 layouts): blog, blog-settings, blog-cache, blog-snippets,
blog-menu-items, blog-tag-groups, blog-tag-group-edit
- SX docs (2 layouts): sx, sx-section
- Cart (2 layouts): cart-page, cart-admin + orders/order-detail
- Events (9 layouts): calendar-admin, slots, slot, day-admin, entry,
entry-admin, ticket-types, ticket-type, markets
- Market (2 layouts): market, market-admin
New IO primitives added to shared/sx/primitives_io.py:
- federation-actor-ctx, cart-page-ctx, request-view-args
- events-calendar-ctx, events-day-ctx, events-entry-ctx,
events-slot-ctx, events-ticket-type-ctx
- market-header-ctx (pre-builds desktop/mobile nav as SxExpr)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-04 22:21:44 +00:00
7fda7a8027
Replace env free-variable threading with IO-primitive auto-fetch macros
...
Build and Deploy / build-and-deploy (push) Successful in 1m38s
Layout components now self-resolve context (cart-mini, auth-menu, nav-tree,
rights, URLs) via new IO primitives (root-header-ctx, select-colours,
account-nav-ctx, app-rights) and defmacro wrappers (~root-header-auto,
~auth-header-row-auto, ~root-mobile-auto). This eliminates _ctx_to_env(),
HELPER_CSS_CLASSES, and verbose :key threading across all 10 services.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-04 18:20:57 +00:00
715df11f82
Phase 8-9: Convert events + sx layouts, add missing JS primitives
...
Events (Phase 8):
- Create events/sx/layouts.sx with 18 defcomps for all 9 layout pairs
- Convert all layout functions to render_to_sx_with_env + _ctx_to_env
- Convert 5 render functions to eliminate root_header_sx calls
- Zero root_header_sx references remain in events
SX Docs (Phase 9):
- Create sx/sx/layouts.sx with layout defcomps
- Convert 4 layout functions to render_to_sx_with_env + _ctx_to_env
JS primitives:
- Add slice, replace, upper, lower, trim, escape, strip-tags, split,
join, pluralize, clamp, parse-int, format-decimal, format-date,
parse-datetime, split-ids, starts-with?, ends-with?, dissoc, into
- Fix contains? for strings (indexOf instead of in operator)
- Prevents "Undefined symbol" errors when .sx expressions using
server-side primitives are evaluated client-side
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-04 15:27:41 +00:00