fix(navigation): every menu item action round-trips; native profiles refuse what they cannot write (#980) - #985
Merged
Merged
Conversation
formatDecimal(x, '0.00') follows the user's language, so a Dutch user got 12,50 and invalid JSON. Use toString(round(x, 2)), or formatDecimal with a hyphenated locale; explain the silently-ignored underscore tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…json (#982) The run --local hint 'mxcli oql -p …' failed on a non-default --admin-port (cannot connect … localhost:8090), and mxcli log did the same. Both now take the port and password from a live .mxcli/run-local.json for any flag not given. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ilt JSON (#982) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#980) describe navigation printed a nanoflow / open-link / create-object menu item with no OnClick, and exec of that description stored Forms$NoAction: TestApp's 'Item 4' lost its nanoflow call at exit 0. The reader now keeps each item's stored action bytes; create or modify navigation and create or modify menu pair script items with stored ones by caption path and carry a stored action describe cannot print when the item states none, reporting each carried action. Describe flags such an action with a comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…refuses MDL033 comparison as a select column (CE0174), MDL034 aggregate over a grouped column (CE0174), MDL035 plain column not grouped (CE0174), MDL036 non-aggregated expression not in the GROUP BY (passes mxbuild, PostgreSQL 42803 / HSQLDB 42574 at runtime) - errors in ValidateOQLSyntax. MDL037 literal aggregate argument (HSQLDB 42567, warning) and MDL038 bare integer/string literal column (info) in ValidateOQLPortability, which only check and the LSP run. Part of #981. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
String concatenation (r.Name + ' x') is a derived String(200) in mxbuild; string / string(100) declarations are CE6770 and now MDL031. A view attribute declared autonumber over an AutoNumber column (CE6770) is refused under mdl 1 and warns MDL-V1-VIEWAUTONUMBER without the header (ADR-0011); check's reference tier now runs under the script's language version. Part of #981. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
write-oql-queries: a view entity has no ID (count a non-null column), the GROUP BY / comparison / HSQLDB literal table, String(200) concatenation, AutoNumber -> Long. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sum(0.0) and sum(1.5) fail on HSQLDB with 42567 like the integer forms; only a decimal select COLUMN is cast by Mendix (MDL038 still skips it). avg(1) runs on HSQLDB and stays unflagged. Part of #981. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…into c26-984 # Conflicts: # CHANGELOG.md
…nt (#980) Studio Pro lays an offline sync constraint out over several lines; describe prints it on one and the rewrite stored that text, so every describe -> exec of an offline profile (TestApp's TabletOffline) rewrote the navigation document. A constraint equal to the stored one apart from whitespace outside string literals now keeps the stored text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model a menu item's action the way #959 did for navigation-list items: - reader keeps the stored action document; describe renders it with renderClientActionMDL (call nanoflow, open link, create object, settings); - OnClick takes actionExprV3 (additive: the three old forms are among its alternatives); the visitor refuses kinds a menu item cannot carry; - exec builds the action with the page builder and writes it with the widget client-action serializer, for navigation and menu documents. The serializer now matches Studio Pro on the shapes it missed: OutputMappings on Forms$CallNanoflowClientAction, DisabledDuringExecution on a menu item's Forms$NoAction, and a menu item's AlternativeText and empty Items. What MDL cannot spell (title override, link type, pages to close) is flagged and kept while the built action is otherwise equal to the stored one. Navigation profiles join the TestApp/PedApp round-trip harness; Atlas_Core's Phone_Menu / Tablet_Menu and one page are struck from the allowlists. The MCP backend refuses a menu action it cannot write. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…980) describe navigation prints TestApp's sign-out item as `Icon: image System.Images.Save`, and check --references refused it as an unknown image collection, so the description only re-ran with --no-check. The System module is the platform's and no project stores its collections; a reference into one is left to mxbuild. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#980) The native profile writer applied home pages only, and exec reported "updated" while dropping a menu block (the bottom bar), login and not-found pages and on sync error; those are refused now, and the sync block is written. A native nanoflow home gets its own keyword, `home nanoflow` (additive; `home microflow` on a native profile still runs, with a warning). The reader takes a bottom bar item's action and icon, and describe lists the bar as comments so its output re-runs. Catalog schema 21. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mits (#980) The navigation syntax help, the manage-navigation skill, the docs-site navigation and menu references and the quick reference describe OnClick as a button's action expression with its settings, the kinds a menu item refuses, what describe flags and a rewrite keeps, home nanoflow, and what mxcli does and does not write for a native profile. The native example no longer shows a menu block, which is now refused. Adds bug-test 980. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… into c26-985 # Conflicts: # CHANGELOG.md
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.
Closes #980
describe navigation→ exec no longer drops or changes a menu item action. Every action kind round-trips on TestApp. Describe → exec writes nothing (the unit file is byte-identical), describe again gives identical text, andmx check(11.14.0) reports 0 errors for each kind written fresh.What changed (one commit each)
4811f3271)create or modify navigationandcreate or modify menupair each script item with its stored item by caption path.--comment.b473e9f08)3bea9594f)renderClientActionMDLand its settings renderer, the same code a button's action goes through.navMenuAction : actionExprV3. This is additive, because the three old forms are alternatives ofactionExprV3. The visitor refuses kinds a menu item cannot carry (save, delete, close page, complete task, a dynamic open link).clientActionToGen) writes it, for both navigation and menu documents.OutputMappingsonForms$CallNanoflowClientAction(78 of 78 in TestApp and PedApp)DisabledDuringExecutionon a menu item'sForms$NoActionAlternativeTextand an emptyItemslist on a menu item (Menus$MenuItem)NumberOfPagesToClose2. Describe flags each one. A rewrite keeps the stored action when the action it builds is otherwise equal to the stored one (ignoring$IDs and those keys).printMenuMDLand the writer, so they are covered too.create or modify menualso stops writing glyph and image icons as no icon.Atlas_Core.Phone_MenuandTablet_Menu(both fixtures), andpage WorkflowCommons.ConflictedWorkflowDefinitionView_ActionConfirmation, whose only loss was the nanoflowOutputMappings.check --referencesand System images (92f1a7024):Icon: image System.Images.Saveis no longer refused. The System module is the platform's, so no project stores its collections, and the reference is left to mxbuild.a51134399){ }menu block (the bottom bar),login page,not found pageandon sync error.sync ( … )is now written.home nanoflow: a new keyword (additive).home microflowon a native profile still works but warns.home nanoflowon a web profile is refused.23463322a): updated the navigation syntax help, the manage-navigation skill, the docs-site navigation and menu reference pages and the quick reference. Added a new example,mdl-examples/bug-tests/980-navigation-menu-actions.mdl.GUID and identity: a navigation item has no GUID. Its
$IDs are carried over bycanon.Reconcile, and an unchanged re-run writes nothing. On a TestApp copy, the unit is byte-identical after describe → exec.Test plan
make buildgo test ./mdl/executor/ ./mdl/backend/... ./mdl/visitor/ ./mdl/types/ ./mdl/catalog/ ./mdl/ast/ ./modelsdk/mpr/ ./mdl/grammar/ ./cmd/mxcli/...: okgo test -tags integration ./mdl/roundtrip/ -run 'TestTestAppRoundTrip$|TestPedAppRoundTrip$|TestNavigationMenuActionsRoundTrip_980|TestDescribeReExecutes_950|EditIsWritten': okTestNavigationMenuActionsRoundTrip_980adds one item per action kind to TestApp's Responsive profile, in the shape Studio Pro stores (nanoflow and microflow with every setting, open link, create object then show page, link type Email, a title override). It then checks:$IDs.make check-conformance,make lint,make check-findings,make check-mdl,make check-skill-mdl: okcheck --references→ exec → describe of the whole navigation document: the unit is byte-identical, and the second describe is identical.980-navigation-menu-actions.mdl, which writes every kind fresh to navigation and toAtlas_Core.Phone_Menu:check --referencespasses, exec passes, andmxcli docker checkreports 0 errors. Describe → exec of the result reports "Unchanged", and no file changed (md5 of all mprcontents).Revert checks
TestNavigationRewrite_KeepsAnActionMDLCannotExpress: KeepAction empty for 'Reports' and for the sub-itemTestDescribeNavigation_FlagsAnActionMDLCannotExpressTestNavMenuAction_WritesAKeptActionVerbatim: wroteForms$NoActionprintMenuMDLTestNavigationMenuActionsRoundTrip_980: "describe lost …'s action" for 5 kinds, plus both notes missing…_980: GetPut wrote the navigation unit, and PutGet differsOutputMappingsdefault on the nanoflow action…_980: GetPut, and "NF settings built from MDL differs from Studio Pro's shape"TestOfflineWriteKeepsTheStoredLayoutOfAnUnchangedConstraint. Before the fix, the TabletOffline CLI re-run changedConstraintForms$NoActionDisabledDuringExecution/Menus$MenuItemdefaultsmenu Atlas_Core.Phone_Menu/Tablet_Menubroke GetPut (the harness then said "no longer breaks getput" once they were fixed)TestIconIndexCheck_SystemCollectionIsNotRefused: "unknown image collection System.Images"TestNativeProfile_RefusesWhatItsWriterCannotApply(wrote=true, err=nil for all 4 clauses),TestNavigationHomeNanoflowTestNativeProfile_WritesSyncFollow-ups (not changed here)
NumberOfPagesToClose2. They are kept only while the item is unchanged, and a renamed item loses them. Describe flags each one. Adding them needs a syntax decision.NativePages$BottomBarItemneeds a Studio Pro reference. No local fixture has a native profile, so the reader is pinned with a hand-built document.navigation_profiles.HomePageTypestill saysMICROFLOWfor a native nanoflow home.🤖 Generated with Claude Code