Repository navigation
fix(navigation): an omitted clause keeps the stored value (mendixlabs/mxcli#1522) - #1420
Merged
Merged
Conversation
…#1522) `create or modify navigation Responsive { menu item ... }` cleared the profile's home page, role-based home pages, login page and not-found page, so the next build failed with CE0527 "Select a default home page for this profile". navPatchWebProfile wrote those four fields unconditionally from the spec, while the menu, sync block, ON SYNC ERROR and PROGRESSIVE WEB APP were already left alone when omitted. navPatchNativeProfile rebuilt RoleBasedNativeHomePages the same way. An omitted clause now keeps the stored value for every field. `home ... for <role>` replaces that role's home page only; a role the statement does not mention keeps its own (navMergeRoleHomes). MDL has no clause that clears a home, login or not-found page, so such a page can no longer be removed by leaving it out. describe -> exec is unaffected, since describe states every clause. Both patchers now work on a copy of the stored profile, because navSetField writes in place. The docs said both "fully replaces" and "omitting the block leaves it alone"; syntax help, skills and docs-site now describe the one rule. Measured with mx check after a menu-only statement on a profile with a home page: 11.15.0 and 11.6.6 both CE0527 (1 error) before, 0 errors after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W3x8Fyvir8kLyPgJs1BDmF
Resolve the manage-navigation skill index conflict with #1421 by regenerating the skill index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W3x8Fyvir8kLyPgJs1BDmF
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.
Fixes the partial-navigation part of mendixlabs#1522 (#1404). The maintainer decided that an omitted clause keeps its stored value, as the menu, PWA and sync-error clauses already do.
The bug
navPatchWebProfile(mdl/backend/modelsdk/navigation_write.go) always wrote the home page, the role-based home pages, the login page and the not-found page from the statement, so any of them the statement left out was cleared. On a profile with a home page,create or modify navigation Responsive { menu item 'B' (...) };removed the home page, and mx check then gave CE0527 "Select a default home page for this profile".navPatchNativeProfiledid the same for role-based native home pages.Fix
home … for <role>replaces only that role's home page. Roles the statement does not mention keep theirs (navMergeRoleHomes, case-insensitive role match).navigation.create;alter-navigation.md,navigation-profiles.mdand the quick reference;Tests
TestUpdateNavigationProfile_OmittedClausesKeepStoredTestNavPatchWebProfile_StatedClausesReplaceTestNavPatchNativeProfile_OmittedRoleHomesKeepStoredRevert check: the tests fail with the fix reverted and pass with it restored.
Measured with mx check
A menu-only statement on a profile that has a home page went from CE0527 (1 error) to 0 errors, on both 11.15.0 and 11.6.6. The bug test
mdl-examples/bug-tests/1522-navigation-omitted-clause-keeps-stored.mdlgives CE0527 with the old binary and 0 errors with the new one.Open questions
create or replace navigationfollows the same keep-what-is-omitted rule ascreate or modify, because the parser has always treated them the same. Shouldreplaceinstead replace everything?Also: a finding file.
make build,make test,make lintandmake check-findingspass. Not in this PR: the glyph part (separate PR) and the check for a home page a role cannot open (1404 c).🤖 Generated with Claude Code
https://claude.ai/code/session_01W3x8Fyvir8kLyPgJs1BDmF
Generated by Claude Code