bito-code-review[bot] commented on code in PR #40475:
URL: https://github.com/apache/superset/pull/40475#discussion_r3531963243


##########
superset-frontend/src/dashboard/types.ts:
##########
@@ -231,6 +231,9 @@ export type Datasource = Dataset & {
   column_types: GenericDataType[];
   table_name: string;
   database?: Database;
+  // Populated by the dashboard datasets API alongside ``type``; declared here
+  // so callers can rely on structural typing instead of casting.
+  datasource_type?: DatasourceType;

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Mismatch: TS type added, backend not serializing</b></div>
   <div id="fix">
   
   The `datasource_type` field is declared in the TypeScript type but the 
backend `DashboardDatasetSchema` does not include it — only `type`. The 
`_serialize_dashboard_dataset` method dumps the schema payload which lacks 
`datasource_type`, so callers relying on this field will always receive 
`undefined` at runtime. Without the Python schema field, this annotation is 
misleading.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #768548</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]

Reply via email to