RED-195979: Gate vector search enhancements behind vs-enhancements flag - #6291
RED-195979: Gate vector search enhancements behind vs-enhancements flag#6291dantovska wants to merge 12 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 000027950e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Code Coverage - Backend unit tests
Test suite run success3721 tests passing in 322 suites. Report generated by 🧪jest coverage report action from 2475779 |
Code Coverage - Integration Tests
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 815a747c66
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Code Coverage - Frontend unit tests
Test suite run success7885 tests passing in 871 suites. Report generated by 🧪jest coverage report action from 2475779 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c55c1bcce6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort 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.
Reviewed by Cursor Bugbot for commit c55c1bc. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6083a3a3a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa52f91496
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…flag Add the dev-vs-enhancements dev feature flag and hide the RI-8171, RI-8317 and RI-8326 vector search enhancements behind it. - RI-8317/8326: gate the embedding highlight/collapse (VectorEmbeddingHighlight) in both the Vector Search and Workbench editors. - RI-8171: restore the pre-enhancement create-index flow when the flag is off (legacy keys probe gating, browse-only mode, original labels/tooltips). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- e2e: welcome-screen entry differs with the flag on ("Create index",
enabled) vs off (legacy "Use data from my database", disabled without
keys); enable the flag for the no-keys manual-creation e2e spec.
- unit: assert the query editor embedding highlight is gated by the flag.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- features-config: add explicit `filters: []` to the dev flag. Without it CommonFlagStrategy's `filter(undefined)` throws and returns the inverted fallback (`!flag`), which would enable the flag for everyone by default. - useHasExistingKeys: derive `loading` from the pending probe so it is true from the first render a probe is needed, avoiding a one-frame manual-creation flash when the flag resolves after the create-index page mounts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- useHasExistingKeys: include `encoding` in the probe key so an encoding-triggered re-check surfaces `loading` (was stuck false). - VectorSearchProvider/welcome/list: propagate the probe `error` and keep the legacy "existing data" entry available on a failed/inconclusive probe instead of wrongly reporting "no keys", matching the create-index page. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Match the peer dev-flag selector convention (isDevLanguage/isArray) by returning true from isVectorSearchEnhancementsEnabledSelector in development, and route the embedding-highlight gate through the same selector instead of FeatureFlagComponent so both halves of the feature toggle consistently. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Rename dev-vs-enhancements → vectorSearchEnhancements (regular camelCase flag). - Register with SwitchableFlagStrategy; config flag:true, perc [[0,100]], filters:[] so it is on by default and user-overridable via config.json. - Drop explanatory comments now that the code is self-explanatory. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- useHasExistingKeys: clear the completed-probe marker when disabled so a re-enable for the same instance/route/encoding (e.g. the switchable flag toggled at runtime) re-scans and shows loading instead of stale results. - Drop the dead commented-out isDevelopment branch from the selector. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ment Restore the `isDevelopment` bypass so the selector matches the peer dev-flag selectors (isArray/isDevLanguage). e2e/prod builds are non-dev, so the flag still governs there. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Only the welcome and list entry points consume useHasExistingKeys, but the provider wraps every vector-search route. Gate the probe on the base route so navigating to create-index/query pages no longer fires unused key scans. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ount - i18n: move welcome.checkingKeys / welcome.noKeysFound into alphabetical order in en/bg locales (i18n convention). - useVectorEmbeddingCollapse: on unmount (e.g. the switchable flag turned off at runtime) expand collapsed embeddings back into the model and clear the decorations, so the editor is never left with an inert placeholder chip. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
b293cd6 to
bd99314
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd99314442
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
The entry-route probe that gates the legacy "existing data" flow only needs to know whether any Hash/JSON key exists, so run it with count:1 and scanThreshold:1 instead of walking the default 10k-key threshold. The create-index browse-flow probe keeps its thorough scan. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

What
Adds a new
vectorSearchEnhancementsfeature flag and puts the three vector search enhancement tickets behind it:VectorEmbeddingHighlightcomponent (which owns all three behaviors) is gated in both the Vector Search editor and the Workbench editor.isManualCreationis forcedfalse.Registered as a regular, switchable flag (
SwitchableFlagStrategy): backendfeatures-config.json(flag: true, perc: [[0, 100]], filters: []) /KnownFeatures/known-features/feature-flag.provider, and FEFeatureFlagsenum +features.ts+isVectorSearchEnhancementsEnabledSelector. Enabled by default for all users; overridable per-user via~/.redis-insight/config.json.Note: a few i18n keys removed by RI-8171 were re-added (plus a temporary
useMyDatabaseLegacylabel) to support the flag-off path — remove them when the flag is eventually retired.Testing
config.json): the legacy UX is restored — the welcome "Use data from my database" button is disabled with a tooltip when the DB has no Hash/JSON keys, the create-index menu's "Use existing data" is likewise gated, browse-only routing, and no embedding highlight/collapse.Automated:
npm run type-check(no new errors), ESLint clean, affected UI + backend feature specs pass, plus a Playwright flag on/off scenario.Closes RI-8171
Closes RI-8317
Closes RI-8326
Note
Medium Risk
Multiple vector-search entry and create-index code paths branch on the flag, so incorrect gating could change UX or editor query text; the unmount restore mitigates leaving collapsed placeholders in the editor.
Overview
Introduces
vectorSearchEnhancementsas a switchable feature flag (API config + UI selector, enabled by default). When on, Vector Search and Workbench renderVectorEmbeddingHighlight, and the enhanced create-index path applies (e.g. manual creation when the DB has no Hash/JSON keys, “Create index” copy, keys probe on the browse flow). When off, the prior behavior is restored: boundeduseHasExistingKeysonly on vector-search entry routes, disabled welcome/list actions with tooltips when no keys, browse-only create index, and legacy button labels (re-added i18n strings).useVectorEmbeddingCollapsenow expands collapsed embeddings and clears decorations on unmount so toggling the flag at runtime does not leave placeholder chips in the Monaco model.useHasExistingKeysgains an optional bounded scan (count/scanThresholdof 1) and probe-based loading so re-enabling triggers a fresh scan.Tests cover flag gating (including Playwright welcome on/off) and the collapse unmount behavior; Monaco mocks pick up
getFullModelRange/isDisposed.Reviewed by Cursor Bugbot for commit 2475779. Bugbot is set up for automated code reviews on this repo. Configure here.