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


##########
superset-frontend/packages/superset-ui-core/src/components/Tooltip/index.tsx:
##########
@@ -16,17 +16,22 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+import { forwardRef } from 'react';
 import { Tooltip as AntdTooltip } from 'antd';
+import type { TooltipRef } from 'antd/es/tooltip';

Review Comment:
   **Suggestion:** Remove the direct `antd/es/tooltip` type import and use a 
local/ref-safe type derived from the wrapped tooltip component (or an approved 
shared wrapper type) to avoid importing Ant Design internals directly in UI 
source. [custom_rule]
   
   **Severity Level:** Minor ⚠️
   <details>
   <summary><b>Why it matters? 🤔 </b></summary>
   
   This is a real direct Ant Design import in frontend UI code. The rule 
explicitly prohibits importing `antd` directly and prefers `@superset-ui/core` 
or approved wrappers, so this violation is verifiable from the existing code.
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=5adbf162fb8f4130be662bc38f329018&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=5adbf162fb8f4130be662bc38f329018&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** 
superset-frontend/packages/superset-ui-core/src/components/Tooltip/index.tsx
   **Line:** 21:21
   **Comment:**
        *Custom Rule: Remove the direct `antd/es/tooltip` type import and use a 
local/ref-safe type derived from the wrapped tooltip component (or an approved 
shared wrapper type) to avoid importing Ant Design internals directly in UI 
source.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40012&comment_hash=53bcc8fa03a9022e850d5e3e3ec877a457de08cf55f5b349b6e8cea73bc9a50b&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40012&comment_hash=53bcc8fa03a9022e850d5e3e3ec877a457de08cf55f5b349b6e8cea73bc9a50b&reaction=dislike'>👎</a>



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