Skip to content

fix: describe round-trip gaps on pages (gallery sort over association, by-key combo box / filter settings) - #1523

Merged
ako merged 7 commits into
mainfrom
claude/gracious-brown-c46qr9
Oct 21, 2026
Merged

ako merged 7 commits into
mainfrom
claude/gracious-brown-c46qr9

Conversation

@ako

@ako ako commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Works the describe-round-trip-gaps-pages cluster from the triage board (#1357): #1509, #1491, #1402.

Closes #1509
Closes #1491
Closes #1402

#1509 — mendixlabs#1599: gallery sort over an association

Reported: gallery g1 (DataSource: $currentObject/Probe.Item_Parent, …) with no sort by. Studio Pro stores a gallery's "Database" source over an association as a CustomWidgetXPathSource with an IndirectEntityRef and a sort bar. Describe read it as an association source, which drops XPath and sort and replays as a Forms$AssociationSource, a different retrieve.

  • Reader: a pluggable XPath source with complete hops reads as database from $ctx/Assoc/Entity [where …] [sort by …], as the list view source already did. A hop with no stored destination keeps the association reading.
  • Writer: on 10+, pluggable widgets accept that form. customWidgetDataSourceToGen stores the hops as an IndirectEntityRef, with the start parameter in SourceVariable. 9.x keeps the [up#1517] create or modify / alter microflow splice refusals (loop body, used return, earlier alter, variable scope in one alter block) #1399 database source. Widgets with their own builder still refuse the form.
  • Real run on Mendix 11.12.1: the reporter's shape, authored in MDL, passes mx check with 0 errors, and describe → exec reports Unchanged page. Control: with the association name byte-patched to a nonexistent one, mx check reports CE1613 at Gallery 'g1'.

#1491 — mendixlabs#1586: expression-type pluggable properties

  • The report's own case (a generic widget's top-level expression, plus a false MDL-WIDGET06) reproduces only on the binary built before Calendar widget: the required editable expression cannot be written; mx check fails CE0642 mendixlabs/mxcli#1578, and is already fixed on main.
  • Still live and fixed here: the combo box and the four data grid filters have dedicated describers that knew only their keyword keys. A combo box's customEditabilityExpression and a text filter's defaultValue and delay were written by exec but not described. These widgets now run the by-key reader (Data grid 2 settings written by their widget key are lost on a describe → exec round trip, and check without a project calls them "silently dropped" mendixlabs/mxcli#1573) beside their own.
  • Values are compared with what exec writes for an absent key (the embedded template), not with the schema default. The combo box template stores readOnlyStyle: bordered against a default of text. On main, an edit-replay of Administration.Account_Edit flips Studio Pro's text to bordered; with this fix it keeps text.
  • Settings of a combo box mode that describe does not spell (database or static) are named in a NOT re-executable note, not printed.
  • check without -p tops up the hand-written definitions from the embedded template, so describe output passes it.
  • Separate commit: MDL-WIDGET42 now decides a known-but-unmapped key by its template type. emptyOptionText: 'a' + 'b' passed check -p before and failed only at exec.

#1402 — mendixlabs#1520

Already fixed: the page half by #1416, the snippet half by the #721 L3 snippet-parameter slot read. Retested on 11.12.1. A widget-presence audit of all 28 pages and snippets in the Blank app found all 249 named widgets in the describe output. This PR adds a bug-test script only.

Evidence

  • Each new test fails with the reported output when its fix is reverted: a bare combobox cb, $currentObject/Probe.Item_Parent, and a DirectEntityRef instead of an IndirectEntityRef.
  • Corpus diff of describe, baseline build vs branch, over the Blank 11.12.1 app: only the intended lines change, and every description replays Unchanged. mx check reports 0 errors after the replays, after edit-replays of Studio Pro pages, and after the new bug-test scripts.
  • make test, make lint, make check-mdl and make check-findings pass.
  • Bug tests: mdl-examples/bug-tests/1599-…, 1586-…, 1520-describe-snippet-root-datasource.mdl. There are two findings, and the round-trip pattern page has one new paragraph.

Not done: datagrid.json's template stores columnsFilterable=false against a default of true. The mendixlabs#1573 data grid reader still compares with the default there.


Generated by Claude Code

…ociation (mendixlabs#1599)

DESCRIBE PAGE printed a gallery whose "Database" source runs over an
association as `$currentObject/Assoc` with no `sort by` and no `where`, and
`create page` refused the faithful `database from $currentObject/Assoc/Entity`
form for anything but a list view.

Studio Pro stores that source as a CustomWidgets$CustomWidgetXPathSource with
an IndirectEntityRef, its XPath and sort bar beside it. The reader treated it
as an association source (the #941 reading), which drops both and replays as
a Forms$AssociationSource — a different retrieve.

- Reader: a pluggable XPath source with complete hops reads through
  parseEntityPathSource, as the list view source already does; a hop without a
  stored destination keeps the association reading.
- Writer: on 10+ buildPluggableDataSourceV3 builds the form and
  customWidgetDataSourceToGen stores the hops as an IndirectEntityRef with the
  start parameter in SourceVariable (9.x keeps the #1399 database source).
  Widgets with their own builder still refuse it in buildDataSourceV3.

Measured on 11.12.1: the reporter's shape authored in MDL, mx check 0 errors,
describe -> exec "Unchanged page"; with the association byte-patched to a
nonexistent name mx check reports CE1613 at Gallery 'g1'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hjeuk6NPBWq3QTxCKxsARF
…by key (mendixlabs#1586)

DESCRIBE PAGE omitted expression-typed (and other) settings of the widgets
with a dedicated describe reader: a combo box's customEditability /
customEditabilityExpression / ariaRequired, a text or number filter's
defaultValue expression and delay. Exec wrote them; describe -> edit -> exec
reset them.

The report's own case, a generic pluggable widget's top-level expression with
a false MDL-WIDGET06 warning, reproduces only on the binary before
mendixlabs#1578 and is already fixed on main.

- The combo box and the four data grid filters now run the by-key reader
  (mendixlabs#1573) beside their keyword reader, skipping the keys it already prints.
- Values are compared with what exec writes for an absent key (the embedded
  template), not the schema DefaultValue: the combo box template stores
  readOnlyStyle `bordered` against a default of `text`, so Studio Pro's combo
  boxes (Administration.Account_Edit) lost `text` on an edit-replay.
- A combo box's database/static-mode settings, a mode DESCRIBE does not spell,
  are named in a NOT re-executable note instead of printed.
- `check` without -p tops the hand-crafted definitions up from the embedded
  template, so describe output passes it as it does with -p.

Corpus diff against a baseline build over the Blank 11.12.1 app: only the
intended lines change, every description replays "Unchanged", mx check 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hjeuk6NPBWq3QTxCKxsARF
…bs#1520)

The snippet half of the report: a data view sourced from a snippet parameter
described without its DataSource. Already fixed by the snippet-parameter slot
read (#721 L3); retested on 11.12.1, describe prints
`DataSource: $View` and replays "Unchanged snippet". The page half was fixed
by #1416.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hjeuk6NPBWq3QTxCKxsARF
…ate type

A key a widget definition knows but does not map (a combo box's
emptyOptionText) was skipped by MDL-WIDGET42 on the assumption that
MDL-WIDGET01/06 spoke for it. Neither does once the key is persisted by the
explicit-property pass, so `emptyOptionText: 'a' + 'b'` passed `check -p`
and failed at exec. With the template enrichment for a check without -p
(mendixlabs#1586) the same gap opened there, which
TestWidgetExpressionInAPlainProperty_IsAnError caught.

The kind now comes from the widget's embedded template, as it already did
for a widget with no definition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hjeuk6NPBWq3QTxCKxsARF
…$ctx/…` (mendixlabs#1599)

TestDatabaseOverAssociationRefusedUnderANamedDatasourceKey asserted the
refusal this PR removes, on the premise that the pluggable writer stored the
entity alone. It now stores the hops as an IndirectEntityRef with the start
parameter in SourceVariable, so the probe asserts the path survives exec ->
describe instead. Measured on 11.12.1 with the same combo-box shape: mx check
0 errors, describe -> exec "Unchanged page".

WorkflowCommons.WorkflowGroup_Edit now passes every law on TestApp, so it
leaves knownFailures, which may only shrink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hjeuk6NPBWq3QTxCKxsARF
Ported from #1527 so this PR's build-and-test can go green:
govulncheck fails on crypto/x509@go1.27.2 (GO-2026-6809, fixed in
1.27.3), reached through internal/marketplace/client.go. main is red on
the same check. Identical change; it no-ops once #1527 lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hjeuk6NPBWq3QTxCKxsARF

ako commented Oct 21, 2026

Copy link
Copy Markdown
Owner Author

build-and-test failed at its govulncheck step: GO-2026-6809 in crypto/x509@go1.27.2 (fixed in 1.27.3), reached through internal/marketplace/client.go. This PR does not touch that path, and main is red on the same check (run 39525641821).

I ported the fix from #1527 (Go 1.27.3 in go.mod and the three workflows) as 3751ce7. It is the same change, so it becomes a no-op once #1527 merges. Locally, govulncheck under 1.27.3 reports 0 vulnerabilities affecting the code.

The other failure, integration (roundtrip), was caused by this PR and was fixed in b07f7d9.


Generated by Claude Code

@ako
ako merged commit 90d802f into main Oct 21, 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

2 participants