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


##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx:
##########
@@ -472,7 +472,7 @@ const FiltersConfigForm = (
     formFilter?.filterType,
   );
 
-  const canDependOnOtherFilters = TYPES_SUPPORT_DEPENDENCIES.includes(
+  const canDependOnOtherFilters = filterSupportsDependencies(
     formFilter?.filterType,
   );

Review Comment:
   **Suggestion:** The dependency gate uses `formFilter?.filterType` directly, 
unlike the rest of this form which uses `itemTypeField` to fall back to 
`filterToEdit?.filterType` or the default `filter_select` while form values are 
not initialized. On the initial render after opening an existing filter or 
creating a new one, `formFilter?.filterType` can be undefined, so the 
dependency editor is hidden even though the active filter type supports cascade 
dependencies. Pass `itemTypeField` to keep this gate consistent with the 
effective filter type used by the surrounding rendering logic. [incorrect 
variable usage]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ❌ Cascade dependency editor can disappear initially.
   - ⚠️ Existing filters may require a form change before appearing.
   - ⚠️ New select filters initially omit dependency configuration.
   ```
   </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=42cb60a109d64adeb980051e1a9492ea&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=42cb60a109d64adeb980051e1a9492ea&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** 
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
   **Line:** 475:477
   **Comment:**
        *Incorrect Variable Usage: The dependency gate uses 
`formFilter?.filterType` directly, unlike the rest of this form which uses 
`itemTypeField` to fall back to `filterToEdit?.filterType` or the default 
`filter_select` while form values are not initialized. On the initial render 
after opening an existing filter or creating a new one, 
`formFilter?.filterType` can be undefined, so the dependency editor is hidden 
even though the active filter type supports cascade dependencies. Pass 
`itemTypeField` to keep this gate consistent with the effective filter type 
used by the surrounding rendering logic.
   
   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%2F43223&comment_hash=9954de6469b64e90a92594603eb8b6318519954de7a2d9bfee5909c37d0242c7&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43223&comment_hash=9954de6469b64e90a92594603eb8b6318519954de7a2d9bfee5909c37d0242c7&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