ReviewOS

also looking at this

stacks/system-cleaner

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

#12
Merged glennmichael123 wants to merge chore/migrate-text-to-mustache into main
15 files +138 -147
9 days ago

Resolves #11.

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

Changes

  • 124 x-text/:text bindings → across 13 pages/components. Every site sits in a client x-data/x-for/x-show scope. I verified in a real browser (headless Chrome) that reacts inside an Alpine x-data scope — full parity with x-text (renders, matches, updates on state change) — since the framework's CDP verify only covered the signals path.
  • Bumps @stacksjs/stx from 0.2.48 to ^0.2.72 and bun-plugin-stx to ^0.2.72 (the migration depends on it; this is a 24-version jump — I render-verified the touched pages still process cleanly).

Not touched (12 sites kept as x-text)

  • Elements pairing a reactive value with a static SSR fallback child and no inline default (…(<span x-text='selected.length'>0</span>), loading ? '…' : x with a … placeholder) — x-text preserves the fallback; would blank it until hydration.
  • DiskPanel rows that deliberately dual-render (x-text override + SSR fallback content).
  • Two SVG <text> nodes — a wrapping <span> is invalid inside SVG <text> (same reason <option>/<textarea>/<title> are excluded).

Verification

Rendered updates/system/DiskPanel/CleanupPanel/TopProcesses/ExtensionsPanel through processDirectives after the version bump: all process cleanly, with zero invalid <span> inside option/text/textarea/title and pre-existing untouched.

🤖 Generated with Claude Code

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

Sign in to comment on this pull request.