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


##########
superset-frontend/src/explore/components/DatasourcePanel/types.ts:
##########
@@ -27,6 +27,18 @@ export interface DatasourcePanelDndItem {
   type: DndItemType;
 }
 
+/**
+ * Payload for dragging a whole folder out of the DatasourcePanel. `items` are
+ * the folder's columns/metrics (recursively including subfolders) already
+ * shaped as individual DnD items so drop targets can reuse their per-item
+ * `canDrop`/`onDrop` logic.
+ */
+export interface FolderDndItem {
+  type: DndItemType.Folder;
+  name: string;
+  items: DatasourcePanelDndItem[];
+}

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Dead code: unused exported interface</b></div>
   <div id="fix">
   
   The `FolderDndItem` interface is dead code. It is exported but never 
imported or referenced anywhere in the codebase. Its shape (with `type: 
DndItemType.Folder`, `name`, `items`) does not match the actual drag data 
object, which is `ActiveDragData` with optional `type`, `name`, `items`, 
`folderIds` fields. The JSDoc claim that drop targets "reuse per-item 
canDrop/onDrop logic" is also misleading — `onDropFolder` receives 
`DatasourcePanelDndItem[]` directly, not a `FolderDndItem` wrapper.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #e7ae6f</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