RI-8160: clear similarity search results#5891
Open
dantovska wants to merge 3 commits into
Open
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
KrumTy
approved these changes
May 11, 2026
Contributor
Code Coverage - Frontend unit tests
Test suite run success6867 tests passing in 794 suites. Report generated by 🧪jest coverage report action from 796ef1d |
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.
What
ClearResultsActioncomponent (eraser icon, responsiveEmptyButton/IconButton) — replaces the "+ Add elements" button in the vector-set subheader while similarity-search results are visible.VectorSetKeySubheaderis now purely presentational:showPreview,previewCount,total,hasSimilarityResults, andonClearResultsare passed in byVectorSetDetails(no morevectorSetDataSelectororuseSimilaritySearchResultscalls inside the subheader).VectorSetDetailsdispatches onlyclearSimilaritySearchon click — the Redis command preview slice and the form state are intentionally left untouched so the user can still see / re-run the command after clearing.clear-results-btnbase + optionaltestIdPrefixpattern → subheader passestestIdPrefix="similarity-search"→ final idsimilarity-search-clear-results-btn.Screen.Recording.2026-05-11.at.18.28.57.mov
Testing
Note
Low Risk
Low risk UI/state wiring change that only resets the vector-set similarity-search results slice; main risk is minor UX/regression around when the subheader swaps actions and how tests/selectors rely on updated props/test ids.
Overview
Adds a responsive "Clear results" action to the vector set details view that appears when similarity-search matches are displayed, letting users clear matches and return to the normal element list.
Moves similarity-search state handling up into
VectorSetDetails(dispatchingclearSimilaritySearch) and makesVectorSetKeySubheaderpurely presentational by passinghasSimilarityResults/onClearResults; updates/extends unit tests and introduces the newClearResultsActioncomponent with a consistent, prefixable test id.Reviewed by Cursor Bugbot for commit 796ef1d. Bugbot is set up for automated code reviews on this repo. Configure here.