Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "mdl/executor", "date": "2026-11-17", "symptom": "every native Image (Native Mobile Resources 12.6.0) mxcli created failed mx check 11.13.0 with CE0463 — its `imageUrl` text template was written with a template where mx update-widgets writes none", "cause": "the Image's editorConfig hides the image-source properties it is not using with hidePropertiesIn(t, v, function(s){switch(s){case \"image\": return L.filter(p => \"imageObject\" !== p); …; default: return L}}(v.datasource)) — a list computed by a switch in an immediately-invoked function, which the extractor could not read, so no rule hid imageUrl under the default source", "file": "mdl/executor/editorconfig_iife_switch.go (iifeSwitchHideRules), mdl/executor/editorconfig_extract.go (extractVisibilityRulesFromJS)", "fix": "read that exact shape — unguarded, at a function's statement level, each case keeping one member of a known string-array constant, default the whole list — as one `notin` rule per member over the cases that keep it; any other shape stays unread", "insight": "diffing the stored widget against a copy run through `mx update-widgets` named the exact property (Object.imageUrl TextTemplate set vs null) — but the Type was identical, so the cause was visibility, not the definition. A CE0463 with a clean Type diff points at editorConfig", "refs": [], "test": "mdl/executor/editorconfig_iife_switch_test.go"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "mdl/executor", "date": "2026-11-17", "symptom": "`check` refused `nativeslider s1 (editable: 'default')` with \"`Editable: default` is not an Editable value [MDL-WIDGET19]\" — the form describe prints — so a native page with a slider, range slider, rating or toggle buttons could not be described and re-run", "cause": "those native widgets declare an `editable` enumeration of their own (default | never) and no Editability system property; exec writes `editable:` to that key (the CustomWidget's Editable stays Always), but validateConsumableConditional judged the name as the core Editable", "file": "mdl/executor/validate_widgets.go (validateConsumableConditional), mdl/executor/pluggable_own_core_name.go (defDeclaresOwnKey)", "fix": "skip the core Editable value check when the widget's definition maps an `editable` key of its own; validatePluggableEnumValues judges the value against the package's keys", "insight": "same class as ako/mxcli#2180 (a widget's own key spelled like a core name), but `editable` is deliberately not in pages.coreNamesPluggableKeysShadow because a CustomWidget stores Editable itself — so only check was wrong; exec already wrote the own key. Dumping the stored CustomWidget (Editable: Always) settled which layer to touch", "refs": ["ako/mxcli#2180"], "test": "mdl/executor/native_editable_own_property_test.go"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "mdl/executor", "date": "2026-11-17", "symptom": "with Native Mobile Resources installed, describe printed a native widget left at its defaults under the last segment of its id: `nativegallery`/`nativebadge`/`nativeimage` came out as the web `gallery`/`badge`/`image` (re-run rebuilt the page with the WEB widget, check clean), and `activityindicator`, `backgroundgradient`, `notifications`, `qrcode`, `repeater`, `safeareaview`, `signature` were refused on re-run (MDL-WIDGET25); a native gallery with a data source was described as the web gallery too", "cause": "extractCustomWidgetType's default returned the id's last segment, which routes describe — `gallery`/`image` landed in the web widgets' dedicated branches — and the bare branch (a pluggable widget with no non-default content) printed that segment instead of asking pluggableWidgetHeader, which the generic branch already used", "file": "mdl/executor/cmd_pages_describe_pluggable.go (extractCustomWidgetType), mdl/executor/cmd_pages_describe_output.go (bare custom-widget branch)", "fix": "a last segment naming a dedicated branch is routed as `customwidget`; the bare branch names a widget with no branch of its own through pluggableWidgetHeader (definition keyword where it round-trips, else the id form)", "insight": "#1463 fixed the native/web keyword collision at init and load time but not on the way out: describe had a second, independent name derivation. Probing every widget of a package (39 pages, describe -> check -> exec) found it in minutes where the one-widget repro hid it: only widgets left at their defaults took the bare branch, so a widget with any setting described correctly", "refs": [], "test": "mdl/executor/describe_native_widget_keyword_test.go"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "modelsdk", "date": "2026-11-17", "symptom": "native Signature, Bottom sheet and Maps (Native Mobile Resources 12.6.0) created by mxcli failed mx check 11.13.0 with CE0463 on every instance", "cause": "the definition generated from the .mpk differed from mx update-widgets in three attributes: AllowUpload false where the image property declares allowUpload=\"true\" (not parsed at all); OnChangeProperty \"\" where the attribute declares onChange (parsed, but createDefaultValueType hard-coded \"\"); an enumeration caption trimmed where Mendix stores the element text verbatim, trailing newline and indentation included", "file": "modelsdk/widgets/mpk/mpk.go (AllowUpload, EnumValue.RawCaption), modelsdk/widgets/augment.go (createDefaultValueType, buildEnumValuesArray, syncDefinitionAttrs)", "fix": "parse allowUpload; write p.AllowUpload and p.OnChange into the generated ValueType and sync AllowUpload onto augmented templates; keep the raw caption beside the trimmed one and write the raw one", "insight": "mx check runs on macOS through Docker: debian:bookworm-slim plus libicu72, libuuid1, libfreetype6, fontconfig, with LD_PRELOAD of libuuid.so.1 and libfreetype.so.6 (libSkiaSharp does not link uuid). A baseline mx check of the untouched fixture is what separates the 4 new CE0463 from the 105 the fixture already had", "refs": [], "test": "modelsdk/widgets/native_definition_attrs_test.go, modelsdk/widgets/mpk/native_attrs_test.go"}
2 changes: 1 addition & 1 deletion .claude/skills/mendix/custom-widgets/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ If a widget you have installed is not found, extract its definition:
mxcli widget init -p app.mpr
```

The keyword is the widget id's last segment; a **native** widget (`com.mendix.widget.native.*`) is prefixed `native` (`nativeimage`, `nativebadge`).
The keyword is the widget id's last segment; a **native** widget (`com.mendix.widget.native.*`) is prefixed `native` (`nativeimage`, `nativebadge`). Native widgets' required settings, platform, slots and own `editable`: [reference/native-widgets.md](reference/native-widgets.md).
A project definition never takes a built-in keyword (`image`, `radiobuttons`, …) for another widget id: it warns and stays `pluggablewidget '<id>'`; delete a stale native `image.def.json` / `radiobuttons.def.json` and re-run `widget init` (mendixlabs/mxcli#1463).

## Built-in Pluggable Widgets
Expand Down
17 changes: 17 additions & 0 deletions .claude/skills/mendix/custom-widgets/reference/native-widgets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Native mobile widgets

Supporting reference for [custom-widgets](../SKILL.md).

The 39 widgets of Native Mobile Resources (`nativegallery`, `nativeslider`, `nativebottomsheet`, `nativebarchart`, …) need no template in mxcli. After `widget init`, each one is built from the project's own `.mpk` file.

- **Set what the widget requires.** `check` warns (MDL-WIDGET56) about each required setting left out: a gallery's data source, a slider's attribute, a repeater's `template { … }` content, a chart's series. mxbuild fails the build on each with CE0642.
- **Use them on native pages only.** `check` warns (MDL-WIDGET55) about a native widget on a web page, and about a web widget (`combobox`, `datagrid`, `image`, …) on a native page.
- **Slot names come from the definition.** A native gallery's item slot is `template { … }`, not `content`; `check` lists a widget's slots when one is wrong (MDL-WIDGET26).
- **Slider, Range slider, Rating, Toggle buttons:** `editable:` is the widget's own setting, `default` or `never`. It is not the core `Editable`.

```sql
nativegallery g1 (datasource: database from Module.Item, phoneColumns: 2) {
template { dynamictext t1 (Content: '{1}', ContentParams: ({1} = Title)) }
}
nativeslider s1 (valueAttribute: Score, editable: never)
```
86 changes: 71 additions & 15 deletions .claude/skills/mendix/manage-navigation/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@ description: "Inspect and change navigation profiles in MDL — home pages, menu

| lines | section |
|---|---|
| 32-41 | When to Use This Skill |
| 42-60 | Navigation Concepts |
| 61-78 | Show Commands (Read-Only) |
| 79-382 | CREATE OR MODIFY NAVIGATION |
| 383-421 | Change One Item: ALTER NAVIGATION |
| 422-432 | Round-Trip Workflow |
| 433-454 | Catalog Queries |
| 455-494 | Common Patterns |
| 495-547 | Menu Documents (standalone, reusable) |
| 548-618 | Offline Profiles |
| 619-635 | Checklist |
| 636-639 | Offline synchronization (`CREATE NAVIGATION … SYNC (…)`) |
| 640-642 | Menu documents (CREATE OR MODIFY/DESCRIBE/DROP MENU) |
| 33-42 | When to Use This Skill |
| 43-63 | Navigation Concepts |
| 64-81 | Show Commands (Read-Only) |
| 82-385 | CREATE OR MODIFY NAVIGATION |
| 386-424 | Change One Item: ALTER NAVIGATION |
| 425-435 | Round-Trip Workflow |
| 436-457 | Catalog Queries |
| 458-497 | Common Patterns |
| 498-550 | Menu Documents (standalone, reusable) |
| 551-621 | Offline Profiles |
| 622-673 | Native Profiles |
| 674-691 | Checklist |
| 692-695 | Offline synchronization (`CREATE NAVIGATION … SYNC (…)`) |
| 696-698 | Menu documents (CREATE OR MODIFY/DESCRIBE/DROP MENU) |

<!-- /skill-index -->
# Navigation Management Skill
Expand All @@ -49,7 +50,9 @@ Use when the user asks to:
| `Phone` | `PhoneOffline` |
| `Tablet` | `TabletOffline` |

An invented name (`Mobile`, `Desktop`) is an error, not a new profile: Mendix routes on **User-Agent** to its own kinds, so a profile the platform does not define can never be reached. Native profiles are a different document type and are not creatable from MDL.
An invented name (`Mobile`, `Desktop`) is an error, not a new profile: Mendix routes on **User-Agent** to its own kinds, so a profile the platform does not define can never be reached.

Native profiles are a different document type (`Navigation$NativeNavigationProfile`, no `Kind` property — identified purely by `$Type` + `Name`) and have their own, separate closed set: currently just `NativePhone`. `create or modify navigation NativePhone` creates it the same way the web kinds are created. Hybrid is not supported (no reference document exists for it). A freshly created NativePhone profile has no bottom bar menu items — fill them with a `{ }` block (flat, `OnClick: show page` only, no `Icon:` — see "Native Profiles" below) if the home page's layout requires a bottom bar (CE6108).
- **Offline Profiles** — An offline profile makes the app work without a connection (a PWA with a local database that syncs). It is not a different document — same properties as its online twin — but it **constrains every page it can reach**, see below.
- **Home Page** — The default page shown after login. Can be a PAGE or MICROFLOW.
- **Role-Based Home Pages** — Override the default home page per user role (e.g., admins see a dashboard, users see a task list).
Expand Down Expand Up @@ -616,12 +619,65 @@ starts empty and Studio Pro fills it from the entities the reachable pages use;
only rows that differ from the defaults (`syncMode: Online`, no constraint) are
stored. MDL does not author per-entity sync modes — set those in Studio Pro.

## Native Profiles

`NativePhone` is created the same way:

```sql
mdl 1;
create or modify navigation NativePhone
home page NativeMobile.Home_Native;
```

It is a different document type (`Navigation$NativeNavigationProfile`) from the
web kinds above — no `Kind` property, identified purely by `$Type` + `Name` —
but the statement and the create-then-fill flow are the same.

**The bottom bar is the profile's `{ }` block, reusing the same item syntax as
the web kinds — but it is flat and page-only.** A native profile's bottom bar
(`NativePages$BottomBarItem`) has no sub-menus and stores only a page, unlike
the web `Menu`, so:

```sql
mdl 1;
create or modify navigation NativePhone
home page NativeMobile.Home_Native
{
menu item 'Home' ( OnClick: show page NativeMobile.Home_Native, Icon: glyph 57377 )
};
```

- Every item needs `OnClick: show page …` — any other action (`call microflow`,
`call nanoflow`, `sign out`, …) and an item with no action are rejected (the
native bottom bar has no other action). A page argument is rejected too.
- Nested `menu 'caption' { … }` sub-items are rejected — Mendix's bottom bar
menu cannot nest.
- `Icon: glyph <code>` is the one confirmed icon shape for a native bottom bar
item — a numeric code, matching the one real reference document
(`Forms$GlyphIcon`). A collection or image icon (`Forms$IconCollectionIcon`/
`Forms$ImageIcon`) is rejected — that shape has never been confirmed as
valid here; add it in Studio Pro instead.

If the home page's layout has "Bottom bar" enabled, Mendix requires that page
to appear in the profile's bottom bar menu and reports **CE6108** ("If the
bottom bar is enabled on a home page, then that page must be included in the
bottom bar menu of the native navigation profile...") until it does. Either
include the page in the `{ }` block as above, or point the home page at a
layout with no bottom bar.

A profile with no home page at all (`create navigation NativePhone;` with
nothing else) is a valid **empty** profile — Mendix requires a home page before
the profile can actually route anywhere, reported as **CE0527** ("Select a
default home page for this profile in the navigation document") until one is
set, same as leaving a web profile's home page unset.

## Checklist

- [ ] Profile name is one of Mendix's web kinds (`Responsive`/`Phone`/`Tablet`, or their `*Offline` twins) — an invented name is an error, not a new profile
- [ ] Profile name is one of Mendix's web kinds (`Responsive`/`Phone`/`Tablet`, or their `*Offline` twins), or the native kind (`NativePhone`) — an invented name is an error, not a new profile
- [ ] For an **offline** profile, no page it can reach binds an attribute across more than one association (CE6206)
- [ ] For an **offline** profile, `progressive web app ( Precaching: true )` is set — without it no page opens offline
- [ ] `app title` is set — a new project's browser tab reads `Mendix - <page title>` otherwise
- [ ] For a **native** profile whose home page's layout requires a bottom bar (CE6108), the `{ }` block includes that page — flat items only, `OnClick: show page` only; `Icon: glyph <code>` is supported, a collection or image icon is not (add those in Studio Pro)
- [ ] All PAGE/MICROFLOW targets are fully qualified (`Module.Name`)
- [ ] Role references in `for` clauses are fully qualified (`Module.Role`)
- [ ] Menu items are in `{ }` with no `;` between them; sub-menu items in `menu 'caption' { ... }`
Expand Down
Loading
Loading