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


##########
superset/mcp_service/dashboard/schemas.py:
##########
@@ -708,6 +708,138 @@ class GenerateDashboardResponse(BaseModel):
     )
 
 
+class UpdateDashboardRequest(BaseModel):
+    """Request schema for partially updating dashboard metadata.
+
+    All fields except ``dashboard_id`` are optional — only the fields that
+    are provided are changed. ``None`` means "leave unchanged"; to clear a
+    text field (e.g. ``certified_by``) pass an empty string.
+    """
+
+    model_config = ConfigDict(populate_by_name=True)
+
+    dashboard_id: int = Field(..., description="ID of the dashboard to update")
+
+    # Direct dashboard fields (match DashboardPutSchema)
+    dashboard_title: str | None = Field(
+        None,
+        description="New dashboard title.",
+        validation_alias=AliasChoices("dashboard_title", "title", "name"),
+    )
+    slug: str | None = Field(
+        None, description="New URL slug for the dashboard (must be unique)."
+    )
+    published: bool | None = Field(
+        None,
+        description=(
+            "Set to true to publish the dashboard (visible to other users), "
+            "false to unpublish it (draft)."
+        ),
+    )
+    css: str | None = Field(None, description="Custom CSS applied to the 
dashboard.")
+    theme_id: int | None = Field(None, description="Theme ID for the 
dashboard.")
+    certified_by: str | None = Field(
+        None,
+        description=(
+            "Person or group that certified this dashboard. "
+            "Pass an empty string to clear."
+        ),
+    )
+    certification_details: str | None = Field(
+        None,
+        description=("Details of the certification. Pass an empty string to 
clear."),
+    )
+    roles: list[int] | None = Field(
+        None,
+        description=(
+            "FULL REPLACEMENT list of role IDs with dashboard access "
+            "(DASHBOARD_RBAC). The provided list replaces existing roles."
+        ),
+    )
+    tags: list[int] | None = Field(
+        None,
+        description=(
+            "FULL REPLACEMENT list of tag IDs. The provided list replaces "
+            "existing tags — include existing tag IDs to keep them."
+        ),
+    )

Review Comment:
   ✅ **Customized review instruction saved!**
   
   **Instruction:**
   > Do not require `owners` on the dashboard update MCP tool when the field 
would be full-replacement; owner management should be handled by a dedicated 
add/remove tool instead of `update_dashboard`.
   
   **Applied to:**
     - `superset/mcp_service/dashboard/**`
   
   ---
   💡 *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