Skip to content

fix: clear filter state when no tab is selected after close#559

Merged
datlechin merged 1 commit intomainfrom
fix/fk-filter-state-leak
Apr 3, 2026
Merged

fix: clear filter state when no tab is selected after close#559
datlechin merged 1 commit intomainfrom
fix/fk-filter-state-leak

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

  • Fix stale filter pane persisting after FK navigation tab is closed
  • When handleTabChange transitions to no tab (newTabId == nil), filterStateManager.clearAll() was never called, leaving isVisible = true and stale FK filters on the coordinator-level state
  • Opening a new table after this would show the filter pane with the old FK filter

Root cause: FilterStateManager.isVisible is coordinator-level (not per-tab). setFKFilter() sets isVisible = true, but the nil-tab branch in handleTabChange never reset it.

Test plan

  • Open a table with FK columns
  • Cmd+Enter on FK cell → click "Open {table}" → filter pane opens with FK filter
  • Close the FK-navigated tab (Cmd+W)
  • Open any other table → filter pane should be closed, no stale filters

@datlechin datlechin merged commit a7d5310 into main Apr 3, 2026
2 checks passed
@datlechin datlechin deleted the fix/fk-filter-state-leak branch April 3, 2026 01:45
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.

1 participant