BUGFIX-133: When host filter is enabled should sort matching items by their rank#134
BUGFIX-133: When host filter is enabled should sort matching items by their rank#134grafviktor merged 4 commits intodevelopfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #134 +/- ##
===========================================
+ Coverage 87.78% 87.81% +0.02%
===========================================
Files 40 41 +1
Lines 3454 3487 +33
===========================================
+ Hits 3032 3062 +30
- Misses 344 346 +2
- Partials 78 79 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Bug: Selection index mismatch when filtering and updating hosts
The setItemAndReorder() function calculates selection index by sorting items with hostComparator, but after removing UnsortedFilter, filtered items are displayed in match rank order instead. When m.Select(newVisibleItemsIndex) is called, it operates on the actual visible list (now sorted by match rank), causing the wrong item to be selected. This happens when editing a host while filtering is enabled and the host's position changes. Unlike onHostCreated() which calls ResetFilter() first, onHostUpdated() doesn't reset the filter, so the mismatch occurs.
internal/ui/component/hostlist/hostlist.go#L435-L441
goto/internal/ui/component/hostlist/hostlist.go
Lines 435 to 441 in 459a426
…items by their rank" This reverts commit 459a426.
No description provided.