ReviewOS

also looking at this

stacks/bench-review

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

#67
Merged glennmichael123 wants to merge chore/migrate-text-to-mustache into main
52 files +344 -434
9 days ago

Resolves #66.

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 workaround this app used everywhere is no longer needed, and is the cleaner, idiomatic form.

Changes

  • ~345 :text bindings → across 52 resources/views + components. Every site sits on/under a client :for/:if and reads a signal, derived, or loop var.
  • Three submit buttons that paired reactive :text with a static fallback child (Notify me / Follow / Sign in to admin) now use whose else-branch carries that default; x-cloak guards the pre-hydration frame (consistent with every other reactive interpolation).

Not touched

  • 6 x-html bindings stay — they render server markdown (review.content, judge response bodies); would escape the HTML.
  • No <option>/<textarea> conversions (the runtime renders as a <span>, invalid in text-only elements).
  • No server @foreach/@if bindings; x-class/:show/etc. left as-is.

Verification

Rendered the three hand-edited buttons plus the heavily-converted ArticleView and Admin/ReviewsTable through processDirectives — the framework's own render path: all process cleanly, every preserved/cloaked for hydration, the x-html markdown bindings intact (ArticleView 2, ReviewsTable 1), and zero invalid <option><span>. 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

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

Sign in to comment on this pull request.