Skip to content

RI-8158: vector set similarity form and table#5872

Merged
dantovska merged 25 commits into
mainfrom
feature/RI-8158/vector-set-similarity-2
May 12, 2026
Merged

RI-8158: vector set similarity form and table#5872
dantovska merged 25 commits into
mainfrom
feature/RI-8158/vector-set-similarity-2

Conversation

@dantovska
Copy link
Copy Markdown
Contributor

@dantovska dantovska commented May 8, 2026

What

Builds the similarity-search UI on top of the FE foundation landed in #vector-similarity-1 (slice + thunks + useSimilaritySearch hook).

  • Similarity search form (similarity-search-form/) — three self-contained components:
    • SimilaritySearchForm with vector / element mode toggle, vector or element input (with FP32 + numeric validation against the key's vectorDim), result count, filter expression, BE-built command preview, and a submit + reset action row.
    • CommandPreview — renders the BE-built VSIM preview the search would actually run, with copy-to-clipboard and a neutral placeholder while idle.
    • FilterSyntaxHelpPopover — inline help next to the filter field, listing supported operators and example expressions.
  • Submit button mirrors both the search and preview loading flags so the user can't dispatch a search before the preview has settled, and stays disabled until the form maps to a valid VSIM payload.
  • Reset button (IconButton to the left of "Find similar items") — clears the form's local state and dispatches the hook's resetSimilaritySearch to wipe slice state. The form also remounts on key change (key={keyName}), and the slice is cleared on key change / unmount, so the form is reset whenever the user navigates to another key, closes the key details, or otherwise leaves the view.
  • Similarity search results table (similarity-search-results/) — sorted by score with a "high match" highlight (HIGH_SIMILARITY_THRESHOLD = 0.85), reusing the existing Element rendering pipeline for compressor + view-format support. Replaces the regular vector-set element list in VectorSetDetails whenever a search has results.
  • Exposed bytesToBase64 and validateVector from vector-set-element-form/utils so the hook layer (from #vector-similarity-1) can build the BE payload from the form state without duplicating validation logic.
  • Re-exported QuantityCounter from @redis-ui/components via uiSrc/components/base/inputs.

Testing

Light Dark
image image
image image

Add vector set with elements + similarity search

Uploading Screen Recording 2026-05-08 at 14.22.07.mov…


Note

Medium Risk
Adds new vector-set similarity-search UI plus new Redux slice state and async thunks (including debounced/abortable preview requests), which could affect browser key-details behavior and API traffic patterns.

Overview
Adds vector set similarity search to the key details view: a new SimilaritySearchForm (vector/element modes, count + filter inputs, debounced BE command preview with copy, and reset) and a SimilaritySearchResultsTable that replaces the normal elements list once a search has returned results.

Extends the vectorSet Redux slice with similaritySearch + similaritySearchPreview state, selectors, reducers, and new thunks hitting vector-set/similarity-search and /preview (with abort handling), and tightens several existing thunks to emit DEFAULT_ERROR_MESSAGE on non-success HTTP statuses. Also exports shared vector validation helpers (validateVector, bytesToBase64) for reuse and re-exports QuantityCounter for the form.

Reviewed by Cursor Bugbot for commit 6e1ff18. Bugbot is set up for automated code reviews on this repo. Configure here.

@dantovska dantovska self-assigned this May 8, 2026
@dantovska dantovska requested a review from a team as a code owner May 8, 2026 06:45
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 8, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@dantovska dantovska force-pushed the feature/RI-8158/vector-set-similarity-2 branch from b53a70e to 367f689 Compare May 8, 2026 06:49
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Code Coverage - Backend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 92.63% 15568/16806
🟡 Branches 74.71% 4878/6529
🟢 Functions 86.72% 2423/2794
🟢 Lines 92.47% 14879/16091

Test suite run success

3413 tests passing in 306 suites.

Report generated by 🧪jest coverage report action from 6e1ff18

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Code Coverage - Integration Tests

Status Category Percentage Covered / Total
🟡 Statements 79.49% 17484/21993
🟡 Branches 61.96% 7993/12900
🟡 Functions 67.97% 2418/3557
🟡 Lines 79.06% 16441/20795

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f546a1b. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.72% 24442/29547
🟡 Branches 67.93% 10264/15110
🟡 Functions 77.88% 6598/8472
🟢 Lines 83.19% 23880/28706

Test suite run success

6867 tests passing in 793 suites.

Report generated by 🧪jest coverage report action from 6e1ff18

@dantovska dantovska force-pushed the feature/RI-8158/vector-set-similarity-1 branch from 62b579f to f78d4a7 Compare May 8, 2026 12:14
@dantovska dantovska force-pushed the feature/RI-8158/vector-set-similarity-2 branch from f546a1b to 95b3f98 Compare May 8, 2026 13:36
@dantovska dantovska force-pushed the feature/RI-8158/vector-set-similarity-2 branch 2 times, most recently from f34ed38 to 9681692 Compare May 10, 2026 20:25
@dantovska dantovska requested review from KrumTy and valkirilov May 11, 2026 11:14
KrumTy
KrumTy previously approved these changes May 11, 2026
@dantovska dantovska force-pushed the feature/RI-8158/vector-set-similarity-2 branch from 13af0a5 to f733fc4 Compare May 12, 2026 06:56
@dantovska dantovska force-pushed the feature/RI-8158/vector-set-similarity-1 branch from 1ea2152 to ae4b0ec Compare May 12, 2026 06:56
valkirilov
valkirilov previously approved these changes May 12, 2026
</ButtonGroup>
</FlexItem>
<FlexItem grow>
{state.mode === 'vector' ? (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'm thinking of changing this to an enum, in case we use it in many places.


import { SimilaritySearchResultsTable } from './SimilaritySearchResultsTable'

faker.seed(8158)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to fix the seeds for some reason?

@dantovska dantovska force-pushed the feature/RI-8158/vector-set-similarity-1 branch from ae4b0ec to 7e3e852 Compare May 12, 2026 11:27
@dantovska dantovska force-pushed the feature/RI-8158/vector-set-similarity-2 branch from f733fc4 to 4380b98 Compare May 12, 2026 11:27
@dantovska dantovska force-pushed the feature/RI-8158/vector-set-similarity-1 branch from 7e3e852 to 126e3f6 Compare May 12, 2026 13:03
@dantovska dantovska force-pushed the feature/RI-8158/vector-set-similarity-2 branch 2 times, most recently from 0c66b99 to 5fff7fa Compare May 12, 2026 13:34
@dantovska dantovska force-pushed the feature/RI-8158/vector-set-similarity-1 branch from 126e3f6 to 1a956fd Compare May 12, 2026 13:34
@dantovska dantovska changed the base branch from feature/RI-8158/vector-set-similarity-1 to main May 12, 2026 14:16
@dantovska dantovska dismissed valkirilov’s stale review May 12, 2026 14:16

The base branch was changed.

@dantovska dantovska dismissed KrumTy’s stale review May 12, 2026 14:16

The base branch was changed.

@dantovska dantovska force-pushed the feature/RI-8158/vector-set-similarity-2 branch from 5fff7fa to 6e1ff18 Compare May 12, 2026 14:20
@dantovska dantovska merged commit 2b3238e into main May 12, 2026
29 checks passed
@dantovska dantovska deleted the feature/RI-8158/vector-set-similarity-2 branch May 12, 2026 14:52
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.

4 participants