Skip to content

fix: render Click \b verbatim blocks in CLI reference docs (#866)#867

Merged
planetf1 merged 4 commits intogenerative-computing:mainfrom
planetf1:cs/issue-dosc
Apr 16, 2026
Merged

fix: render Click \b verbatim blocks in CLI reference docs (#866)#867
planetf1 merged 4 commits intogenerative-computing:mainfrom
planetf1:cs/issue-dosc

Conversation

@planetf1
Copy link
Copy Markdown
Contributor

@planetf1 planetf1 commented Apr 15, 2026

fix: render Click \b verbatim blocks in CLI reference docs

Type of PR

  • Bug Fix
  • New Feature
  • Documentation
  • Other

Description

The CLI reference docs generator was silently dropping \b-delimited
sections from m fix async and m fix genslots. These blocks —
Modes, Best practices, Detection notes, Rewrites — are visible in
--help but were buried after Raises: in the docstrings, which the
section parser assigns to sections["Raises"], a section that is never
rendered.

Fix adds _extract_verbatim_blocks() which splits the raw help text on
\x08 directly, independent of the section parser. Blocks are rendered
after the options table with format chosen to match their content:

  • Bullet lists (Best practices, Detection notes, Rewrites) — rendered
    as markdown bullets, with wrapped continuation lines rejoined.
  • Two-column aligned blocks (Modes) — rendered as bold-name bullets
    (- **\name`** — description`) to preserve the name/description
    structure at consistent font size.

PDF -> CLI Reference - Mellea.pdf

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code as added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Attribution

  • AI coding assistants used

…e-computing#866)

The docs generator was silently dropping \b-delimited sections
(Modes, Best practices, Detection notes, Rewrites) from m fix async
and m fix genslots. These blocks were buried inside the Raises section
by the docstring parser and never rendered, causing a fidelity gap
with --help output.

Adds _extract_verbatim_blocks() to split on \x08 directly from the
raw help text, independent of the section parser. Three new tests
verify the extraction logic and that the affected content now appears
in the generated reference page.
@github-actions github-actions Bot added the bug Something isn't working label Apr 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

The PR description has been updated. Please fill out the template for your PR to be reviewed.

Best practices, Detection notes and Rewrites sections in \b blocks
are bullet lists and should render as markdown, not monospace code.
Modes retains a code fence as it uses columnar alignment.

Continuation lines wrapped across multiple source lines are joined
back into their parent bullet.
Click-style two-column aligned blocks (e.g. Modes in m fix async) were
rendered as code fences. The generator now detects the name + 2-space +
description pattern and emits a markdown table, preserving the original
terminal-aligned docstring format while rendering cleanly in HTML docs.
Table cells render in a smaller font than body text in Mintlify,
creating inconsistency with bullet-list blocks. Render two-column
\b blocks as `- **\`name\`** — description` bullets instead:
consistent font, no invented column headers.
@planetf1 planetf1 requested a review from serjikibm April 15, 2026 16:26
@planetf1 planetf1 marked this pull request as ready for review April 15, 2026 16:26
@planetf1 planetf1 requested a review from a team as a code owner April 15, 2026 16:26
@planetf1
Copy link
Copy Markdown
Contributor Author

AFTER merge this will be available at https://ibm-llm-runtime-aaf3a78b.mintlify.app/ for verification. It will get to https://mellea.ai when the next release is made.

@planetf1 planetf1 enabled auto-merge April 16, 2026 11:29
Copy link
Copy Markdown
Collaborator

@serjikibm serjikibm left a comment

Choose a reason for hiding this comment

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

LGTM, we can further verify on the staging url

@planetf1
Copy link
Copy Markdown
Contributor Author

LGTM, we can further verify on the staging url

Thanks for the review - I presume you do not have write access? cc: @psschwei perhaps you could check you're ok with the change

Copy link
Copy Markdown
Contributor

@AngeloDanducci AngeloDanducci left a comment

Choose a reason for hiding this comment

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

LGTM

continue
# Detect a new entry: leading whitespace, a name (no spaces), then 2+
# spaces, then description text — all starting before the desc column.
m = re.match(r"^(\s+)(\S+)(\s{2,})(\S.*)", raw)
Copy link
Copy Markdown
Contributor

@AngeloDanducci AngeloDanducci Apr 16, 2026

Choose a reason for hiding this comment

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

For a moment I though this should maybe be \s* instead of \s+ but this matches the description so as long as the format is consistent should be fine.

@planetf1 planetf1 added this pull request to the merge queue Apr 16, 2026
Merged via the queue into generative-computing:main with commit 687871e Apr 16, 2026
16 checks passed
@planetf1 planetf1 deleted the cs/issue-dosc branch April 16, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI reference docs are missing content visible in --help

3 participants