Skip to content

Add schema search and filter to sidebar#50

Open
muk2 wants to merge 2 commits intomainfrom
feature/issue-37-schema-filter
Open

Add schema search and filter to sidebar#50
muk2 wants to merge 2 commits intomainfrom
feature/issue-37-schema-filter

Conversation

@muk2
Copy link
Owner

@muk2 muk2 commented Feb 20, 2026

Summary

Adds a search/filter bar to the sidebar for quickly finding tables, views, and databases by name.

  • Activation: Press / in the sidebar to activate filter input (Vim-style)
  • Real-time filtering: Sidebar tree filters as user types, showing only matching items
  • Substring matching: Case-insensitive substring match (e.g., "user" matches "users", "user_roles")
  • Context preservation: Filtered results show parent schema context
  • All tabs: Filter works across Databases, Tables, and History tabs
  • Clear: Escape clears filter and returns to full tree view

Keyboard Shortcuts

Key Action
/ Activate filter input
Esc Clear filter / exit filter mode
Enter Exit filter input (keep filter)
Backspace Delete filter chars (deactivates on empty)

Files Changed

File Description
src/ui/app.rs Filter state, input handling, match logic, 3 unit tests
src/ui/components.rs Filter bar rendering, filtered tree/list drawing

Test plan

  • cargo build passes
  • cargo test — 228 tests pass (3 new)
  • / activates filter bar in sidebar
  • Typing filters tables in real-time
  • Esc clears filter
  • Works across all sidebar tabs

Closes #37

🤖 Generated with Claude Code

muk2 and others added 2 commits February 20, 2026 14:49
Adds a '/' activated search/filter bar in the sidebar for quickly finding
tables, views, and databases by name. Supports real-time substring matching
as the user types, case-insensitive filtering across all sidebar tabs.

- Press '/' in sidebar to activate filter input
- Real-time filtering as user types
- Case-insensitive substring matching on table/view/database/history names
- Filtered tree preserves schema context (shows parent schemas of matches)
- Escape clears filter and returns to full tree view
- Enter exits filter input mode while keeping filter active
- Backspace on empty filter deactivates filter mode
- 3 unit tests for filter matching logic

Closes #37

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Run cargo fmt for consistent code formatting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Feature: Schema search and filter

1 participant