bito-code-review[bot] commented on code in PR #37065:
URL: https://github.com/apache/superset/pull/37065#discussion_r2684024580
##########
superset-frontend/src/dashboard/components/nativeFilters/state.ts:
##########
@@ -153,9 +153,12 @@ export function useSelectFiltersInScope(filters: (Filter |
Divider)[]) {
if (filterInScope) {
filtersInScope.push(filter);
- } else {
- filtersOutOfScope.push(filter);
}
+ // Skip adding tab-scoped filters to filtersOutOfScope if they're not
in scope.
+ // Filters scoped to inactive tabs (or sub-tabs) should be completely
hidden,
+ // not shown in "Filters out of scope" section.
+ // Only filters without explicit tab scope (rootPath is empty or
contains ROOT_ID)
+ // should be shown in "Filters out of scope" when they're not
applicable.
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Logic mismatch in filter scoping</b></div>
<div id="fix">
The code removes the push to filtersOutOfScope entirely, but the comments
indicate that only tab-scoped out-of-scope filters should be skipped, implying
non-tab-scoped ones should still be added. This mismatch could lead to missing
filters in the 'Filters out of scope' UI section.
</div>
</div>
<small><i>Code Review Run #5f406a</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]