rusackas opened a new pull request, #44366: URL: https://github.com/apache/superset/pull/44366
### SUMMARY Follow-up to #43223 (merged). Two `codeant-ai` review comments on that PR were never addressed before merge - both are real, traced against current `master`, not just relayed from the bot: - `FiltersConfigForm.tsx`: `canDependOnOtherFilters` read `formFilter?.filterType` directly, unlike `itemTypeField`'s own fallback chain (`formFilter?.filterType || filterToEdit?.filterType || 'filter_select'`) used everywhere else in this component. `formFilter?.filterType` can be `undefined` on the first render before the antd Form hydrates, which hid the "Values are dependent on other filters" section even for a filter type that does support cascading (Select/Range). - `useFilterOperations.ts`: `buildDependencyMap` read each filter's `dependencies` array as-is, without re-checking that a listed parent still supports cascading. If a parent's type changes to one that no longer supports dependencies within the same open-modal editing session (before saving), the stale relationship lingered in the live dependency map and preview. Now filters each parent id through the existing `canBeUsedAsDependency` check on every rebuild. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Not applicable - both are internal state-derivation fixes with no new UI. ### TESTING INSTRUCTIONS ``` cd superset-frontend && npm run test -- src/dashboard/components/nativeFilters/FiltersConfigModal/hooks/useFilterOperations.test.ts ``` Added two regression tests for the `buildDependencyMap` fix (confirmed they fail against the pre-fix code). Did not add a `FiltersConfigForm.tsx`-level test for the `itemTypeField` fix - no existing test harness covers this component at that render level (matches #43223's own testing approach, which relied on manual QA there and unit tests only for the hooks). Manually, on a dashboard: 1. Open **Manage filters**, add a Select filter A and a Range filter B, set B to depend on A. 2. Change A's type to Time column or Time grain (without saving). 3. Before: B's dependency preview could still reflect A as a valid parent. After: it drops out immediately. 4. Re-open an existing filter that already has a saved cascade parent - confirm the "Values are dependent on other filters" section renders on the very first paint, not just after an interaction triggers a re-render. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
