Refactor SX templates: shared components, Python migration, cleanup
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 6m0s

- Extract shared components (empty-state, delete-btn, sentinel, crud-*,
  view-toggle, img-or-placeholder, avatar, sumup-settings-form, auth
  forms, order tables/detail/checkout)
- Migrate all Python sx_call() callers to use shared components directly
- Remove 55+ thin wrapper defcomps from domain .sx files
- Remove trivial passthrough wrappers (blog-header-label, market-card-text, etc)
- Unify duplicate auth flows (account + federation) into shared/sx/templates/auth.sx
- Unify duplicate order views (cart + orders) into shared/sx/templates/orders.sx
- Disable static file caching in dev (SEND_FILE_MAX_AGE_DEFAULT=0)
- Add SX response validation and debug headers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 20:34:34 +00:00
parent 755313bd29
commit c0d369eb8e
58 changed files with 3473 additions and 1210 deletions

View File

@@ -23,15 +23,6 @@
;; Account page tickets (fragments/account_page_tickets.html)
;; ---------------------------------------------------------------------------
(defcomp ~events-frag-ticket-badge (&key state)
(cond
((= state "checked_in")
(span :class "inline-flex items-center rounded-full bg-blue-50 border border-blue-200 px-2.5 py-0.5 text-xs font-medium text-blue-700" "checked in"))
((= state "confirmed")
(span :class "inline-flex items-center rounded-full bg-emerald-50 border border-emerald-200 px-2.5 py-0.5 text-xs font-medium text-emerald-700" "confirmed"))
(true
(span :class "inline-flex items-center rounded-full bg-amber-50 border border-amber-200 px-2.5 py-0.5 text-xs font-medium text-amber-700" state))))
(defcomp ~events-frag-ticket-item (&key href entry-name date-str calendar-name type-name badge)
(div :class "py-4 first:pt-0 last:pb-0"
(div :class "flex items-start justify-between gap-4"
@@ -50,9 +41,6 @@
(h1 :class "text-xl font-semibold tracking-tight" "Tickets")
items)))
(defcomp ~events-frag-tickets-empty ()
(p :class "text-sm text-stone-500" "No tickets yet."))
(defcomp ~events-frag-tickets-list (&key items)
(div :class "divide-y divide-stone-100" items))
@@ -61,15 +49,6 @@
;; Account page bookings (fragments/account_page_bookings.html)
;; ---------------------------------------------------------------------------
(defcomp ~events-frag-booking-badge (&key state)
(cond
((= state "confirmed")
(span :class "inline-flex items-center rounded-full bg-emerald-50 border border-emerald-200 px-2.5 py-0.5 text-xs font-medium text-emerald-700" "confirmed"))
((= state "provisional")
(span :class "inline-flex items-center rounded-full bg-amber-50 border border-amber-200 px-2.5 py-0.5 text-xs font-medium text-amber-700" "provisional"))
(true
(span :class "inline-flex items-center rounded-full bg-stone-50 border border-stone-200 px-2.5 py-0.5 text-xs font-medium text-stone-600" state))))
(defcomp ~events-frag-booking-item (&key name date-str calendar-name cost-str badge)
(div :class "py-4 first:pt-0 last:pb-0"
(div :class "flex items-start justify-between gap-4"
@@ -87,8 +66,5 @@
(h1 :class "text-xl font-semibold tracking-tight" "Bookings")
items)))
(defcomp ~events-frag-bookings-empty ()
(p :class "text-sm text-stone-500" "No bookings yet."))
(defcomp ~events-frag-bookings-list (&key items)
(div :class "divide-y divide-stone-100" items))