RI-7942: vector search onboarding - create index#5618
RI-7942: vector search onboarding - create index#5618
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
...ui/src/pages/vector-search/context/create-index-onboarding/CreateIndexOnboardingProvider.tsx
Show resolved
Hide resolved
| title: 'Index prefix', | ||
| body: [ | ||
| 'Controls which keys are included in the index. All keys starting with this prefix will be indexed.', | ||
| React.createElement( |
There was a problem hiding this comment.
nit: Maybe create the file to be tsx and make this more readable?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
nit: It's minor, but we can get red of it, by adding some prefix to the key, like bla-bla-${index}
Code Coverage - Frontend unit tests
Test suite run success6370 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
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
c28bca2 to
afa257f
Compare
.../src/pages/vector-search/pages/VectorSearchCreateIndexPage/components/CreateIndexToolbar.tsx
Show resolved
Hide resolved
.../src/pages/vector-search/pages/VectorSearchCreateIndexPage/components/CreateIndexToolbar.tsx
Show resolved
Hide resolved
Combine early return with condition check into a single guard clause. References: #RI-7942 Made-with: Cursor
…search-onboarding-create-index
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.
| setActiveTab(tabBeforeOnboardingRef.current) | ||
| tabBeforeOnboardingRef.current = null | ||
| } | ||
| }, [currentStep, isActive]) |
There was a problem hiding this comment.
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).


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:
Additional:
Testing
Few Screenshots:
Note
Medium Risk
Moderate UI behavior change: introduces new onboarding state machine with localStorage persistence and forces tab switching to
Command viewduring 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
CreateIndexOnboardingPopoverand 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 toCommand viewon the final step, and reuses the newIndexingTypeContentfor both onboarding and the existing indexing-type tooltip.Also makes
AnchorPositionpublicly exportable fromRiPopovertypes, tweaks spacing inSelectKeyOnboardingPopover, adds auto-dismiss when a key is selected, and removes an unusedapiHelperfixture from an e2e test.Written by Cursor Bugbot for commit e4a3c56. This will update automatically on new commits. Configure here.