feat(help): add semantic command styling - #1375
Conversation
Entire-Checkpoint: 1d1edfa8d7ed
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe help system adds a ChangesCommand help styling
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Visible command rows, including the optional help row, now use the configurable bold-green command style while prose and flattened help remain unchanged. No concrete current-head merge risk remains. Sequence Diagram(s)sequenceDiagram
participant render_help_styled
participant Styling
participant styled_help
participant HelpOutput
render_help_styled->>Styling: pass show_help_subcommand
Styling->>Styling: collect and sort command_usages
render_help_styled->>styled_help: pass command_usages
styled_help->>HelpOutput: render matching rows with command style
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1c6df06. Configure here.
Entire-Checkpoint: 6e5cdd08407b
Instruction counts
2 benchmark(s) above the 1% gate: Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes. Shadow comparisonParsing
|

Summary
commandsemantic help style with bold green defaultshelprow in both Rust renderersCloses #1374
Tests
cargo test --workspace --all-features --exclude gatecargo clippy --all --all-features --all-targets -- -D warningscargo fmt --all -- --checknpx --yes prettier@latest -w docs/rust/help.md docs/spec/reference/index.mdThe full local gate could not run because this machine has mise 2026.6.13 while the repository requires 2026.8.16; Go and a few shell integration dependencies are also supplied by that managed toolchain.
This pull request was generated by Codex.
Note
Low Risk
Help presentation-only changes with no parsing or spec behavior impact; plain and generated artifacts stay compatible.
Overview
Coloured terminal help now highlights subcommand names (and the built-in
helprow when shown) with a newcommandsemantic style—bold green, same palette family as options. Plain output is unchanged; stripping ANSI still yields byte-identical pages.Both render paths pick this up:
usage-argvcollectscommand_usagesin a refactoredHelpStructureand applies them instyled_helpwith row-aware matching (two-space table separator), so command-group prose likebuild these projects…is not mistaken for a command row.usage-libmirrors the same logic inStyling, including skipping command names underflatten_help.{$command}…{/$}is added to the closed help-template style vocabulary everywhere it is validated—derive, corpus, GoHelpStyles, and shared template parsers—and docs note thatheading,option,metavar, andcommandare the semantic tags.Reviewed by Cursor Bugbot for commit 07d0dbd. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
helpcommand in bold green when color is enabled.commandas a supported help-template style.Bug Fixes
Documentation
Tests