Repository navigation
Conversation
…ndixlabs#1573) `mxcli check` without `-p` warned, for every setting a Data grid 2 takes by its own key, widget `dgAttr` (datagrid) property `configurationAttribute` is not recognized and will be silently dropped on write [MDL-WIDGET07] although `exec -p` stores it and `check -p` accepts it, and it refused an Expression-typed one (`rowClass`, a column's `columnClass`) as an MDL-WIDGET42 ERROR, "a plain-value property cannot hold the expression". A script exec takes therefore failed `make check-mdl` (exit 1 with 2 errors, measured), and so would the output of `describe page` once it prints such settings. DATAGRID has no embedded definition: its .def.json is generated from the project's own package, and an embedded one would take precedence over that package on every write (RefreshWidgetDefinitions skips a widget id the registry already holds), so adding one would change the write path to fix a check. Without a project the keyword resolved to no definition at all and was judged against the vocabulary of the built-in widgets. The check now reads the property list of the Data grid 2 template mxcli embeds, for the grid's own keys and, for a `column` inside one, the item type of `columns`. A key the template declares (or the `<key>Params` of a text template) is accepted, and its declared type decides MDL-WIDGET42. The template is the oldest-supported baseline, so a key it does not declare is still reported by MDL-WIDGET07, with a did-you-mean from the template's names, but as what is true without a project: it cannot be verified, and is dropped on write unless the installed widget declares it. The Data grid 2 template carries the same 40 grid keys and 21 column keys as the 11.12.5 package. With a project, and for every other widget, nothing changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
AI Code ReviewCritical IssuesNone found. Moderate IssuesNone found. Minor IssuesNone found. What Looks Good
RecommendationApprove the PR. The change is minimal, well-tested, and resolves the specific issue without introducing regressions or violating project conventions. Merge before the describe PR (#DESCRIBE_PR) as requested to prevent false MDL-WIDGET42 errors when describing expression-typed Data grid 2 settings. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
This branch has not been deployed
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.
Part of #1573 (the
checkhalf). Please merge this before the describe PR, #1575. Once describe prints expression-typed settings such asrowClass, a no-projectcheckof that output would otherwise report MDL-WIDGET42.What it fixes
Without a project,
checkwarned that every Data grid 2 setting written by its key "is not recognized and will be silently dropped on write" (MDL-WIDGET07), althoughexecstores it. For an expression-typed key (rowClass, a column'scolumnClass) it reported an MDL-WIDGET42 error, socheckexited 1.Cause and fix
DATAGRID has no embedded
.def.json(sdk/widgets/definitionsholds combobox, gallery, the filters, dropdownsort, image and barcodescanner). Without a project, the keyword resolved to no definition and fell intovalidateStaticWidgetUnknownProps.validateWidgetExpressionValuesthen treated every key as a plain-value property.datagridkeyword widget and itscolumnchildren have no definition, the checker now reads the property list of the embeddeddatagrid.jsontemplate. The grid's own keys come from the top level, and a column's keys from thecolumnsitem type. That template isn't generated bymake sync-all.<key>Paramsof a text template) is accepted, and its declared type decides MDL-WIDGET42.datagrid.def.json.RefreshWidgetDefinitionsskips ids the registry already holds, so it would take precedence over the project's package and change every write.-p, and for every other widget, nothing changes.Evidence
validate_widget_embedded_schema_test.go. With the embedded lookup forced off, 7 of 8 fail and list the exact false warnings and errors; the eighth guards that built-in widgets are unchanged. All pass with the fix. Two of the tests derive their keys from the template itself.checkover all 911mdl-examplesscripts (mainvs this branch): 908 are identical, and the 3 differences are all expected:956-named-action-slots.mdland995-alter-page-set-named-action-slot.mdllose false MDL-WIDGET07 warnings (onSelectionChangeon a datagrid);bug-tests/1573-datagrid-by-key-settings-check-no-project.mdlgoes from exit 1 (2 errors, 13 warnings) to a pass.configurationStorageTyp,minWidthLimt) still warn, each with a did-you-mean.check -pis unchanged.exec -pof the script creates its pages, andmx checkreports 0 errors.go test ./mdl/executor/shows the same 28 pre-existing Windows failures asmain.go vetandgofmtare clean.golang:1.26.6-bookworm, ANTLR 4.13.2):make grammar build test check-mdl check-findings check-conformance check-migration-reference lint-goall pass.findings/mdl-executor/, and a note inwidget-engine.md.🤖 Generated with Claude Code