Skip to content

Restructure globalFilters state for per-table recent filters#3813

Open
flomillot wants to merge 6 commits intomainfrom
refactor-recent-global-filters
Open

Restructure globalFilters state for per-table recent filters#3813
flomillot wants to merge 6 commits intomainfrom
refactor-recent-global-filters

Conversation

@flomillot
Copy link
Contributor

PR Summary

This PR refactors the globalFilters state structure to track recent filters per table. Previously, recent filters were shared across tables, resulting in unintended behavior when interacting with multiple tables. Recent filters are now stored in state.tableFilters.globalFilters[tableId].recents, ensuring they are managed distinctly per table.

Additionally, the middleware has been updated to send both selected and recent filters to the backend, differentiating them using the unselectedDate field.

flomillot and others added 5 commits March 13, 2026 18:20
Move recent filters tracking from the shared globalFilterOptions
(unselectedDate on GlobalFilter) into a per-table recents map
in state.tableFilters.globalFilters[tableId].recents.

This ensures that unselecting a filter in one table does not
show it as recent in another table. The middleware now sends
both selected and recent filters to the backend, distinguished
by the presence of unselectedDate.

Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

Warning

Rate limit exceeded

@flomillot has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 21 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 89a75e61-3a10-475b-a48f-20b1bbc6928d

📥 Commits

Reviewing files that changed from the base of the PR and between 94eed1c and 6aa83ce.

📒 Files selected for processing (10)
  • src/components/results/common/global-filter/global-filter-autocomplete.tsx
  • src/components/results/common/global-filter/global-filter-context.ts
  • src/components/results/common/global-filter/global-filter-provider.tsx
  • src/components/results/common/global-filter/global-filter-types.ts
  • src/components/results/common/global-filter/global-filter-utils.ts
  • src/components/results/common/global-filter/use-selected-global-filters.ts
  • src/components/spreadsheet-view/spreadsheet/spreadsheet-toolbar/save/save-spreadsheet-collection-dialog.tsx
  • src/redux/globalFiltersMiddleware.ts
  • src/redux/reducer.ts
  • src/redux/reducer.type.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants