Skip to content

Render --help=stats from the help model - #387

Merged
helly25 merged 1 commit into
mainfrom
help/port-prose-topics-to-model
Aug 8, 2026
Merged

Render --help=stats from the help model#387
helly25 merged 1 commit into
mainfrom
help/port-prose-topics-to-model

Conversation

@helly25

@helly25 helly25 commented Aug 8, 2026

Copy link
Copy Markdown
Owner

First slice of retiring the imperative prose-topic renderers onto the shared help model (help EPIC #154).

What

  • help_build.cc: add StatsSection() - the --summary / --histogram flags pulled from the globals SOT via the stats topic tag (as model entries with details), plus worked examples rendered as verbatim commands + wrapping prose (the cookbook pattern, so they read well at narrow --width).
  • Route --help=stats through TopicReference, and add StatsSection to BuildReference so --man / --markdown / --help=full gain the section (completeness).
  • Delete RenderStats and its RenderHelp branch.

Effect

--help=stats now wraps to --width and indents consistently (previously a fixed-width pre-formatted blob). Verified --width=60: prose and example explanations wrap; only the atomic flag synopses exceed (same as every option entry in the reference).

Test

  • bazel test //xff/... (lean 85) and --config=xff_full (90, incl. the XFF.md drift guard) green.
  • XFF.md regenerated.
  • help_build_test (section list) and help_render_test (renders stats via the model, new RenderTopicDoc helper) updated.

Next slices: config / cookbook / notice / license (verbatim) / help-guide, one PR each.

…ference)

Port the --help=stats topic off the imperative RenderStats onto the shared help
model: add StatsSection() (the SOT-tagged --summary/--histogram flags as model
entries, plus worked examples as verbatim commands with wrapping prose), route
--help=stats through TopicReference, and include it in BuildReference so --man /
--markdown / --help=full gain the section. The topic now wraps to --width and
indents consistently; delete RenderStats and its RenderHelp branch. Regenerate
XFF.md; update help_build_test (section list) and help_render_test (render stats
via the model, not RenderHelp).
@helly25
helly25 enabled auto-merge (squash) August 8, 2026 10:43
@helly25
helly25 merged commit 42562a9 into main Aug 8, 2026
9 checks passed
@helly25
helly25 deleted the help/port-prose-topics-to-model branch August 8, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant