feat(docs): color process-facing help - #1111
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
Instruction counts
No instruction-count regression above 1%. 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
|
927b5b4 to
c792d3e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5e6e4b4. Configure here.

Summary
NO_COLORandCLICOLOR_FORCEwhile retaining explicit plain/colored rendering APIsVerification
cargo test -p usage-argv --features diagnostics style_tests -- --nocapturecargo test -p usage-rs --test facadecargo clippy -p usage-argv --all-features -- -D warningscargo clippy -p usage-rs --all-features -- -D warningsThis pull request was generated by Codex.
Note
Low Risk
Help-only presentation changes with explicit plain APIs preserved; behaviour is covered by new style tests and an extended missing-subcommand diagnostic test.
Overview
Process-facing help is now ANSI-coloured when stdout is a TTY, matching the existing diagnostic styling story: section headings,
Usage:lines, synopsis literals, and flag spellings in option lists get selective colour while plain text stays byte-identical for pipes, tests, and generated docs viahelp::Style::PLAIN/COLOUREDandStyle::auto()(NO_COLOR,CLICOLOR_FORCE).New
render_styled/render_at_styledbuild the same page as before, then post-process with structure derived from the spec (help_structure,styled_flag_usage).usage-deriveswitches generated--helphandling toStyle::auto()instead of plainrender/render_at.MissingSubcommanddiagnostics use coloured short help when error rendering is coloured.PLAN and clap-compatibility mark the colour gap closed and note that clap’s custom
Command::stylespalette is intentionally not reproduced.Reviewed by Cursor Bugbot for commit f3ccb40. Bugbot is set up for automated code reviews on this repo. Configure here.