codeant-ai-for-open-source[bot] commented on code in PR #39922:
URL: https://github.com/apache/superset/pull/39922#discussion_r3482750058


##########
superset/mcp_service/app.py:
##########
@@ -668,6 +670,7 @@ def create_mcp_app(
 # NOTE: Always add new prompt/resource imports here when creating new 
prompts/resources.
 # Prompts use @mcp.prompt decorators and resources use @mcp.resource 
decorators.
 # They register automatically on import, similar to tools.
+import superset.mcp_service.chart.plugins  # noqa: F401, E402  — registers all 
chart type plugins

Review Comment:
   ✅ **Customized review instruction saved!**
   
   **Instruction:**
   > Do not flag eager top-level imports in `superset/mcp_service/app.py` when 
they are intentionally used to trigger registration side effects at startup; if 
the imported plugin package is broken, the startup failure should surface 
rather than be swallowed.
   
   **Applied to:**
     - `superset/mcp_service/**`
   
   ---
   💡 *To manage or update this instruction, visit: [CodeAnt AI 
Settings](https://app.codeant.ai/org/settings/learnings)*



##########
superset/mcp_service/chart/schemas.py:
##########
@@ -102,7 +105,15 @@ class ChartInfo(BaseModel):
 
     id: int | None = Field(None, description="Chart ID")
     slice_name: str | None = Field(None, description="Chart name")
-    viz_type: str | None = Field(None, description="Visualization type")
+    viz_type: str | None = Field(None, description="Visualization type 
(internal ID)")
+    chart_type_display_name: str | None = Field(
+        None,
+        description=(
+            "User-friendly chart type name (e.g. 'Line Chart', 'Pivot Table'). 
"
+            "Prefer this field when referring to chart types; "
+            "fall back to viz_type when this field is null."
+        ),
+    )

Review Comment:
   ✅ **Customized review instruction saved!**
   
   **Instruction:**
   > Do not flag computed fields in the chart list endpoint when including them 
would require per-row plugin/registry lookups; `list_charts` intentionally 
avoids those lookups for performance. Only expect such fields in endpoints that 
already serialize full chart objects.
   
   **Applied to:**
     - `superset/mcp_service/chart/tool/**`
   
   ---
   💡 *To manage or update this instruction, visit: [CodeAnt AI 
Settings](https://app.codeant.ai/org/settings/learnings)*



-- 
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