DOC-6360 command summary lists in data type pages#2888
DOC-6360 command summary lists in data type pages#2888andy-stark-redis merged 6 commits intomainfrom
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
| content.classList.toggle('hidden'); | ||
| chevron.classList.toggle('rotate-180'); | ||
| } | ||
| </script> |
There was a problem hiding this comment.
Script tag duplicated per shortcode instance on page
Low Severity
The toggleCommandGroup function is defined inside a <script> tag within the shortcode template. Since this shortcode is rendered inline, every usage emits a duplicate <script> block into the page HTML. The bitmap and bitfield pages each only use it once currently, but the design means any page using multiple command-group shortcodes would get redundant global function definitions. This function belongs in a shared JS file or needs a guard to avoid re-declaration.
dwdougherty
left a comment
There was a problem hiding this comment.
Just one bug for the vector set group. Otherwise, this looks great, @andy-stark-redis! I'm very happy with this.
One nitpick (maybe unfixable) is that sometimes, the right side navigation menu takes a second or two to appear, and when it does, it's a bit jarring.
| weight: 55 | ||
| --- | ||
|
|
||
| {{< command-group group="module" title="Vector set command summary" show_link=true >}} |
There was a problem hiding this comment.
| {{< command-group group="module" title="Vector set command summary" show_link=true >}} | |
| {{< command-group group="vector_set" title="Vector set command summary" show_link=true >}} |
There was a problem hiding this comment.
@dwdougherty I'm not sure I understand this. Vector sets do have a group name of "module" in commands_core.json:
"VADD": {
"summary": "Add one or more elements to a vector set, or update its vector if it already exists",
"since": "8.0.0",
"group": "module",
"arity": -5,
"key_specs": [
...
...but then they have "module": "vectorset" defined in the same command entry at the end. Is the vector_set group to the command pages' Markdown frontmatter manually?
There was a problem hiding this comment.
I didn't understand it at first either; it's pretty convoluted.
I added the vector set commands using the entries in this file. The group "module" thing is an idiosyncrasy of how the module commands were added in order to support the COMMAND DOCS command. You would've seen the same thing with the other module commands, but I strip them out of the commands_core.json file before writing the file in place.
There was a problem hiding this comment.
@dwdougherty I've added an override option for when the group name in commands_core.json isn't the same as the group name in the URL. Main thing is that the vector set command ref link works correctly now.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 3 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| {{ $sortedCommands := sort $matchedCommands "name" }} | ||
|
|
||
| {{/* Generate unique ID for this instance */}} | ||
| {{ $uniqueId := printf "cmd-group-%s-%d" $groupLower (now.UnixNano) }} |
There was a problem hiding this comment.
Non-deterministic HTML output from now.UnixNano in IDs
Medium Severity
Using now.UnixNano to generate the unique element ID means every Hugo build produces different HTML output, even when content hasn't changed. This breaks Hugo's build caching, causes unnecessary diffs in version control, and can defeat CDN or deployment-layer caching that relies on content hashing. Since each page currently only has one command-group instance, the $groupLower value alone would already be unique within a page — the timestamp adds no uniqueness benefit while introducing non-determinism.
| {{ . }} | ||
| </span> | ||
| {{ end }} | ||
| {{ end }} |
There was a problem hiding this comment.
Raw ACL categories displayed as user-facing tags
Medium Severity
The shortcode renders every entry from acl_categories (e.g., @write, @string, @slow, @fast) as visible badge tags next to each command name. These are internal Redis ACL category markers not intended for end-user documentation display. With most commands having 2–4 categories, this significantly clutters each command row in the foldout, obscuring the useful information like command name, version, and summary.
|
Thanks @dwdougherty ! |


This replaces the existing "Basic commands" sections with a new summary foldout listing all commands for each data type.
All feedback/suggestions welcome. In particular, I've handled bitmap/bitfield by combining the groups together and showing them all on both the bitmap and bitfield pages. Maybe another way of handling this would work better?
Note
Medium Risk
Adds a new Hugo shortcode with inline JS/CSS markup that is rendered across many data-type pages; incorrect grouping/URL generation could break command navigation or page rendering site-wide.
Overview
Replaces the hand-written “Basic commands” sections on multiple data type docs with a reusable
{{< command-group >}}foldout that auto-lists commands for the relevant command group (with optional link to the filtered commands reference).Introduces a new
layouts/shortcodes/command-group.htmlshortcode that merges command metadata sources, filters/sorts by group, and renders an expandable command list (including per-command summary/metadata). Also updatesstrings.mdto point readers to the bitmaps/bitfields pages for bitwise/bitfield operations, and handles bitmap/bitfield by using a shared combined summary.Written by Cursor Bugbot for commit 824c37d. This will update automatically on new commits. Configure here.