GeezerVison is showing github.com — fix(help): a description ending in a break adds no blank line by jdx · Pull Request #970 · jdx/usage
Conversation
jdx
commented
Aug 17, 2026
•
edited by cursor
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
clap's long_about often ends with a newline — a /// block whose last line
is empty, an examples section written with a trailing break — and it reaches
the spec verbatim. Both renderers write their own blank line after a
description, so one already in the text doubled it: a stray blank in the
middle of Commands:, and a second gap under the program's own description.
Trimmed in both, in all three places it shows: a command entry's description,
the page's own, and the spec-level long_about. Only trailing whitespace —
leading is layout and belongs to the author.
A decision rather than a match, and recorded as one: usage-lib reproduced the
whitespace faithfully and usage-argv did in some places and not others, so
there was no side to defer to. The page now loses whitespace nobody wrote on
purpose.
Trimming one side alone traded one CLI's divergence for another's — pitchfork
went green and mise red, twice, from two different call sites. That is what
says this had to land as one change across both renderers.
The manpage renderer reads the same model and loses a blank line with it,
which its snapshot records.
With this, all seven jdx CLIs render byte-identically to usage-lib across
every command in both help forms: hk, fnox, pitchfork, aube, tak, communique
and mise — 492 commands.
Stack created with GitHub Stacks CLI • Give Feedback 💬
Note Low Risk
Presentation-only trimming of trailing whitespace in help/manpage output; conformance tests lock behavior across both renderers.
Overview
Fixes extra blank lines in CLI help when long_about / program descriptions end with a trailing newline (common from clap /// blocks or example sections). Renderers already insert a blank line after each description; text that kept that newline produced double gaps under the program summary and stray blanks between Commands: entries (e.g. mise plugins ls-remote, pitchfork daemons add).
usage-argv applies trim_end() when printing root about / long_about in short and long help, and when indenting subcommand long_about in the long Commands: section. usage-lib trims about_long and per-command help_long when building the docs Spec model so Tera/manpage output matches the same rule.
Adds conformance tests (trailing_whitespace.rs) asserting no \n\n\n, parity between usage-argv and usage-lib for short/long help, and that command entries still have a single blank line between them. Updates the manpage snapshot for the removed blank under plugins ls-remote.
Reviewed by Cursor Bugbot for commit dd0ba49. Bugbot is set up for automated code reviews on this repo. Configure here.
AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5; version: unavailable.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
greptile-apps[bot] reacted with thumbs up emoji
coderabbitai
Bot
commented
Aug 17, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Auto reviews are disabled on base/target branches other than the default branch.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 4c9981b4-f0c2-4230-9a8a-99efe9c3984a
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
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.
❤️ Share
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Greptile Summary
The PR normalizes trailing whitespace in long descriptions so help and manpage renderers provide exactly one separator.
- Trims root and subcommand descriptions in the compiled argv help renderer.
- Normalizes long descriptions in the shared documentation model.
- Adds cross-renderer conformance coverage and updates the affected manpage snapshot.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
| Filename |
Overview |
| argv/src/help.rs |
Trims trailing description whitespace before renderer-owned separators in short help, long help, and long command entries. |
| lib/src/docs/models.rs |
Normalizes long program and command descriptions in the shared model consumed by help, markdown, and manpage renderers. |
| conformance/tests/trailing_whitespace.rs |
Covers blank-line normalization, parity between both renderers, command parsing, and command-entry separation. |
| cli/tests/snapshots/manpage__generate_manpage_with_flags.snap |
Records removal of the redundant blank line from generated manpage output. |
Reviews (4): Last reviewed commit: "fix(help): a description ending in a bre..." | Re-trigger Greptile
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Instruction counts
| benchmark |
trend |
instructions |
Δ |
wall (min) |
Δ |
| markdown |
▁▁▁█████ |
197,252,892 → 197,178,558 |
-0.04% |
18.19 → 20.55ms |
+12.98% |
| startup |
▂▁▂█████ |
1,242,733 → 1,242,695 |
-0.00% |
1.05 → 1.23ms |
+17.12% |
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 comparison
Parsing mise use -g node@20 against a shadow of mise's committed spec.
Reported, not gated: the shadow grows as the derive learns to express more, so
what to watch is the ratio rather than either column.
|
usage |
clap |
ratio |
| instructions, cold parse |
64525 |
5895248 |
91x |
usage: argv -> struct 1165 ns 1.16 µs
clap: build tree + parse -> struct 510713 ns 510.71 µs
clap: parse -> struct, tree reused 23982 ns 23.98 µs
clap: build tree only 310160 ns 310.16 µs
1dbcb228f31e vs 60b4357913a5 · measured on the runner, not pushed to the history.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
clap's `long_about` often ends with a newline — a `///` block whose last line
is empty, an examples section written with a trailing break — and it reaches
the spec verbatim. Both renderers write their own blank line after a
description, so one already in the text doubled it: a stray blank in the
middle of `Commands:`, and a second gap under the program's own description.
Trimmed in both, in all three places it shows: a command entry's description,
the page's own, and the spec-level `long_about`. Only trailing whitespace —
leading is layout and belongs to the author.
A decision rather than a match, and recorded as one: usage-lib reproduced the
whitespace faithfully and usage-argv did in some places and not others, so
there was no side to defer to. The page now loses whitespace nobody wrote on
purpose.
Trimming one side alone traded one CLI's divergence for another's — pitchfork
went green and mise red, twice, from two different call sites. That is what
says this had to land as one change across both renderers.
The manpage renderer reads the same model and loses a blank line with it,
which its snapshot records.
With this, all seven jdx CLIs render byte-identically to usage-lib across
every command in both help forms: hk, fnox, pitchfork, aube, tak, communique
and mise — 492 commands.
Uh oh!
There was an error while loading. Please reload this page.
jdx
added a commit
that referenced
this pull request
Aug 17, 2026
Both sides of the reference stopped writing that blank in #970 — clap's
`long_about` often ends with one, a `///` block whose last line is empty or an
examples section written with a trailing newline, and it reaches the spec
verbatim. The blank line under a description belongs to the renderer, so one
already in the text was a second one: a stray blank under the about, and another
in the middle of the `Commands:` list.
The same three places usage-argv trims: the about on the short page, the about on
the long page, and each entry of the long page's command list.
Found by CI failing where local runs passed — CI tests the branch merged with
main, which has the fix, and mise exercises it through `plugins ls-remote`. The
rule gets a unit test as well: the parity suite says a page differs, not which
rule broke.
Co-Authored-By: Claude Opus 5 <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|