Skip to content

RI-7197 Introduce vector search actions panel #4741

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

Conversation

valkirilov
Copy link
Member

Description

Introduce a simple Vector Search actions panel that can be later injected in the proper place in the UI:

  • Added simple component to present the different action buttons, based on the Redis UI TextButton component (docs)
  • Added button for "Manage Indexes" to open a container, based on the Redis UI Drawer component docs
  • Added a placeholder button for "Saved Queries" drawer, which will be implemented separately

Vector Search actions

image

Manage Indexes drawer

Note: For now, the content of the drawer is blank, but it will be implemented in a separate pull request
image

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

- added simple component to present the different actions on the vector search page
- added button for "manage indexet" to open the coresponding drawer
- added a placeholder button for "saved queries" drawer

re #RI-7197
Copy link
Contributor

github-actions bot commented Jul 21, 2025

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 81.37% 18863/23181
🟡 Branches 66.93% 8235/12303
🟡 Functions 75.07% 4935/6574
🟢 Lines 81.78% 18462/22574

Test suite run success

4813 tests passing in 635 suites.

Report generated by 🧪jest coverage report action from ec372b9


// Workaround for @redis-ui/components Title component issue with react-children-utilities
// TypeError: react_utils.childrenToString is not a function
jest.mock('uiSrc/components/base/layout/drawer', () => ({
Copy link
Member Author

Choose a reason for hiding this comment

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

For some odd reason, there is a weird issue with the Title component rendered inside the Drawer's Header component (provided by Redis UI), causing the rendering of the component to fail.

 FAIL  redisinsight/ui/src/pages/vector-search/manage-indexes/ManageIndexesDrawer.spec.tsx
  ManageIndexesDrawer
    ✕ should render (58 ms)

  ● ManageIndexesDrawer › should render

    TypeError: react_utils.childrenToString is not a function

      184 |   const wrapper = !withRouter ? Wrapper : BrowserRouter
      185 |
    > 186 |   return rtlRender(ui, { wrapper, ...renderOptions })
          |                   ^
      187 | }
      188 |

I have applied the same temporary workaround you already found a while ago (reference)

Copy link
Collaborator

Choose a reason for hiding this comment

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

happened to me as well and mocked the same way for ShortcutsFlyout

@valkirilov valkirilov self-assigned this Jul 21, 2025
@valkirilov valkirilov marked this pull request as ready for review July 21, 2025 13:32
KrumTy
KrumTy previously approved these changes Jul 22, 2025

// Workaround for @redis-ui/components Title component issue with react-children-utilities
// TypeError: react_utils.childrenToString is not a function
jest.mock('uiSrc/components/base/layout/drawer', () => ({
Copy link
Collaborator

Choose a reason for hiding this comment

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

happened to me as well and mocked the same way for ShortcutsFlyout

@valkirilov valkirilov force-pushed the fe/feature/RI-7197_vector-search-manage-indexes branch from aa376b0 to ec372b9 Compare July 23, 2025 13:41
@valkirilov valkirilov merged commit a0c099a into feature/RI-6855/vector-search Jul 25, 2025
32 checks passed
@valkirilov valkirilov deleted the fe/feature/RI-7197_vector-search-manage-indexes branch July 25, 2025 09:16
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.

3 participants