feat: universal styled search filter with / key#274
Merged
Conversation
Replace the plain footer-text filter UI with a styled search input box (matching the `:` command bar) that works at the app level across all 7 filterable views (stacks, services, nodes, contexts, secrets, configs, networks). - New `views/searchinput/` component mirroring `commandinput/` - `Filterable` interface in `views/view/interface.go` (opt-in via type assertion) - App intercepts `/`, opens styled search box, routes SearchQueryMsg/SearchClearedMsg - Views that don't implement Filterable (logs, inspect) keep their own `/` handling - Sub-lists (usedBy, inspect) retain FilterableList's internal ModeSearching - Footer now shows compact "(filtered)" suffix instead of a dedicated filter line - ESC clears active filter on all 7 views when search box is closed Closes #271 Co-Authored-By: Claude Opus 4.6 <[email protected]>
996124e to
a5aa3a0
Compare
Collaborator
|
Nice, I can confirm that it works. However, I would like to see the term we are searching for after pressing enter. I suppose the easiest way would be to keep the search box visible, but maybe hint that we are not in the editing mode. Suggest a nice UX for this. |
After confirming a search with Enter, the box stays visible with dimmed styling instead of disappearing. Press `/` to resume editing, Esc to clear and dismiss. Removes redundant `(filtered)` footer suffix. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Collaborator
|
I tested as well, really good. Can we extend this search UI to the search in logs? |
Collaborator
This is a follow up issue: #275 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
views/searchinput/component (styled search box matching the:command bar) that handles/filtering at the app levelFilterableinterface — 7 views (stacks, services, nodes, contexts, secrets, configs, networks) implement it to receive search queries from the app-level search boxFilterable(logs, inspect) keep their own/search handling unchanged; sub-lists (usedBy) retainFilterableList's internalModeSearching(filtered)suffix instead of a dedicated filter line; ESC clears active filter on all viewsCloses #271
Follow-up: #275 tracks migrating logs, inspect, and help views to the unified search box (phases 2–4).
Test plan
go buildcompilesgo test ./...— all unit tests pass (including 9 new searchinput tests)golangci-lint run ./...— 0 issues/on stacks view → styled box appears, type query → list filters live, Enter → box closes but filter stays, Esc → filter clears/on logs view → view's own search activates (NOT the new search box):while search box open → ignored; press/while command input open → ignored🤖 Generated with Claude Code