feat(alter-page): INSERT INTO container — append widgets as a container's children - #6
Merged
Merged
Conversation
…er's children
ALTER PAGE could only INSERT BEFORE/AFTER a sibling widget, so there was no way to
fill an EMPTY container or add a widget to a container/dataview without an existing
sibling to anchor to. Add:
alter page Mod.Page { insert into containerName { <widgets> } }
which appends the widgets as the last children of the named container. Full-stack:
grammar (INSERT INTO), visitor (Position "INTO"), executor (children take the
target's own entity context, e.g. a dataview's entity), and both mutators
(pagemutator for MPR files, MCP for live Studio Pro). An empty container omits its
Widgets list, so it is created with the Mendix widget-list marker and written back
into the parent (the bson.D grows). Simple containers are supported (DivContainer,
Container, DataView, GroupBox, ScrollContainerRegion, Section); LayoutGrid and
TabContainer have no single child list and give a clear error pointing to
INSERT BEFORE/AFTER inside the target column/tab.
Verified on 11.12.1: insert into an empty container, append to a non-empty one, and
insert a data-bound widget into a dataview — mx check 0 errors. Unit test for the
mutator INTO path + error case; doctype example; skill / quick-reference / syntax
help updated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
ako
force-pushed
the
claude/mxbuild-diagnostics-spike-emta6h
branch
from
July 21, 2026 23:14
45b1dbd to
8515ba5
Compare
ako
pushed a commit
that referenced
this pull request
Jul 25, 2026
Straggler for finding #6 — the audit-attributes example also showed `OrderNumber: autonumber` with no seed. Add `default 1` (an autonumber requires a seed or the build fails CE7247), matching the mdl-entities.md fix and the already-correct data-types row. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
This was referenced Jul 25, 2026
ako
pushed a commit
that referenced
this pull request
Jul 27, 2026
…ltiline-string hint Three separate authoring papercuts from the RSS-reader build: - #10 The CLAUDE.md/AGENTS.md template that `mxcli init` writes into every project contradicted the shipped skills: it listed `DECLARE $Entity Module.Entity;` and `DECLARE $List List of ... = empty;` as supported (both are rejected — MDL043/CE0053 and MDL040) and listed `CASE … END CASE` as NOT supported (it IS — the enum split). Move the two DECLARE forms to the NOT-supported table with the correct "use a parameter / retrieve / create" guidance, and list CASE as supported. - #12 write-microflows.md documented the `$latestHttpResponse` body attribute as lowercase `content`; the real name is `Content` (inherited from System.HttpMessage, so DESCRIBE ENTITY System.HttpResponse doesn't list it). Lowercase fails CE0117. Fix both mentions and note why. - #6 A string literal that runs off the end of its line got the "unescaped apostrophe — double your apostrophes" hint, which only makes it worse. Detect a newline inside the token-recognition-error payload and emit a distinct "string literals cannot span multiple lines" hint instead. The single-line apostrophe heuristic is unchanged. Reported from the RSS-reader build (findings #10, #12, #6). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
ako
pushed a commit
that referenced
this pull request
Jul 29, 2026
…NGS LANGUAGE (FINDINGS #6) `alter settings LANGUAGE DefaultLanguageCode = '<code>'` accepted any string. A code not configured in the project (e.g. 'nl_NL' on an en_US-only project) was written, reported success, and the *next* `mx check` died with an unhandled NullReferenceException — never a model error, so the corruption was invisible until a later command. Validate the code against the project's configured languages (ps.Language.Languages) before writing; reject with the available codes and a Studio Pro hint. Skipped when the language list is unavailable (empty) to avoid false rejections. Verified end to end on the vendored fixture: 'nl_NL' rejected, 'en_US' accepted. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
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.
Summary
Adds
ALTER PAGE … { insert into <container> { … } }— appending widgets as a container's children. Previously ALTER PAGE could onlyINSERT BEFORE/AFTERa sibling widget, so there was no way to fill an empty container or add a widget to a container/dataview without an existing sibling to anchor to.What's included (full-stack)
INSERT INTO widgetRef { pageBodyV3 }(regenerated parser; generated files not committed).InsertWidgetOp.Position = "INTO".INTO, the new children take the target's own entity context (e.g. a dataview's entity), not its enclosing container's.pagemutatorand the live-Studio-Promcpmutator append to the container'sWidgetslist. An empty container omits that list, so it's created with the Mendix widget-list marker and the (grown)bson.Dis written back into its parent.INSERT BEFORE/AFTERa widget inside the target column/tab.Testing
mx check0 errors): insert into an empty container, append to a non-empty one, and insert a data-bound widget into a dataview.page_mutator_test.go); doctype example (mdl-examples/doctype-tests/alter-page-insert-into.mdl); fullmdl/...+ syntax test packages green.MDL_QUICK_REFERENCE.md, andmxcli syntaxhelp (page + snippet) updated.🤖 Generated with Claude Code
https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
Generated by Claude Code