RI-8158: vector set similarity thunks and hooks#5871
Open
dantovska wants to merge 9 commits into
Open
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
4262cf1 to
f721686
Compare
Contributor
Code Coverage - Backend unit tests
Test suite run success3413 tests passing in 306 suites. Report generated by 🧪jest coverage report action from 1ea2152 |
Contributor
Code Coverage - Integration Tests
|
Contributor
Code Coverage - Frontend unit tests
Test suite run success6826 tests passing in 789 suites. Report generated by 🧪jest coverage report action from 1ea2152 |
KrumTy
reviewed
May 8, 2026
- add types to keys when checking if equal - move to utils + add tests
62b579f to
f78d4a7
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ 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 f78d4a7. Configure here.
KrumTy
approved these changes
May 11, 2026
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
Adds the FE foundation for the vector-set similarity search feature — Redux state, thunks, and the consumer hook — without yet wiring up any UI components.
VECTOR_SET_SIMILARITY_SEARCHandVECTOR_SET_SIMILARITY_SEARCH_PREVIEWconstants.slices/browser/vectorSet.ts): added two new sub-slices —similaritySearch(results + loading/error) andsimilaritySearchPreview(BE-builtVSIMcommand preview + loading/error) — with theirload*/Success/Failure/clear*actions and selectors. Added thefetchVectorSetSimilaritySearchandfetchVectorSetSimilaritySearchPreviewthunks. Both slices share the same payload shape since the FE only fires a preview once the form is valid.slices/interfaces/vectorSet.ts): introducedVectorSetSimilaritySearchPayload,VectorSetSimilarityMatch,VectorSetSimilaritySearchResponse, and the matching slice-state + preview types.useSimilaritySearchhook: pure form-state → BE-payload mapper plus debounced preview dispatch. Cancels and clears the preview slice when the form state can't map to a validVSIMpayload, and clears both slices when the selected key changes or the consumer unmounts.The form/results components that consume this layer are intentionally not part of this PR — they are coming in a follow-up.
Testing
Following PR
Note
Medium Risk
Adds new Redux sub-slices and async thunks (including abortable preview requests) plus new hook logic, which can affect browser state management and request lifecycles. Also changes several existing vector-set thunks to fail with a default error message on non-2xx statuses, potentially altering user-visible error handling.
Overview
Lays the FE groundwork for Vector Set similarity search by adding new API endpoints plus Redux state/actions/selectors and thunks to execute similarity search and fetch a debounced, abortable backend-built
VSIMcommand preview.Introduces
useSimilaritySearch(form-state→payload mapping, debounced preview dispatch, and automatic reset on key change/unmount) anduseSimilaritySearchResults(exposes matches/hasResults), and exports them from the vector-set hooks index.Refactors vector parsing helpers by exporting
bytesToBase64andvalidateVectorfor reuse, and expands Jest coverage for the new slice logic/thunks/hooks (including abort/cancel behavior).Reviewed by Cursor Bugbot for commit 1ea2152. Bugbot is set up for automated code reviews on this repo. Configure here.