fix: resolve search behavior when cursor is not at top of list

- Fix search mode not triggering properly after navigation
- Preserve cursor position during filtering operations
- Add comprehensive UI tests for search functionality
- Improve search to include user field filtering
This commit is contained in:
2025-09-08 16:37:25 +02:00
parent 44ffa0c31d
commit 9bb5d18f8e
3 changed files with 318 additions and 0 deletions

View File

@@ -57,6 +57,12 @@ func (m Model) filterHosts(query string) []config.SSHHost {
continue
}
// Check the user
if strings.Contains(strings.ToLower(host.User), query) {
filtered = append(filtered, host)
continue
}
// Check the tags
for _, tag := range host.Tags {
if strings.Contains(strings.ToLower(tag), query) {