bito-code-review[bot] commented on code in PR #40961:
URL: https://github.com/apache/superset/pull/40961#discussion_r3406524822
##########
superset/mcp_service/dashboard/schemas.py:
##########
@@ -374,6 +374,17 @@ class GetDashboardLayoutRequest(BaseModel):
]
+class GetDashboardDatasetsRequest(BaseModel):
+ """Request schema for get_dashboard_datasets."""
+
+ identifier: Annotated[
+ int | str,
+ Field(
+ description="Dashboard identifier - can be numeric ID, UUID
string, or slug"
+ ),
+ ]
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Semantic duplication in request schemas</b></div>
<div id="fix">
The new `GetDashboardDatasetsRequest` class is semantically identical to
`GetDashboardLayoutRequest` (lines 366-374). Both define the same `identifier`
field with identical type annotation and description. This duplication creates
maintenance risk — any future change to identifier handling must be applied in
two places, risking divergence. Consider extracting a shared
`DashboardIdentifier` mixin or base class.
</div>
</div>
<small><i>Code Review Run #a262d1</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]