Skip to content

Scope table filtering: support scoped Table Filter, refine matching and loading behavior#10

Merged
koianaoki merged 1 commit into
codex/fix-filter-issue-in-tree-viewfrom
codex/align-filter-function-with-main-branch
May 11, 2026
Merged

Scope table filtering: support scoped Table Filter, refine matching and loading behavior#10
koianaoki merged 1 commit into
codex/fix-filter-issue-in-tree-viewfrom
codex/align-filter-function-with-main-branch

Conversation

@koianaoki
Copy link
Copy Markdown
Owner

Motivation

  • Improve the Explorer tree filter to support a scoped "Table Filter" that searches only inside a Tables subtree without affecting the main connection/database behavior.
  • Prevent unnecessary loading of folders during global searches while allowing the Table Filter to load and search table folders.
  • Make node traversal and match selection consistent between scoped and unscoped filters so cursor movement and activation behave correctly.

Description

  • Added a scoped filter flag via self._tree_filter_scope_path and conditioned loading, counting, matching, and visibility logic on that flag in TreeFilterMixin.
  • Introduced _tree_filter_should_descend_node to control whether children are inspected during filtering and tightened _tree_filter_can_match_node to restrict default matches to connection/database types while scoped filters match tables only.
  • Updated _update_tree_filter, _find_matching_nodes, _count_all_nodes, _ensure_tree_filter_search_nodes_loaded, _tree_filter_node_has_pending_load, _apply_filter_to_tree, _jump_to_current_match, and action_tree_filter_accept to handle scoped vs unscoped behavior correctly, and preserved main filter behavior for activation and cursor restoration.
  • Added protocol declaration for _tree_filter_should_descend_node in ExplorerActionsProtocol and adjusted label/visibility handling to preserve highlight and pending-load semantics.
  • Tests adjusted and new tests added in tests/ui/test_tree_filter_tables_scope.py to validate scoped searches, loading behavior, and accept/activation behavior.

Testing

  • Ran the unit tests in tests/ui/test_tree_filter_tables_scope.py which include expanded scenarios for scoped table filtering, folder loading behavior, and accept/activation; all tests passed.
  • Exercised TreeFilterMixin behaviors for both scoped (action_table_filter) and unscoped (action_tree_filter) flows via the test suite, and assertions for cursor, selection, loading calls, and visibility succeeded.

Codex Task

@koianaoki koianaoki merged commit dabb020 into codex/fix-filter-issue-in-tree-view May 11, 2026
@koianaoki koianaoki deleted the codex/align-filter-function-with-main-branch branch May 11, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant