Skip to content

RI-7935 Add Browse dataset action and extract useListContent hook#5571

Merged
pd-redis merged 14 commits intomainfrom
fe/feature/RI-7935-browse-index-data
Mar 11, 2026
Merged

RI-7935 Add Browse dataset action and extract useListContent hook#5571
pd-redis merged 14 commits intomainfrom
fe/feature/RI-7935-browse-index-data

Conversation

@pd-redis
Copy link
Copy Markdown
Contributor

@pd-redis pd-redis commented Feb 26, 2026

What

Adds a "Browse dataset" action to the Vector Search index list and refactors ListContent by extracting all logic into a useListContent hook.

  • New useListContent hook owns data fetching, Redux selectors/dispatch, routing, and action definitions
  • ListContent becomes a pure render component delegating entirely to the hook
  • "Browse dataset" action switches to Redisearch mode, selects the index, and navigates to the Browser page

Testing

  • Run useListContent hook tests and ListContent component tests
  • Verify "Browse dataset" appears in the index actions menu
  • Click "Browse dataset" and confirm it navigates to Browser with the correct index selected

References: #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 VectorSearchListPage ListContent by extracting its routing/Redux/telemetry/delete logic into a new useListContent hook (including query navigation, view side-panel state, delete confirmation + query-library cleanup).

Updates RediSearchIndexesList to accept the cross-page browseIndex state, clear key/index-related UI state (resetKeyInfo, setBrowserSelectedKey(null)), select the matching index buffer, and trigger fetchKeys; 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.

…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-ci
Copy link
Copy Markdown

jit-ci bot commented Feb 26, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 26, 2026

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.44% 23605/28634
🟡 Branches 67.5% 9843/14583
🟡 Functions 77.62% 6470/8335
🟢 Lines 82.88% 23111/27885

Test suite run success

6558 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
pd-redis added 2 commits March 2, 2026 09:09
…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.
- 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.
valkirilov
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
valkirilov
valkirilov previously approved these changes Mar 10, 2026
# Conflicts:
#	redisinsight/ui/src/pages/vector-search/pages/VectorSearchListPage/components/list-content/ListContent.tsx
@pd-redis pd-redis requested a review from valkirilov March 11, 2026 13:27
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.

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

@pd-redis pd-redis merged commit beae2aa into main Mar 11, 2026
19 checks passed
@pd-redis pd-redis deleted the fe/feature/RI-7935-browse-index-data branch March 11, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants