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


##########
superset-frontend/src/components/ImportModal/ErrorAlert.tsx:
##########
@@ -44,7 +44,11 @@ export const ErrorAlert: FunctionComponent<IProps> = ({
     css={(theme: SupersetTheme) => antdWarningAlertStyles(theme)}
     type="error"
     showIcon
-    message={errorMessage}
+    message={
+      <>
+        <strong>{t('Error:')}</strong> {errorMessage}
+      </>
+    }

Review Comment:
   **Suggestion:** This accessibility change is applied in a component that is 
not used by the import modal flow, so the runtime UI still renders 
`ImportErrorAlert` from a different file and will not get this new non-color 
cue. Move the same message/label change to the actually-rendered import alert 
component (or replace its usage) so users see the intended behavior. 
[incomplete implementation]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ⚠️ Import modal error alerts lack new text prefix.
   - ⚠️ All model import flows miss updated a11y cue.
   - ⚠️ WCAG 1.4.1 goal not met for import errors.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Open any import list page, e.g. Theme list defined in
   `superset-frontend/src/pages/ThemeList/index.tsx:47`, which imports 
`ImportModal as
   ImportModelsModal` from `src/components/ImportModal`.
   
   2. Trigger the import modal (`<ImportModelsModal ... />` usage at
   `ThemeList/index.tsx:640-643`) and attempt an import with a bad file so
   `useImportResource` in 
`superset-frontend/src/components/ImportModal/index.tsx:22` calls
   `handleErrorMsg` and sets `errorMessage` (see `handleErrorMsg` at 
`index.tsx:122-124`).
   
   3. Observe that the modal renders `<ImportErrorAlert ... />` when 
`errorMessage` is set
   (`index.tsx:235-245`), and `ImportErrorAlert` in
   `superset-frontend/src/components/ImportModal/ImportErrorAlert.tsx:36-65` 
passes
   `errorMessage` as `message` into the shared `ErrorAlert` imported from 
`src/components`
   (`ImportErrorAlert.tsx:24,40-44`), not the local `ErrorAlert` component.
   
   4. Confirm via code search that
   `superset-frontend/src/components/ImportModal/ErrorAlert.tsx:38-73` (the 
component whose
   `message` was updated to include `<strong>{t('Error:')}</strong> 
{errorMessage}` at lines
   47-51) is never imported or used in the import modal flow (`grep 
'./ErrorAlert'` under
   `superset-frontend/src` only shows usages in `src/components/ErrorMessage`, 
not in
   `src/components/ImportModal`), so the new non-color cue is never visible in 
actual import
   error alerts.
   ```
   </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=af5408f60a464948884f11af923096f5&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=af5408f60a464948884f11af923096f5&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/components/ImportModal/ErrorAlert.tsx
   **Line:** 47:51
   **Comment:**
        *Incomplete Implementation: This accessibility change is applied in a 
component that is not used by the import modal flow, so the runtime UI still 
renders `ImportErrorAlert` from a different file and will not get this new 
non-color cue. Move the same message/label change to the actually-rendered 
import alert component (or replace its usage) so users see the intended 
behavior.
   
   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%2F39233&comment_hash=88501e4834e2499d42888aea5041f7222ceec6fc54ce52e365c2a81d434f5777&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39233&comment_hash=88501e4834e2499d42888aea5041f7222ceec6fc54ce52e365c2a81d434f5777&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