RI-7935 Add Browse dataset action and extract useListContent hook#5571
Merged
RI-7935 Add Browse dataset action and extract useListContent hook#5571
Conversation
…r `ListContent` integration Introduced the `useListContent` hook for managing actions and state within the vector search index list. Replaced in-component logic in `ListContent` with `useListContent` to enhance reusability and maintainability. Added comprehensive unit tests for `useListContent` functionality. Refactored related components and updated tests to align with this integration.
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
Contributor
Code Coverage - Frontend unit tests
Test suite run success6558 tests passing in 794 suites. Report generated by 🧪jest coverage report action from 8790901 |
…ListContent` Extend `useListContent` to dispatch `fetchKeys` with appropriate parameters based on `KeyViewType` after selecting an index. Update tests to include `fetchKeys` behavior.
…ndant actions and simplify dataset navigation logic
redisinsight/ui/src/pages/vector-search/hooks/useListContent/useListContent.ts
Show resolved
Hide resolved
… selector in RediSearchIndexesList
…List functionality - Updated features-config.json to enable vectorSearch and dev-vectorSearch flags. - Enhanced RediSearchIndexesList component by dispatching resetKeyInfo and setBrowserSelectedKey actions on index selection. - Updated tests to reflect changes in expected actions and improve clarity in useListContent hook behavior.
redisinsight/ui/src/pages/browser/components/redisearch-key-list/RediSearchIndexesList.tsx
Outdated
Show resolved
Hide resolved
- Introduced a new `selectIndex` callback to encapsulate the index selection logic, improving code readability and maintainability. - Replaced direct index selection logic in `useEffect` with a call to `selectIndex`, streamlining the component's behavior. - Ensured that the history state is updated only after a successful index selection.
redisinsight/ui/src/pages/browser/components/redisearch-key-list/RediSearchIndexesList.tsx
Show resolved
Hide resolved
valkirilov
previously approved these changes
Mar 9, 2026
Incorporate getIndexDisplayName and encodeIndexNameForUrl utilities from main while preserving the useListContent hook refactoring and browse-dataset navigation from this branch. Made-with: Cursor
Made-with: Cursor
redisinsight/ui/src/pages/browser/components/redisearch-key-list/RediSearchIndexesList.tsx
Show resolved
Hide resolved
valkirilov
previously approved these changes
Mar 10, 2026
# Conflicts: # redisinsight/ui/src/pages/vector-search/pages/VectorSearchListPage/components/list-content/ListContent.tsx
redisinsight/ui/src/pages/browser/components/redisearch-key-list/RediSearchIndexesList.tsx
Show resolved
Hide resolved
redisinsight/ui/src/pages/vector-search/hooks/useListContent/useListContent.ts
Outdated
Show resolved
Hide resolved
redisinsight/ui/src/pages/vector-search/hooks/useListContent/useListContent.ts
Outdated
Show resolved
Hide resolved
…n ListContent component
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
redisinsight/ui/src/pages/vector-search/hooks/useListContent/useListContent.ts
Outdated
Show resolved
Hide resolved
…abaseId in ListContent component
valkirilov
approved these changes
Mar 11, 2026
valkirilov
approved these changes
Mar 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 a "Browse dataset" action to the Vector Search index list and refactors
ListContentby extracting all logic into auseListContenthook.useListContenthook owns data fetching, Redux selectors/dispatch, routing, and action definitionsListContentbecomes a pure render component delegating entirely to the hookTesting
useListContenthook tests andListContentcomponent testsReferences: #RI-7935
Made with Cursor
Note
Medium Risk
Introduces new navigation/state handoff from Vector Search to Browser via
browseIndex, and refactors index-list actions into a shared hook; regressions could affect index selection, browser search mode, and delete flows.Overview
Adds a new “Browse dataset” action to the Vector Search index list that switches Browser search mode to RediSearch and navigates to the Browser page carrying the chosen index via
location.state.browseIndex.Refactors
VectorSearchListPageListContentby extracting its routing/Redux/telemetry/delete logic into a newuseListContenthook (including query navigation, view side-panel state, delete confirmation + query-library cleanup).Updates
RediSearchIndexesListto accept the cross-pagebrowseIndexstate, clear key/index-related UI state (resetKeyInfo,setBrowserSelectedKey(null)), select the matching index buffer, and triggerfetchKeys; selection/value handling is simplified to use string index names instead of JSON-serialized values. Tests are adjusted and new hook tests are added accordingly.Written by Cursor Bugbot for commit 8790901. This will update automatically on new commits. Configure here.