I3eka commented on code in PR #43133:
URL: https://github.com/apache/superset/pull/43133#discussion_r3810342162


##########
superset/mcp_service/dashboard/tool/generate_dashboard.py:
##########
@@ -262,13 +322,19 @@ def generate_dashboard(  # noqa: C901
                     )
 
         # Create dashboard layout with chart objects.
-        # If the caller provided an explicit position_json, use it verbatim;
-        # otherwise auto-generate a packed-grid layout from the chart ids.
+        # Invalid explicit layouts make frontend hydration fail before chart
+        # queries start, so fall back to the known-good packed grid.
         with event_logger.log_context(action="mcp.generate_dashboard.layout"):
-            if request.position_json:
+            if request.position_json and _is_valid_dashboard_layout(

Review Comment:
   Updated in 9ec50e7ee1. The caller-facing tool description now states that 
only a valid `position_json` replaces the generated grid and that invalid input 
falls back to the generated layout with a warning, matching both the schema and 
runtime behavior. The two position_json regression tests pass.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to