fix(web): keep selected search filters visible - #1685
dipeshbabu wants to merge 2 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. WalkthroughThe search filter now keeps selected entries visible and places them before fuzzy matches. It sorts a copy of the filtered list. Tests cover filtering, entry ordering, click callbacks, duplicate prevention, and preservation of the input array. ChangesSelected search entries
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to Selected filters remain visible above search matches; no issue identified here requires resolution before merging. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Fixes #131
Typing into the language or repository filter hid selected entries that did not match the filter text. Keep those selections visible at the top so users can see and clear every active filter, while filtering the remaining entries normally.
Selected entries appear only once when they also match the search. Sorting now copies the list instead of mutating the caller's entries.
Validation completed before opening this PR:
Note
Low Risk
Localized search UI filter-list behavior with regression tests; no auth, API, or search backend changes.
Overview
Fixes code search filter panels (language and repository) so active selections no longer vanish when you type in the panel’s search box.
Selected entries stay pinned at the top of the list even when they don’t match the filter text, so users can still see and clear them. Unselected options are fuzzy-matched as before. If a selected item also matches the search, it renders once (not duplicated). When nothing matches, selected filters still show.
Sorting now runs on a copy of the filtered list (
[...filteredEntries]) so the parententriesarray is not reordered in place. Vitest coverage was added for these behaviors, and the unreleased changelog notes the fix (#1685).Reviewed by Cursor Bugbot for commit 82ac4e2. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Fixes #131 by keeping selected language and repository filters visible at the top while typing, so active filters can always be seen and cleared.
Written for commit 82ac4e2. Summary will update on new commits.
Summary by CodeRabbit