Skip to content

Sync: widget tree in the catalog, read-only docker build, commit refs, void-call checks - #1283

Merged
ako merged 22 commits into
mendixlabs:mainfrom
ako:main
Oct 3, 2026
Merged

ako merged 22 commits into
mendixlabs:mainfrom
ako:main

Conversation

@ako

@ako ako commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

Syncs ako#964–ako#967 (fast-forward; mendixlabs main has nothing ako lacks).

Closes #1268

Widget tree in the catalog and lint API (ako#965, #1268)

  • widgets() gains parent_widget_id, depth, class_name, style, dynamic_classes, action_type (raw stored type of the primary action), has_confirmation and page_ref.
  • Layout-grid columns, tab pages and skipped wrappers are transparent. A ListView template counts as one level.
  • Forms$DeleteClientAction has no confirmation setting in the model, so the enforceable rule is "no button uses the delete action directly". The skill shows an example. Catalog schema 20.

Catalog follow-ups (ako#964)

  • total_activity_count on the microflow struct (loop bodies included).
  • One workflow walk: list workflows, show structure and the catalog now agree, including boundary events and event sub-processes.
  • New ref kind commit (flow → entity) for commit actions and for create/change with commit. Catalog schema 19.

No mx path writes to the project (ako#966)

  • docker build (and docker run/reload, and the test runner) runs update-widgets, mx check and MxBuild on one temporary copy. Only the PAD output is written.
  • Before, an MPRv1 .mpr was rewritten, and deployment/, javasource proxies, .classpath, .project and theme-cache/ were written into the project.
  • The TUI checker and the eval runner check a copy too.
  • Behaviour change: docker build no longer refreshes the project's own deployment/ and javasource proxies.

check / describe / LSP (ako#967)

  • New MDL093: reading the output name of a void Java/JS action call (CE0109).
  • describe's duplicate-output warning is flow-wide, as mxbuild is (CE0111).
  • The LSP resolves actions through the workspace project.
  • MPR010 no longer advises a layoutgrid on native pages (following it there gives CE6858)

ako and others added 22 commits October 3, 2026 17:42
…structure and the catalog (#963)

list workflows and show structure recursed over outcome flows only and
skipped boundary-event flows and event sub-processes, so TestApp Workflow1
listed 5 activities where the catalog counted 8. The catalog's walk moves to
wfnames.WalkActivities/CountActivities and all three use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uct (#963)

The catalog has carried TotalActivityCount (loop bodies included) since #940;
microflows() now hands it to rules for microflows, nanoflows and rules alike.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, CE0109)

A call to a void Java/JavaScript action keeps its output name and declares
nothing (#953), so reading the name is CE0109 "Undefined variable" in
mxbuild 11.13.0. check now reports it for microflows and nanoflows when the
script or the project says the action is void. The void resolver returns
whether it knows the action, so an unresolvable call is never reported.

Part of #962 (item 1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g create/change (#963)

commit $Order on a loop variable wrote no refs row because refs had no commit
kind. A commit action, or a create/change with commit Yes/YesWithoutEvents,
now emits FLOW -> ENTITY 'commit', resolved through the same intra-flow
variable map as change/delete. It stays out of the analysis graph and the
caller kinds. The ref_kind skill test now reads every RefKind constant, so a
new kind cannot ship undocumented. Catalog schema version 19.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The same output name in each if/else branch, or inside a loop and again
after it, is CE0111 in mxbuild 11.13.0. describe only warned when one
assignment reached the other, so it treated branches and loop bodies as
scopes. Count names over the whole flow instead; void calls stay excluded.
The test that pinned branch scoping now asserts the warning.

Part of #962 (item 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The language server ran the flow rules without a project, so two calls to
a stored void action with the same output name were flagged MDL063. It now
uses executor.FlowRules: actions resolve through the script and the
workspace project, an unresolvable action is treated as possibly void (for
MDL063 only, never MDL093), and project answers are cached for 30s between
keystrokes because one read costs ~300ms on PedApp.

Part of #962 (item 3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion

widgets_data gains ParentWidgetId (nearest indexed ancestor, so skipped
wrappers, layout grid rows/columns, tab pages and pluggable property /
object-list items are transparent), Depth (0 at the page or snippet root;
a list view template is a level), Class, Style, DynamicClasses, ActionType
(raw $Type of Action, else OnClickAction, else ClickAction) and
HasConfirmation (ConfirmationInfo on a microflow/nanoflow/workflow call).
Catalog schema 19. Tested on hand-built shapes and on Studio Pro-authored
TestApp pages. mendixlabs#1268

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gets()

widgets() structs gain parent_widget_id, depth, class_name, style,
dynamic_classes, action_type, has_confirmation and page_ref.
mendixlabs#1268

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The widget table moves to write-lint-rules/catalog-tables.md (SKILL.md was
over the 700-line bound) with an example rule for inline styles, a class
allow-list and direct delete buttons. The vocabulary test scopes action_type
per section (activity vs widget), holds documented widget action types to
codec-registered storage names, and pins that only flow calls carry a
ConfirmationInfo. mendixlabs#1268

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ction' into c24-965

# Conflicts:
#	CHANGELOG.md
#	mdl/catalog/tables.go
#963's commit refs and mendixlabs#1268's widget columns both bumped 18 -> 19 on parallel
branches. A cache built at 19 by either alone would never rebuild for the
other, the 15/16 collision again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The TUI checker (after every change) and the eval runner's mx_check ran a
plain `mx check <project>`, which writes theme-cache/web/ and
deployment/sass/ into the project. Measured with mx 11.14 on a v1 and a v2
copy of the testapp: the model is left alone, those two folders are added.

New docker.MxCheckOnCopy runs `mx check` on copyProjectToTemp's copy (the
#956 helper, renamed now that it is not check-only) with output paths
rewritten to the project's, and applies PrepareMxCommand, which these two
callers lacked. mxCheckCmd takes extra args for the TUI's -j/-w/-d.

Part of #961.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tory

`docker build` (and docker run / reload, which call it) ran update-widgets
on the project under a snapshot that restored only MPRv2 storage, then
mx check and MxBuild on the project itself. Measured on the 11.14 testapp:
an MPRv1 .mpr was rewritten, every MPRv2 .mxunit was rewritten and put
back with new mtimes, and theme-cache/, deployment/, 160 javasource/
proxies, the .launch file, .classpath and .project were written into it.

buildOnCopy now runs all three tools on one copyProjectToTemp copy and
writes only the PAD output directory (absolute, default .docker/build).
MxBuild still sees the widget-normalised model, from the copy. The PAD
differs from an in-place build in the same 9 files in which two in-place
builds of identical copies differ (cache-bust stamps, operation ids,
native metro paths), and the rebuild time is unchanged (58s vs 59s).

runUpdateWidgets (the v2 snapshot) has no caller left and is removed with
its tests; build_readonly_test.go covers v1 and v2 with stub tools, and
TestBuild_LeavesProjectUntouched with real mx and MxBuild.

Part of #961.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The layout-grid advice is about Bootstrap label/input columns, which a
native page does not have. Measured on mxbuild 11.13.0 (PedApp copy): a
bare form DataView on a NativePhone_Default page, or in a native snippet,
builds clean, and wrapping it in a layoutgrid as advised is CE6858. lint
skips pages on a native layout (LintContext.NativePages, so the rule now
declares CatalogFull) and snippets of Type Native; check -p asks the
project whether a reported page's layout is native.

Part of #962 (item 4).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without checkCmd.InheritedFlags() the test only saw the project when another
test had merged the flags first.

Part of #962.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Catalog follow-ups: total_activity_count in Starlark, one workflow walk, commit ref kind (#963)
Catalog: widget parent/depth, class/style and primary action (mendixlabs#1268)
docker build, TUI checker and eval runner no longer write to the project
fix(check,describe,lsp,lint): #962 — CE0109 on void call outputs, flow-wide duplicate warning, LSP void calls, MPR010 on native
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

AI Code Review

Critical Issues

  • None found

Moderate Issues

  • None found

Minor Issues

  • None found

What Looks Good

  • The PR successfully syncs multiple related features from ako/mxcli fork:
    • Widget tree enhancements (parent_widget_id, depth, class_name, style, dynamic_classes, action_type, has_confirmation, page_ref) with proper handling of transparent containers (layout-grid columns, tab pages, skipped wrappers)
    • Catalog improvements: total_activity_count including loop bodies, workflow walk agreement (boundary events/event sub-processes), new commit ref kind
    • Read-only docker build: all project-modifying operations (update-widgets, mx check, MxBuild) now run on temporary copies, preventing writes to user projects
    • Void call handling: new MDL093 rule for reading void action outputs, flow-wide duplicate-output warning, LSP action resolution through workspace
  • Extensive test coverage added for all new features:
    • Widget tree tests (builder_pages_tree_test.go) covering transparency rules and nested structures
    • Docker build readonly tests (build_readonly_test.go, check_readonly_test.go, etc.)
    • Workflow counting tests (cmd_workflows_count_test.go) verifying boundary events/event sub-process inclusion
    • Void call tests (validate_void_call_output_test.go, lsp_void_calls_test.go)
    • Commit reference tests (builder_commit_refs_test.go)
    • Linter tests for widget action types and confirmation rules
  • Changes maintain full-stack consistency where applicable (void call handling touches executor, LSP, and validation)
  • Code quality improvements: removed dangerous project writes during docker build, simplified duplicate variable detection to flow-wide check
  • Documentation updated: catalog schema docs, docker build guide, lint rule vocabulary

Recommendation
Approve the PR. The changes are well-tested, address the referenced issues (#1268 and related), and maintain consistency with project architecture. The read-only docker build change is particularly important for safety in CI environments. No critical or moderate issues identified.


Automated review via OpenRouter (Nemotron Super 120B) — workflow source

@ako
ako merged commit 2233ce1 into mendixlabs:main Oct 3, 2026
15 checks passed
ako added a commit to ako/mxcli that referenced this pull request Oct 4, 2026
Sync mendixlabs/mxcli: Mendix 11.15.0 in the nightly matrix (mendixlabs#1293) and the mendixlabs#1283 merge commit
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.

Catalog: widgets have no parent, no class/style and no button confirmation

1 participant