ReviewOS

also looking at this

stacks/ts-analytics

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

#120
Merged glennmichael123 wants to merge chore/migrate-text-to-mustache into main
31 files +179 -171
9 days ago

Resolves #119.

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). This repo already uses in 220+ places; this brings the remaining x-text/:text bindings onto the same convention.

Changes

  • ~152 x-text/:text bindings → across 29 resources views/components. Every site sits on/under a client x-for/:if and reads a signal, derived, or loop var.
  • Bumps @stacksjs/{stx,components}, bun-plugin-stx to ^0.2.72 (the migration depends on it).

Not touched

  • Pre-existing in <option>/<title> left exactly as-is (text-only elements).
  • StatsRow's <div x-text="statValue(stat.id)">—</div> keeps x-text — it has a meaningful em-dash SSR fallback and the expression carries no inline default.
  • No :html/x-html in this repo; no server @foreach/@if bindings touched.

Verification

Rendered the touched pages (FiltersBar, StatsRow, base layout, plus SettingsTab/ErrorDetail) through processDirectives — the framework's render path: all process cleanly, with zero invalid <option><span> / <title><span> and no net change to any text-only element. 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

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

Sign in to comment on this pull request.