ReviewOS

stacks/wildloop

Fix broken stx bindings in shared card/input components

#983
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Problem

Several components use malformed stx syntax — empty placeholders and src="" instead of x-class/x-src/x-text. Affected: resources/views/components/{TrailCard,FeaturedTrailCard,DifficultyBadge,InputGroup}.stx (and mirrored copies in resources/components/). They're latent because the components are currently unused, but they're broken on use.

Acceptance

  • Replace /src="" with proper x-* bindings per project rules.
  • Components render correctly when used.
9 days ago

Done in ae37339.

Fixed the malformed bindings in the live component tree (resources/components/). These are <script server> components, so the correct fix is well-formed mustache interpolation — client x-* directives bind to client signals that don't exist server-side, so converting (e.g. src="" → x-src) would break rendering. Only the genuinely-malformed bindings were repaired:

  • DifficultyBadge / TrailCard: empty getDifficultyClass(difficulty) →
  • FeatureCard: bgColor →
  • InputGroup: class=" classList" → class=""
  • FeaturedTrailCard: scrambled }} difficulty difficulty-{{ delimiters → difficulty difficulty-{{ difficulty }}
  • AchievementProgress: precompute a clamped pct in script scope instead of interpolating arithmetic inside the style attribute

Verified clean (no remaining {{ }}/scrambled delimiters) and confirmed by an adversarial review pass (0 findings).

Sign in to comment on this issue.