Skip to content

Conversation

ngokturkkarli
Copy link

SUMMARY

This PR fixes circular dependency issues in dashboard native filters and improves dependency handling. The changes include:

TESTING INSTRUCTIONS

  • Open dashboard → click "Add or edit filters" button
  • Create Filter A and Filter B
  • Set Filter A to depend on Filter B
  • Try to set Filter B to depend on Filter A - this should be prevented

ADDITIONAL INFORMATION

@dosubot dosubot bot added the dashboard:native-filters Related to the native filters of the Dashboard label Sep 28, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Performance Inefficient circular dependency checking ▹ view 🧠 Not in standard
Performance Unnecessary array copying in dependency map ▹ view 🧠 Not in scope
Performance Overly broad useMemo dependencies ▹ view 🧠 Incorrect
Functionality Inconsistent dependency UI state ▹ view 🧠 Incorrect
Files scanned
File Path Reviewed
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DependencyList.tsx
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

Comment on lines +587 to +590
const availableFilters = useMemo(
() => getAvailableFilters(filterId),
[getAvailableFilters, filterId, filters],
);

This comment was marked as resolved.

Comment on lines 923 to +925
{canDependOnOtherFilters &&
hasAvailableFilters && (
(hasAvailableFilters ||
dependencies.length > 0) && (

This comment was marked as resolved.

Comment on lines +369 to +379
Object.keys(filters).forEach(key => {
const formItem = filters[key];
const configItem = filterConfigMap[key];
let array: string[] = [];
if (formItem && 'dependencies' in formItem) {
array = [...formItem.dependencies];
} else if (configItem?.cascadeParentIds) {
array = [...configItem.cascadeParentIds];
}
dependencyMap.set(key, array);
});

This comment was marked as resolved.

Comment on lines +388 to +390
const testDependencies = [...currentDependencies, id];
const testMap = new Map(dependencyMap);
testMap.set(filterId, testDependencies);

This comment was marked as resolved.

@msyavuz msyavuz self-requested a review September 28, 2025 18:36
@ngokturkkarli ngokturkkarli marked this pull request as draft September 28, 2025 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard:native-filters Related to the native filters of the Dashboard review:draft size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants