Skip to content

RI-8160: clear similarity search results#5891

Open
dantovska wants to merge 3 commits into
fe/feature/RI-8160/preview-x-out-of-y-similarityfrom
fe/feature/RI-8160/clear-results
Open

RI-8160: clear similarity search results#5891
dantovska wants to merge 3 commits into
fe/feature/RI-8160/preview-x-out-of-y-similarityfrom
fe/feature/RI-8160/clear-results

Conversation

@dantovska
Copy link
Copy Markdown
Contributor

@dantovska dantovska commented May 11, 2026

What

  • New ClearResultsAction component (eraser icon, responsive EmptyButton / IconButton) — replaces the "+ Add elements" button in the vector-set subheader while similarity-search results are visible.
  • VectorSetKeySubheader is now purely presentational: showPreview, previewCount, total, hasSimilarityResults, and onClearResults are passed in by VectorSetDetails (no more vectorSetDataSelector or useSimilaritySearchResults calls inside the subheader).
  • VectorSetDetails dispatches only clearSimilaritySearch on 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.
  • Test-ids follow the new clear-results-btn base + optional testIdPrefix pattern → subheader passes testIdPrefix="similarity-search" → final id similarity-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 (dispatching clearSimilaritySearch) and makes VectorSetKeySubheader purely presentational by passing hasSimilarityResults/onClearResults; updates/extends unit tests and introduces the new ClearResultsAction component 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.

@dantovska dantovska self-assigned this May 11, 2026
@dantovska dantovska requested a review from a team as a code owner May 11, 2026 15:29
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 11, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@dantovska dantovska changed the title RI-8160: clear results RI-8160: clear similarity search results May 11, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.73% 24443/29547
🟡 Branches 67.94% 10273/15121
🟡 Functions 77.87% 6598/8473
🟢 Lines 83.19% 23882/28707

Test suite run success

6867 tests passing in 794 suites.

Report generated by 🧪jest coverage report action from 796ef1d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants