Skip to content

Explorer: add table metadata shortcuts, regex tree-filter, and MySQL index fix#3

Merged
koianaoki merged 1 commit into
codex/fix-filter-issue-in-tree-viewfrom
codex/add-shortcuts-for-table-index-and-columns-5fy76b
May 11, 2026
Merged

Explorer: add table metadata shortcuts, regex tree-filter, and MySQL index fix#3
koianaoki merged 1 commit into
codex/fix-filter-issue-in-tree-viewfrom
codex/add-shortcuts-for-table-index-and-columns-5fy76b

Conversation

@koianaoki
Copy link
Copy Markdown
Owner

Motivation

  • Provide quick access to table metadata (columns and indexes) from the explorer tree to improve discovery and debugging.
  • Allow more powerful tree searching by enabling regex-based tree-filter queries alongside existing fuzzy/plain modes.
  • Correct MySQL index listing to include the PRIMARY index and clean up provider typing and schema-load token handling.

Description

  • Added two new actions and key bindings: show_table_columns and show_table_indexes in the default keymap and updated tests to assert their presence.
  • Extended TreeOnTableState footer bindings to expose the new metadata shortcuts and added TreeMixin implementations for action_show_table_columns and action_show_table_indexes with MySQL-specific SHOW FULL COLUMNS / SHOW INDEX helpers and a generic schema-service fallback; added helpers _selected_table_node_data, _is_mysql_like_provider, _format_mysql_table_reference, _show_mysql_full_columns, _show_mysql_indexes, and _index_table_matches.
  • Enhanced tree filtering by adding regex mode to TreeFilterMixin with parsing of prefixes (/, re:, r:), compiled pattern caching, matching/highlighting logic, and new state fields; imported re and added protocol fields in shared/ui/protocols/explorer.py.
  • Fixed MySQL index query in MySQLBaseAdapter.get_indexes to stop excluding PRIMARY and adjusted a type annotation on apply_database_override; replaced uses of setattr(self, "_schema_load_request_token", ...) with direct assignment.
  • Added and updated tests to cover the new features: UI tests for metadata shortcuts and keymap, unit tests for MySQL index behavior, and unit tests for regex tree-filter behavior.

Testing

  • Ran unit tests for tree filter and MySQL changes via tests/unit/test_tree_filter.py and tests/unit/test_mysql_indexes.py, and they passed.
  • Ran UI-level tests for explorer metadata shortcuts and keymap provider via tests/ui/explorer/test_table_metadata_shortcuts.py and tests/ui/keybindings/test_keymap_provider.py, and they passed.
  • All added and modified automated tests completed successfully in the test run.

Codex Task

@koianaoki koianaoki merged commit af08c6c into codex/fix-filter-issue-in-tree-view May 11, 2026
@koianaoki koianaoki deleted the codex/add-shortcuts-for-table-index-and-columns-5fy76b branch May 11, 2026 01:32
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