ReviewOS

also looking at this

stacks/wildloop

Migrate :text/x-text bindings to {⁠{ }} interpolation (stx 0.2.72)

#990
Merged glennmichael123 wants to merge chore/migrate-text-to-mustache into main
50 files +611 -371
9 days ago

Resolves #989.

stx 0.2.72 fixes the long-standing bug where rendered as literal text inside client-reactive :for/:if subtrees (stacksjs/stx#1748 + multi-root setup hydration). The :text/x-text workaround this app used everywhere is no longer needed, and is the cleaner, idiomatic form.

Changes

  • 320 :text/x-text bindings → across 23 resources/views files + resources/components/nav.stx. Every site sits on/under a client :for/:if and reads a signal, derived, or loop var.
  • The two self-closing <StxLink … x-text="link.label" /> in the nav become slot content: <StxLink …></StxLink>.

Not touched

  • No :html/x-html sites in this repo.
  • No server @foreach/@if bindings; x-class/x-to/:show etc. left as-is.

Verification

Served via bun serve.ts (seed-data fallback). / and /trails return 200 (~265 KB) with every migrated preserved and cloaked for client hydration — including the nav <StxLink> slots and non-trivial expressions (activity.distance.toFixed(1), gameStats?.powerRating ?? 0, trail.elevation.toLocaleString()). Zero :text=/x-text= left in output; no processing errors. Framework-level reactive hydration of under :for/:if was independently confirmed in a real browser (headless Chrome via CDP) on stx 0.2.72.

🤖 Generated with Claude Code

50 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.