Repository navigation
fix: silent-property-drop cluster — container RenderMode, Calendar expressions, column Filterable - #1498
Merged
Conversation
A layout or page container's RenderMode was stored but describe never printed it, so it read as dropped and a describe -> exec round trip did drop it. alter set routed RenderMode only for dynamic texts and refused it on a container, and create wrote any string verbatim into the enum. Fixes mendixlabs#1582 (#1487). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPETbWEhRQ85EX4gckfCxU
The Marketplace Calendar's required editable and showEventDate expressions (defaultValue="true") failed mx check with CE0642: the mpk-generated template wrote them empty, the def generator gave a top-level expression no mapping, editable: only reached the widget-level editability (which the Calendar does not declare), and describe printed neither. The template now writes an expression's declared default, the generator maps every top-level expression by its own key (v19), editable: routes to the widget's own property when the package declares no Editability, and describe prints stored expressions. Fixes mendixlabs#1578 (#1483). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPETbWEhRQ85EX4gckfCxU
A Data grid 2 column has no Filterable property: its filter is the column's filter slot, written as a filter widget in its braces. check already refused the key, but the hint listed the column's properties (with a project) or suggested FilterType (without one). A key that starts with an item's widgets-slot key now names the slot, the body form, and the widget types it routes. Fixes the remaining part of mendixlabs#177 (#1230). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPETbWEhRQ85EX4gckfCxU
Read the store before the writer (a container's RenderMode was stored; only describe lacked it), and a builtin key can shadow a pluggable widget's own property of the same name (the Calendar's editable). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPETbWEhRQ85EX4gckfCxU
ako
pushed a commit
that referenced
this pull request
Oct 20, 2026
main is red. The merge of #1497, which removed go.mongodb.org/mongo-driver v1 from go.mod, landed just after #1498 added mdl/backend/pagemutator/container_rendermode_test.go — a file written against v1. The package now fails to compile at all: container_rendermode_test.go:8:2: no required module provides package go.mongodb.org/mongo-driver/bson FAIL github.com/mendixlabs/mxcli/mdl/backend/pagemutator [setup failed] and TestNoV1DriverImports names the file, which is what it is for. Neither PR is at fault. #1498 was authored and tested against a main that still required v1, the two touched different files so nothing conflicted, and each was green on its own base. The combination is what breaks. The file uses bson.D only, so this is the import path and nothing else: v2 nests bson.D inside bson.D exactly as v1 nested primitive.D, so its assertions are already correct and it needs no modelsdk/bsoncompat helper. Checked the whole tree rather than just the file CI named, since `go test` stops at the first [setup failed] package and a second offender would only surface on the next run: this is the only one. Verified: go build ./... clean, go vet clean, gofmt clean, 106 test packages pass with 0 failures, the two packages that failed in CI (mdl/backend/pagemutator and modelsdk/bsoncompat) both pass, and `go mod tidy` exits 0 leaving go.mod and go.sum unchanged — so v1 stays out. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rer1mzP69XxbXKxQqheipM
5 tasks done
ako
added a commit
that referenced
this pull request
Oct 20, 2026
fix(test): point container_rendermode_test at the v2 BSON driver Unbreaks main. #1497 removed go.mongodb.org/mongo-driver v1 from go.mod just after #1498 added a test file written against it, so mdl/backend/pagemutator stopped compiling and TestNoV1DriverImports named the file. Neither PR is at fault: each was green on its own base and the two touched different files, so nothing conflicted — only the combination breaks. The file uses bson.D only, so this is the import path alone; v2 nests bson.D inside bson.D exactly as v1 nested primitive.D, needing no modelsdk/bsoncompat helper. Whole tree checked, not just the file CI named: this is the only one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Works the
silent-property-droprow of the triage board (#1357). Six issues: three fixed here, three already fixed onmain.Closes #1487
Closes #1483
Closes #1230
Changes
One commit per issue, plus a docs commit.
#1487 —
container (RenderMode: 'Main')"isn't stored" (mendixlabs#1582)Reported:
describe layoutprintedcontainer ctnMain (Class: 'app-main') {, andalter layout … setrefused the property.bson dumpshowsRenderMode: "Main"on the storedForms$DivContainer.describeprintsRenderMode: Main, leaving out the defaultDiv.alter page|layout … set (RenderMode: …)on a container now writes it. Before, it was refused withnot a property of this built-in widget.'main','Banner'). Values are now matched case-insensitively against the generated enum (Div…Address), and an unknown member is refused. The hand-writtensdk/pagesenum had drifted (Div,Form).#1483 — Calendar
editable/showEventDatefailmx checkwith CE0642 (mendixlabs#1578)Reported:
[CE0642] "Property 'Editable' is required."and"Property 'Show event date range' is required.". Both aretype="expression" defaultValue="true". Four separate gaps:modelsdk/widgets/augment.go: the template generated from the.mpkwrote an expression'sdefaultValueas an empty expression. It now writes the default, which on its own makes every Calendar page build.GenerateDefJSON: a top-levelexpressionproperty had no mapping, so it was "known but not persisted" and drew a false MDL-WIDGET06. It is now mapped by its own key. Widget definition generator bumped to v19.editable:is also the generic widget-level editability, which the Calendar's package does not declare. The widget's owneditablewas therefore unreachable in every spelling. When the package declares noEditabilitysystem property, the generator now routeseditable:(all value shapes) to the widget's own property, and check (MDL-WIDGET41) and build both read that decision. When the package does declare it,editable:keeps its widget-level meaning.Expressionvalue. It now prints stored expressions.An unset expression mapping keeps the template default instead of writing
""over it.#1230 —
column (Attribute: Name, Filterable: true)(mendixlabs#177)main, so it is no longer a silent drop. What was left was the message: with a project it listed the column's properties, and without one it suggesteddid you mean FilterType?, which a column doesn't have.— `filter` is a slot for child widgets, not a property: put the widget in the column's braces, e.g. `column (…) { textfilter w1 (…) }` (it takes textfilter, numberfilter, datefilter, dropdownfilter).Already fixed on
main, no changedescribeprintsTooltip: 'Close this page', as the reporter also confirmed upstream.localizedon modify): the keep-on-unstated rule is documented, andexecprintsNote: … keeps its stored 'not localized' … write 'Due: DateTime localized' to change it.Editable: '<expression>'on an input widget is silently dropped: the field stays editable #1467 (quotedEditable:): already closed.describeprints the conditional expression.Docs
Two short paragraphs on
docs-wiki/bug-patterns/silent-property-drop.md: check the stored document before blaming the write path, and a builtin MDL key can shadow a widget's own property of the same name.Validation
create layout: a container'sRenderModeis silently dropped; check and exec pass #1487:describe dropped the container's RenderMode,RenderMode = "main", want Main,'Banner' must be refused,property "RenderMode" not found on this widget.editableexpression cannot be written;mx checkfails CE0642 #1483:editable: no mapping,editable: 'true': expression = "",also read as the widget-level editability,describe = [], andeditable Expression = "", want the declared default "true".Filterableproperty on DataGrid2 COLUMN in MDL #1230:its properties are attribute, header (Caption)anddid you mean FilterType.mxcli newapp with Calendar 245304 v2.6.1 from the Marketplace:main's binary:CE0642× 2.The app contains: 0 errors.with neither property set, with both'true', and witheditable: false, showEventDate: 'false'. A describe → exec round trip reportsUnchanged page.TestGenerateDefJSON_SkipsComplexTypes,TestGenerateDefJSON_KnownPropertiesUnmapped). They asserted that expression properties stay unmapped, the behaviour this PR changes. The unmapped example is now aniconproperty.mdl-examples/bug-tests/1582-container-rendermode.mdl,1578-calendar-expression-properties.mdl(needs the Calendar package),177-datagrid-column-filter-slot.mdl..claude/skills/fix-issue/findings/mdl-executor/.make build && make test && make lint,make check-mdl,make check-findingsandmake check-wiki-pagespass.Generated by Claude Code