Skip to content

Promote Array & Vector Set key types on unsupported Redis versions - #6302

Merged
dantovska merged 1 commit into
mainfrom
fe/feature/promote-version-gated-key-types
Jul 28, 2026
Merged

Promote Array & Vector Set key types on unsupported Redis versions#6302
dantovska merged 1 commit into
mainfrom
fe/feature/promote-version-gated-key-types

Conversation

@dantovska

@dantovska dantovska commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What

Promote the Array (Redis 8.8+) and Vector Set (Redis 8.0+) key types on databases that don't support them yet.

Previously these types were hidden from the Add Key type dropdown on unsupported Redis versions. Now they stay visible but greyed-out (disabled), with a highlighted lock icon on the right and a tooltip "Requires Redis x.y+" on hover — nudging users to upgrade rather than silently hiding the feature.

  • Feature-flag gating is unchanged: an unreleased type (behind a flag) is still hidden entirely, never shown as a disabled teaser.
  • Disabled options can't be selected.
  • Option rendering is extracted into a colocated KeyTypeOption component (styles/constants/tests); a RiHighlightedIcon internal wrapper is added around the @redis-ui HighlightedIcon.

UI-only; no API or data changes.

Testing

  • Connect a Redis < 8.0 (e.g. 6.2 / 7.2) → open Add Key → type dropdown: Vector Set (and Array when its flag is on) appear greyed-out with a lock icon; hovering the lock shows "Requires Redis 8.0+"; they cannot be selected.
  • Connect Redis 8.0 / 8.8 → the respective types are enabled and selectable.
  • Unit tests: AddKey.spec.tsx, KeyTypeOption.spec.tsx.

Note

Low Risk
UI-only change to Add Key dropdown rendering and selection guards; no API or data path changes.

Overview
Add Key no longer hides Redis version–gated types (e.g. Vector Set, Array) when the connected instance is too old. They stay in the key-type dropdown as disabled rows so users see the feature exists but cannot select it.

Unsupported options use a new KeyTypeOption row: colored label plus a lock RiHighlightedIcon with tooltip browser.addKey.requiresVersion (“Requires Redis {{version}}+”). AddKey maps all enabled options with disabled + inputDisplay, blocks onChangeType for disabled values, and drops the old filter that removed low-version types. Feature-flag–gated types are unchanged (still omitted, not teased).

Adds RiHighlightedIcon re-export, en/bg i18n, and unit tests for AddKey / KeyTypeOption.

Reviewed by Cursor Bugbot for commit ddc69fc. Bugbot is set up for automated code reviews on this repo. Configure here.

@dantovska
dantovska requested a review from a team as a code owner July 28, 2026 12:43
@dantovska dantovska self-assigned this Jul 28, 2026
@dantovska
dantovska force-pushed the fe/feature/promote-version-gated-key-types branch from 7863ff4 to 3feb9ce Compare July 28, 2026 13:06
…dis versions

On Redis versions that don't support Array (8.8+) or Vector Set (8.0+), the Add
Key type dropdown now keeps these options visible but greyed-out (disabled) with
a highlighted lock icon on the right; hovering the lock shows a tooltip
("Requires Redis x.y+") — nudging users to upgrade instead of silently hiding
the types. Feature-flag gating still hides options entirely, so an unreleased
type is never shown as a disabled teaser. Disabled options are guarded against
selection.

Option rendering is extracted into a KeyTypeOption component (styles/constants/
tests colocated), and a RiHighlightedIcon wrapper is added around the @redis-ui
HighlightedIcon.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dantovska
dantovska force-pushed the fe/feature/promote-version-gated-key-types branch from 3feb9ce to ddc69fc Compare July 28, 2026 13:15
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 83.35% 28328/33988
🟡 Branches 69.5% 12084/17387
🟡 Functions 78.35% 7503/9576
🟢 Lines 83.8% 27548/32873

Test suite run success

7913 tests passing in 872 suites.

Report generated by 🧪jest coverage report action from ddc69fc

@dantovska
dantovska merged commit d044065 into main Jul 28, 2026
21 checks passed
@dantovska
dantovska deleted the fe/feature/promote-version-gated-key-types branch July 28, 2026 13:50
dantovska added a commit that referenced this pull request Jul 28, 2026
… types

The Add Key type dropdown now shows Array/Vector Set as disabled (with a lock
icon and version tooltip) on unsupported Redis versions instead of hiding them.
Update the Vector Set gating spec to assert the shown-but-disabled state on
Redis < 8.0 and the enabled state on 8.8.0.

Depends on the UI change in PR #6302 — merge after it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

4 participants