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


##########
superset-frontend/src/theme/ThemeController.ts:
##########
@@ -28,11 +28,16 @@ import {
   normalizeThemeConfig,
 } from '@apache-superset/core/theme';
 import { makeApi, SupersetClient } from '@superset-ui/core';
+import { DirectionType } from 'antd/es/config-provider';

Review Comment:
   **Suggestion:** Replace the direct `antd` type import with a non-`antd` 
source (an existing exported theme type or a local narrow union type) so 
frontend UI code does not import from `antd` directly. [custom_rule]
   
   **Severity Level:** Minor ⚠️
   <details>
   <summary><b>Why it matters? 🤔 </b></summary>
   
   This is a direct import from `antd` in frontend UI code, which the rule 
explicitly forbids. The code should use `@superset-ui/core` or an approved 
wrapper instead of importing from `antd` directly.
   </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=65a55e84786343479ba1d5bbd89cb7dd&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=65a55e84786343479ba1d5bbd89cb7dd&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/src/theme/ThemeController.ts
   **Line:** 31:31
   **Comment:**
        *Custom Rule: Replace the direct `antd` type import with a non-`antd` 
source (an existing exported theme type or a local narrow union type) so 
frontend UI code does not import from `antd` directly.
   
   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%2F34629&comment_hash=4a26b841777533cd2ac49907eb43d63838f7982f3de7827b75b67f0076382d32&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F34629&comment_hash=4a26b841777533cd2ac49907eb43d63838f7982f3de7827b75b67f0076382d32&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