Skip to content

RI-7197 Introduce vector search "Manage Indexes" drawer #4751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: feature/RI-6855/vector-search
Choose a base branch
from

Conversation

valkirilov
Copy link
Member

@valkirilov valkirilov commented Jul 23, 2025

Description

Show details about the available indexes in the Manage Indexes drawer, part of the new Vector Search feature flow.

  • integrated the Section component from Redis UI to represent the index information (docs)
  • show summary info for the index, when the section is collapsed
  • show details about the index attributes when the section is uncollapsed
  • allow deleting the existing indexes
Screen.Recording.2025-07-28.at.13.40.00.mov

How to test it

These are base components that will be included in the new wizard for the Vector Search, but currently, you can find them integrated on a temporary page, for the sake of testing them.

Simply flip this temporary switch in redisinsight/ui/src/pages/vector-search/VectorSearchPage.tsx and then click on the "Search" icon in the left side nav to open the page:

export const VectorSearchPage = () => {
  const hasIndexes = true // Toggle between "wizard" and "search" view

@valkirilov valkirilov changed the title RI-7197 Introduce vector search manage indexes drawer RI-7197 Introduce vector search "Manage Indexes" drawer Jul 23, 2025
Copy link
Contributor

github-actions bot commented Jul 23, 2025

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 81.46% 18949/23262
🟡 Branches 67% 8256/12323
🟡 Functions 75.22% 4967/6603
🟢 Lines 81.87% 18545/22653

Test suite run success

4834 tests passing in 641 suites.

Report generated by 🧪jest coverage report action from 2725eaf

@valkirilov valkirilov self-assigned this Jul 24, 2025
Base automatically changed from fe/feature/RI-7197_vector-search-manage-indexes to feature/RI-6855/vector-search July 25, 2025 09:16
- integrated Section component from Redis UI to represent the index information
- show summary info for the index, when the section is collapsed
- show details about the index attributes when the section is uncolapped

re #RI-7197
@valkirilov valkirilov force-pushed the fe/feature/RI-7197_vector-search-manage-indexes-2 branch from 99520b0 to 25c426e Compare July 25, 2025 09:18
Copy link
Contributor

Code Coverage - Integration Tests

Status Category Percentage Covered / Total
🟢 Statements 81.73% 16229/19856
🟡 Branches 64.81% 7330/11309
🟡 Functions 70.79% 2281/3222
🟢 Lines 81.37% 15267/18761

Copy link
Contributor

Code Coverage - Backend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 92.33% 13779/14924
🟡 Branches 74.01% 4155/5614
🟢 Functions 85.85% 2124/2474
🟢 Lines 92.12% 13172/14299

Test suite run success

2944 tests passing in 286 suites.

Report generated by 🧪jest coverage report action from a0c099a

- extend the "manage indexes" boxes with a button to allow deleting the index
- added unit tests

re #RI-7197
@valkirilov valkirilov force-pushed the fe/feature/RI-7197_vector-search-manage-indexes-2 branch from 8069441 to 74f976c Compare July 28, 2025 10:34
import { IndexInfoDto } from 'apiSrc/modules/browser/redisearch/dto'

// TODO: Rework this mock to use factory and faker later
export const MOCK_REDISEARCH_INDEX_INFO: IndexInfoDto = {
Copy link
Member Author

Choose a reason for hiding this comment

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

I'll provide separate pull requests with a basic example using factories implementation later this week, to showcase how much simpler it will be using such an approach.

}))

const createTestStore = () => {
// TODO: Use rootReducer instead, once you realize how to solve the issue with the instancesReducer
Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to use the rootReducer instead of initializing only the slices necessary for this test suite, so it will reflect more real-usage scenarios, but unfortunately, there is something wrong in the way the Redux store is currently organized. It seems like there are some hidden circular dependencies that conflict with the initialization of the instances sub-reducer.

So far, I haven't been able to resolve the issue in general, so I'll keep the tests working, at the cost of being isolated from the rest of the available reducers.

collapsedInfo={<CategoryValueList categoryValueList={indexSummaryInfo} />}
content={<IndexAttributesList data={tableData} />}
// TODO: Add FieldTag component to list the types of the different fields
label={formatLongName(indexName)}
Copy link
Member Author

@valkirilov valkirilov Jul 28, 2025

Choose a reason for hiding this comment

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

Currently, the Section component provided by Redis UI (docs) doesn't support anything other than a string for its label, so we can't make it look like the design.

image

// TODO: Add FieldTag component to list the types of the different fields
label={formatLongName(indexName)}
defaultOpen={false}
actionButtonText="Delete" // TODO: Replace with an icon of a trash can
Copy link
Member Author

Choose a reason for hiding this comment

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

Currently, the Section component provided by Redis UI (docs) doesn't support icons for the action button, so we go for a text label instead.

Design Actual
image image

@valkirilov valkirilov marked this pull request as ready for review July 28, 2025 11:00
@valkirilov valkirilov requested a review from Copilot July 28, 2025 11:00
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces the "Manage Indexes" drawer functionality for the Vector Search feature, allowing users to view and manage RediSearch indexes. The implementation includes:

  • New UI components to display index information using collapsible sections
  • Integration of index deletion functionality with telemetry tracking
  • Comprehensive test coverage for the new components

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
redisinsight/ui/src/telemetry/events.ts Adds telemetry event for index deletion tracking
redisinsight/ui/src/slices/browser/redisearch.ts Implements deleteRedisearchIndexAction with success/error handling
redisinsight/ui/src/slices/tests/browser/redisearch.spec.ts Adds comprehensive tests for the delete index functionality
redisinsight/ui/src/pages/vector-search/manage-indexes/ Contains new components for displaying and managing indexes list
redisinsight/ui/src/components/notifications/success-messages.tsx Adds success message for index deletion
redisinsight/api/src/modules/browser/redisearch/dto/ Updates DTOs to support index deletion and adds missing property

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.

1 participant