Skip to content

RI-8197: Command Helper - Vector Set commands support#5955

Open
dantovska wants to merge 4 commits into
mainfrom
feature/RI-8197/command-helper-vector-set
Open

RI-8197: Command Helper - Vector Set commands support#5955
dantovska wants to merge 4 commits into
mainfrom
feature/RI-8197/command-helper-vector-set

Conversation

@dantovska
Copy link
Copy Markdown
Contributor

@dantovska dantovska commented May 21, 2026

Summary

Adds Vector Set commands (VADD, VSIM, VCARD, VDIM, ...) to the Command Helper.

  • Switches the commands data source from the unmaintained redis/redis-doc (and the per-module RedisJSON/RedisSearch/etc. repos) to the official redis/docs repo. Vector Set commands ship in commands_core.json there.
  • Registers a Vector Set command group: adds CommandGroup.VectorSet (keyed to the upstream module group value), a display label, and a color so the Command Helper filter dropdown lists vector set commands under their own group.
  • Fixes a styling bug where long type labels (e.g. "Vector Set") wrapped mid-word in the Command Helper info row by setting `flex-shrink: 0` and `white-space: nowrap` on `GroupBadge`.
image

Test plan

  • Open Command Helper, confirm "Vector Set" appears in the type filter dropdown
  • Select "Vector Set" — all V-prefixed commands listed
  • Click into a vector set command (e.g. VSIM) — badge shows "VECTOR SET" on a single line, args wrap to the next row when long
  • Run `yarn type-check` — passes with no new errors

Note

Medium Risk
Switches the default command metadata sources to pinned redis/docs JSON endpoints, which can affect Command Helper command coverage/format if the upstream data changes or the pin is bumped. UI changes are minor but touch shared constants used for grouping and styling.

Overview
Command Helper now supports Vector Set commands by introducing a new CommandGroup.VectorSet (mapped to upstream module) and wiring in its display label and color so it appears as a first-class group in filtering/UI.

Command metadata fetching is updated: default command JSON URLs for core/Search/JSON/TimeSeries/Bloom are switched from various legacy repos to a pinned commit in redis/docs via a centralized URL builder.

Minor UI polish: GroupBadge styling is adjusted (flex-shrink: 0, white-space: nowrap) to prevent long group labels like “Vector Set” from wrapping.

Reviewed by Cursor Bugbot for commit e912f17. 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 May 21, 2026 07:53
@dantovska dantovska changed the title feat(RI-8197): Command Helper - Vector Set commands support RI-8197: Command Helper - Vector Set commands support May 21, 2026
@dantovska dantovska self-assigned this May 21, 2026
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 21, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

dantovska added 4 commits May 21, 2026 16:58
The redis/redis-doc repo is no longer maintained. Point the main and
module commands URLs at the official redis/docs repo, which now hosts
the canonical commands.json files (and includes Vector Set commands in
commands_core.json). RedisGraph and RedisGears URLs are left as-is — no
equivalents in redis/docs since both modules are EOL.
Vector Set commands (VADD, VSIM, VCARD, ...) ship in commands_core.json
under group "module". Add a CommandGroup.VectorSet enum keyed to that
value, plus a display label and color in GROUP_TYPES_DISPLAY /
GROUP_TYPES_COLORS, so the Command Helper filter dropdown surfaces them
under their own "Vector Set" entry instead of a generic "module" label.
Long type labels (e.g. "Vector Set") were wrapping mid-word in the
Command Helper info row when the args text next to the badge was long.
Set flex-shrink: 0 and white-space: nowrap on the badge so the label
stays on one line and the variable-length args text takes the overflow.
Tracking redis/docs main means any schema or content change there
silently ships in the next build. Factor the SHA into a single
REDIS_DOCS_COMMANDS_SHA constant + redisDocsCommandsUrl() helper so all
five commands_*.json URLs resolve against a pinned commit, and a future
bump workflow can update the line deterministically.
@dantovska dantovska force-pushed the feature/RI-8197/command-helper-vector-set branch from 1a6f4d4 to e912f17 Compare May 21, 2026 13:58
dantovska added a commit that referenced this pull request May 21, 2026
Adds scripts/bump-commands-pin.mjs and a scheduled workflow that runs
weekly (Mon 06:00 UTC) plus on manual dispatch. The script reads the
current REDIS_DOCS_COMMANDS_SHA from redisinsight/api/config/default.ts,
fetches the latest commit on redis/docs main, diffs all five
commands_*.json files at the two SHAs, and only opens a PR when the JSON
content actually changed (SHA-only moves are skipped). The PR body
summarises commands added / removed / schema-changed per file so a
reviewer can decide whether to merge.

Requires the REDIS_DOCS_COMMANDS_SHA constant introduced in #5955.
Copy link
Copy Markdown

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

Fix All in Cursor

❌ 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 e912f17. Configure here.

TopK = 'topk',
BloomFilter = 'bf',
CuckooFilter = 'cf',
VectorSet = 'module',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

VectorSet enum value likely wrong group identifier

High Severity

CommandGroup.VectorSet is mapped to the string 'module', but according to the official Redis documentation, vector set commands (VADD, VSIM, etc.) belong to the "vector_set" group. All other module command groups in this codebase use their specific group identifiers ('search', 'json', 'timeseries', 'bf', 'cf'), not the generic 'module'. If the upstream commands_core.json uses "vector_set", the Command Helper filter will match nothing when "Vector Set" is selected, the badge color won't apply, and the display label will fall back to lowercase "vector set" via type.replace(/_/g, ' ').

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e912f17. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

Code Coverage - Backend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 92.67% 15636/16872
🟡 Branches 74.84% 4935/6594
🟢 Functions 86.75% 2435/2807
🟢 Lines 92.51% 14944/16154

Test suite run success

3436 tests passing in 307 suites.

Report generated by 🧪jest coverage report action from e912f17

@github-actions
Copy link
Copy Markdown
Contributor

Code Coverage - Integration Tests

Status Category Percentage Covered / Total
🟡 Statements 79.46% 17548/22083
🟡 Branches 61.87% 8038/12991
🟡 Functions 67.95% 2434/3582
🟡 Lines 79.02% 16503/20882

@github-actions
Copy link
Copy Markdown
Contributor

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.85% 24708/29821
🟡 Branches 68.08% 10376/15242
🟡 Functions 78.07% 6678/8554
🟢 Lines 83.31% 24126/28959

Test suite run success

6965 tests passing in 802 suites.

Report generated by 🧪jest coverage report action from e912f17

Copy link
Copy Markdown
Contributor

@ArtemHoruzhenko ArtemHoruzhenko left a comment

Choose a reason for hiding this comment

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

We can't do this

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