Skip to content

fix(pages): ALTER PAGE/SNIPPET SET RenderMode on a dynamic text (port of mendixlabs/mxcli#1229) - #1382

Merged
ako merged 3 commits into
mainfrom
claude/mxcli-pr-1229-review-p61q1r
Oct 15, 2026
Merged

ako merged 3 commits into
mainfrom
claude/mxcli-pr-1229-review-p61q1r

Conversation

@ako

@ako ako commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Ports mendixlabs#1229 (fixes mendixlabs#1228) onto current main. The upstream PR was cut from a months-old base and conflicts in 6 of its 8 files.

The bug

alter page P { set (RenderMode: H2) on <dynamictext> } is refused with "not a property of this built-in widget". CREATE PAGE and REPLACE accept RenderMode on a dynamic text, and the MCP backend's mutator already sets it. The MPR mutator's setRawWidgetPropertyMut had no rendermode case, so the key fell through to the pluggable-property setter.

The fix (MendixMau's, unchanged)

The new rendermode case applies only when the stored $Type is Forms$DynamicText. The value is matched case-insensitively against Text, Paragraph and H1–H6 and stored in its canonical spelling. Any other value is refused, listing the accepted set, before the document is touched. Other widgets keep the previous route.

Changes against the upstream PR

  • Syntax: docs, mxcli syntax page.alter, the alter-page skill and the bug-test script use set (Key: value), not the deprecated set Key = value (MDL-DEPR101). The bug-test script is also upgraded to the mdl 1; form (create or modify, Params: ( … ), ContentParams: ( … ), terminating ;) so TestConformanceGate accepts it.
  • Finding: it's its own file, findings/mdl-backend/2026-10-15-alter-set-rendermode-dynamictext.json, instead of an append to the merged-back mdl-backend.jsonl.
  • Docs wording: the quick reference no longer claims every other widget gets an error naming the allowed set. Only a bad value on a dynamic text does.
  • Separate commit: adds row 34 to the /mxcli-dev:review Recurring Findings table, about upstream PRs cut from a stale base.

Testing

  • The new pagemutator tests fail on unmodified main and pass with the fix.
  • The bug-test script was run on a copy of testdata/pedapp (Mendix 11.13.0). exec applies it and describe shows H2, Paragraph and H4. The binary without the fix refuses the first alter with "not a property of this built-in widget".
  • RenderMode: H7 is refused with the accepted list under the reference check and under --no-check. Nothing is written to the project either way.
  • make test, make lint and make check-findings pass. After merging current main, the pagemutator, syntax and conformance tests were re-run.
  • Not run here: mx check and the runtime check (no mxbuild in this environment). The upstream author reports, on 11.12.2: 0 errors from mx check, and an H5 heading rendering as <h5>.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NDLRXjMy1B18Cj3nX5RuCX

claude and others added 3 commits October 15, 2026 14:22
Port of mendixlabs#1229 (closes mendixlabs#1228) onto current
main.

`alter page P { set (RenderMode: H2) on <dynamictext> }` was refused as "not
a property of this built-in widget", although CREATE PAGE and REPLACE accept
RenderMode on a dynamictext and the MCP backend's mutator already sets it.
setRawWidgetPropertyMut had no case for it, so it fell through to the
pluggable-property setter.

Add a RenderMode case dispatched on the stored $Type (Forms$DynamicText): the
value is validated case-insensitively against Text, Paragraph and H1-H6 and
written in its canonical spelling; anything else is refused with the accepted
list, leaving the document untouched. Other widgets keep the previous path.

Changes against the upstream PR:
- docs, syntax help and the bug-test script use `set (Key: value)` instead
  of the deprecated `set Key = value` (MDL-DEPR101); the bug-test script is
  upgraded to the `mdl 1;` form so the conformance gate accepts it
- the finding is its own file under findings/mdl-backend/ instead of an
  append to the merged-back mdl-backend.jsonl
- the quick reference no longer claims every other widget gets an error
  naming the allowed set; only a bad value on a dynamic text does

Tested: the new pagemutator tests fail on unmodified main and pass with the
change. Bug-test script against a copy of testdata/pedapp (Mendix 11.13.0):
exec applies it and describe shows H2, Paragraph, H4; the unfixed binary
refuses the first alter. H7 is refused by check and by --no-check exec, with
nothing written. make test, make lint and make check-findings pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NDLRXjMy1B18Cj3nX5RuCX
@ako ako changed the title docs(review): recurring finding for upstream PRs cut from a stale base fix(pages): ALTER PAGE/SNIPPET SET RenderMode on a dynamic text (port of mendixlabs/mxcli#1229) Oct 15, 2026
@ako
ako merged commit 4f94594 into main Oct 15, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ALTER PAGE / ALTER SNIPPET cannot SET RenderMode on a dynamic text ("not a property of this built-in widget")

3 participants