fix(smart-forms): allow visibility placeholders - #95
Conversation
AI ReviewRelaxes Checklist
U5 detail: S4 detail: Ran Issues found[warning — U6] key := value[2 : len(value)-2]
return strings.TrimSpace(key) != "" && !strings.ContainsAny(key, "{}")
Suggested fix — tighten the guard to reject keys that contain any whitespace: return key == strings.TrimSpace(key) && key != "" && !strings.ContainsAny(key, "{}")None of the test cases cover this variant, so the current test suite cannot catch the regression if pong-server behaviour ever diverges. [warning — U6] PR description claims The PR body states the change covers "nested and This is low-risk for the bug being fixed, but the phrasing in the PR description overstates coverage. Consider either:
This review was generated automatically. A human maintainer should still make the merge decision. |
AI ReviewRe-review after synchronize: relaxes Checklist
U5 detail: S4 detail: Issues found[warning — U6] The PR description and both docs files state that the fix "applies to … items expanded from However, no test exercises a section that uses both Fixed since last review ✅
This review was generated automatically. A human maintainer should still make the merge decision. |
AI ReviewRe-review after synchronize: relaxes Checklist
U5 detail: S4 detail: Issues foundNo issues found. Fixed since last review ✅
This review was generated automatically. A human maintainer should still make the merge decision. |
What & why
pushSmartFormrejected page configs that used a pure{{viewModelKey}}placeholder forvisibility, although pong-server resolves that field before the page reaches the CDU renderer.This change accepts pure visibility placeholders for forms, sections, and rendered items in
header,modalHeader, andcontent, including nested andcontentLoopitems. Malformed, embedded, and multiple placeholders remain invalid. The unsupported sectionfooterslot is deliberately not broadened.The Smart Form skill and CDU protocol reference now distinguish server-side visibility binding from client-side reactive visibility.
Type of change
Checklist
make build && make vet && make testpass locallymake discoveryproduces no diffplugins/simulator/docs/.envcommitted; TLS behaviour is unchangedCHANGELOG.md→UnreleasedNotes for reviewers
Verified against pong-server template rendering: form and section visibility are injected explicitly, while rendered item properties are injected recursively. Placeholder values must resolve to
visible,disabled, orhidden.