Add global navigation to MCP browse_screens response
Adds globalNav array to every browse_screens response with links to: - My Notifications (apps/my/User/Notifications) - My Messages (apps/my/User/Messages/FindMessage) - My Calendar (apps/my/User/Calendar/MyCalendar) - My Tasks (apps/my/User/Task/MyTasks) These mirror the MyAccountNav component in the web UI and are always available regardless of which app the user is currently browsing. Also adds a hint in uiNarrative.notes about globalNav and search.
Showing
2 changed files
with
12 additions
and
0 deletions
| ... | @@ -2449,6 +2449,15 @@ def wikiInstructions = getWikiInstructions(inputScreenPath) | ... | @@ -2449,6 +2449,15 @@ def wikiInstructions = getWikiInstructions(inputScreenPath) |
| 2449 | subscreens: subscreens, | 2449 | subscreens: subscreens, |
| 2450 | renderMode: actualRenderMode | 2450 | renderMode: actualRenderMode |
| 2451 | ] | 2451 | ] |
| 2452 | |||
| 2453 | // Add global navigation - these are always available regardless of current app | ||
| 2454 | // Mirrors the MyAccountNav component in the web UI | ||
| 2455 | resultMap.globalNav = [ | ||
| 2456 | [name: "My Notifications", path: "apps/my/User/Notifications", icon: "info"], | ||
| 2457 | [name: "My Messages", path: "apps/my/User/Messages/FindMessage", icon: "message"], | ||
| 2458 | [name: "My Calendar", path: "apps/my/User/Calendar/MyCalendar", icon: "calendar"], | ||
| 2459 | [name: "My Tasks", path: "apps/my/User/Task/MyTasks", icon: "tasks"] | ||
| 2460 | ] | ||
| 2452 | 2461 | ||
| 2453 | if (currentPath != "root") { | 2462 | if (currentPath != "root") { |
| 2454 | try { | 2463 | try { | ... | ... |
| ... | @@ -251,6 +251,9 @@ class UiNarrativeBuilder { | ... | @@ -251,6 +251,9 @@ class UiNarrativeBuilder { |
| 251 | } | 251 | } |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | // Hint about global nav and search | ||
| 255 | notes << "Global nav (Messages, Tasks, Calendar, Notifications) available in response.globalNav. Use moqui_search_screens(query='...') to find other screens." | ||
| 256 | |||
| 254 | return notes | 257 | return notes |
| 255 | } | 258 | } |
| 256 | 259 | ... | ... |
-
Please register or sign in to post a comment