Skip to content

RI-7942: vector search onboarding - create index#5618

Open
dantovska wants to merge 14 commits intomainfrom
fe/feature/RI-7942/vector-search-onboarding-create-index
Open

RI-7942: vector search onboarding - create index#5618
dantovska wants to merge 14 commits intomainfrom
fe/feature/RI-7942/vector-search-onboarding-create-index

Conversation

@dantovska
Copy link
Contributor

@dantovska dantovska commented Mar 10, 2026

What

Adds a guided onboarding tour for the "Create Index from Existing Data" flow on the Vector Search page. The tour walks users through 6 steps: defining the index schema, index prefix, field name, sample value, indexing type & options, and the create index command view.
Key changes:

  • Onboarding context and provider to manage step navigation (next, back, skip) with localStorage persistence
  • Popover component that anchors to each relevant UI element and displays step-specific content
  • Step constants with content for each onboarding step, including an inline indexing type reference
  • Integration into the create index page header, toolbar, and index detail columns

Additional:

  • Fix for select key onboarding popover whitespace rendering

Testing

  1. Navigate to Vector Search Page
  2. Create index from existing data
  3. Select a key
  4. Onboarding flow triggers

Few Screenshots:

  1. First step
Light Dark
image image
  1. Middle step
Light Dark
image image
  1. Final step
Light Dark
image image

Note

Medium Risk
Moderate UI behavior change: introduces new onboarding state machine with localStorage persistence and forces tab switching to Command view during the final step, which could affect navigation/state if edge cases were missed.

Overview
Adds a new Create Index onboarding tour for Vector Search (existing-data flow), implemented as a step-based context/provider persisted via BrowserStorageItem.vectorSearchCreateIndexOnboarding.

Introduces CreateIndexOnboardingPopover and step content/constants, and wires popovers onto key UI touchpoints (header, index prefix control, table column headers, and view toggle). The tour auto-starts once fields are detected, auto-switches to Command view on the final step, and reuses the new IndexingTypeContent for both onboarding and the existing indexing-type tooltip.

Also makes AnchorPosition publicly exportable from RiPopover types, tweaks spacing in SelectKeyOnboardingPopover, adds auto-dismiss when a key is selected, and removes an unused apiHelper fixture from an e2e test.

Written by Cursor Bugbot for commit e4a3c56. This will update automatically on new commits. Configure here.

@dantovska dantovska self-assigned this Mar 10, 2026
@dantovska dantovska changed the title Fe/feature/ri 7942/vector search onboarding create index RI-7942: vector search onboarding - create index Mar 10, 2026
@jit-ci
Copy link

jit-ci bot commented Mar 10, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

title: 'Index prefix',
body: [
'Controls which keys are included in the index. All keys starting with this prefix will be indexed.',
React.createElement(
Copy link
Member

Choose a reason for hiding this comment

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

nit: Maybe create the file to be tsx and make this more readable?

Copy link
Member

Choose a reason for hiding this comment

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

Also, the text is matching 1:1 with the tooltip for the same column, so I wonder whether we can reuse it, instead of duplicating it 🤔

  • redisinsight/ui/src/pages/vector-search/components/index-details/components/FieldTypeCell/FieldTypeTooltip.tsx

content.body.map((item, index) =>
typeof item === 'string' ? (
<Text
// eslint-disable-next-line react/no-array-index-key
Copy link
Member

Choose a reason for hiding this comment

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

nit: It's minor, but we can get red of it, by adding some prefix to the key, like bla-bla-${index}

@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2026

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.17% 22978/27963
🟡 Branches 67.43% 9667/14337
🟡 Functions 77.19% 6228/8068
🟢 Lines 82.61% 22491/27224

Test suite run success

6370 tests passing in 761 suites.

Report generated by 🧪jest coverage report action from e4a3c56

Adds context, provider, and tests for the create index onboarding
flow on the vector search page.

References: #RI-7942
Made-with: Cursor
Defines onboarding steps, step content, and types for the
create index onboarding flow.

References: #RI-7942
Made-with: Cursor
Adds the onboarding popover with step navigation (next, back,
skip, close), step content rendering, indexing type content,
styles, barrel file, and tests.

References: #RI-7942
Made-with: Cursor
Export AnchorPosition from RiPopover types for use by onboarding
popover. Add vectorSearchCreateIndexOnboarding storage key.

References: #RI-7942
Made-with: Cursor
Wrap create index page with onboarding provider, add popover
anchors to header, toolbar, and index detail columns.

References: #RI-7942
Made-with: Cursor
… test

Split Text component for proper paragraph break and add test
for auto-dismiss when a key is selected.

References: #RI-7942
Made-with: Cursor
Move body rendering into constants as ready-to-render JSX, removing
conditional type checks from the popover component.

References: #RI-7942
Made-with: Cursor
Move duplicated field type list and descriptions into a shared
IndexingTypeContent component used by both FieldTypeTooltip
and the create index onboarding popover.

References: #RI-7942
Made-with: Cursor
…g provider

The nextStep callback had markOnboardingSeen() and setIsActive(false)
inside the setCurrentStep updater function, which must be pure. Moved
completion side effects to a useEffect that reacts to the state
transition instead.

References: #RI-7942
Made-with: Cursor
Automatically switches to command view when the onboarding
reaches the CommandView step, and restores the previous tab
when leaving that step.

References: #RI-7942
Made-with: Cursor
@dantovska dantovska force-pushed the fe/feature/RI-7942/vector-search-onboarding-create-index branch from c28bca2 to afa257f Compare March 11, 2026 11:46
Combine early return with condition check into a single guard clause.

References: #RI-7942
Made-with: Cursor
Copy link

@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.

setActiveTab(tabBeforeOnboardingRef.current)
tabBeforeOnboardingRef.current = null
}
}, [currentStep, isActive])
Copy link

Choose a reason for hiding this comment

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

Tab restore ref lost on toolbar unmount/remount

Low Severity

tabBeforeOnboardingRef is a local useRef that stores the user's tab before auto-switching to Command view. If the toolbar unmounts while onboarding is on the CommandView step (e.g., because the user selects a different key, causing fields to become empty), the ref is destroyed. When the toolbar remounts, a new ref is initialized to null, and the effect re-runs, saving the already-switched Command tab as the "original." Subsequent tab restoration incorrectly restores to Command instead of the user's actual prior tab (typically Table).

Fix in Cursor Fix in Web

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.

2 participants