Remove duplicate Example heading on rpk container status - #1860
Remove duplicate Example heading on rpk container status#1860JakeSCahill wants to merge 6 commits into
Conversation
The override for rpk container status carried two content items that each emit a level-2 Example heading: a self-hosted item with the heading hard-coded in its content, and a section item titled Example. The rendered page shows the same section heading twice and the anchors collide. Merge the Quick Start lead-in (still wrapped in ifndef::env-cloud) into the Example section and apply the same fix to the rendered page. Verified against a full regeneration with doc-tools 5.3.0, which now also warns when a page renders duplicate headings.
✅ Deploy Preview for redpanda-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI 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:
📝 WalkthroughWalkthroughThe documentation transformations now apply the Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 |
doc-tools now captures help command examples into verbatim code blocks, where only textTransformations rules flagged applyToCode run. The rpai to rpk ai rewrite needs the flag so rpk ai command examples render with the command users actually type.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs-data/rpk-overrides.json`:
- Around line 326-327: Update the replacement-item definition in
rpk-overrides.schema.json to declare applyToCode as a boolean property, allowing
the existing field in rpk-overrides.json under additionalProperties: false.
Ensure the schema validation for this override runs in CI.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1599bb0d-ebf4-4ba4-9acc-32d32d7cf9b5
📒 Files selected for processing (2)
docs-data/rpk-overrides.jsonmodules/reference/pages/rpk/rpk-container/rpk-container-status.adoc
The rpai rewrite rule now carries applyToCode: true, which the sibling schema must permit or override validation reports the rule as invalid.
e0579f1 to
4885213
Compare
|
Reviewed and verified by regenerating both ways. The container-status fix is correct and yours is the better of the two versions, so I have made room for it. Not approving yet only because of the undescribed scope, which is worth putting on the record before this lands. Overlap with #1865, already resolved on my sideThe Yours also fixes the rendered page, so the duplicate heading disappears now instead of at the next regeneration, which mine did not do. I have dropped that commit from #1865 and rebased, so this PR owns the fix and there is no longer a conflict. #1865 keeps only the stale-command-path cleanup and the Undescribed changesThe body describes the Example heading fix, but this PR also makes three other changes:
Two follow-ups, not blockers
What works well
|
|
@micheleRP this needs your approval to join the wave — it's the one PR in your merge sequence that still lacks one (mine, so I can't self-approve). It matters more than it looks now: it carries the |
…ption micheleRP's #1860 review: json round-trips flattened the escape to a literal invisible character, making previously self-documenting source unreadable. Restored the escape (byte-identical semantics).
Review finding: the \u200c escape in a transformation description became a literal invisible character during reserialization. Restored (byte-identical semantics, readable source).
|
Thanks for making room for this in #1865 — all three points are now addressed:
Ready for another look when you are. |
|
Sequencing note: please hold this merge until docs-extensions-and-macros#241 is released. #241 fixes the summary-generator defects that garbled two descriptions in #1875 (mid-token periods and unterminated paragraphs), and this PR's merge auto-triggers a rerender — with the current published doc-tools that rerender would revert the corrected pages on #1875 back to the garbled versions. Once 5.3.x with #241 is out, merging this heals everything in one pass: the applyToCode code blocks, the inline spans, and ~38 pages of run-on summaries. |
|
@micheleRP doc-tools 5.3.3 is on npm with the #241 fixes, so the hold on this PR is lifted — it's ready for your re-review whenever suits. On merge, the auto-rerender now runs with the fixed generator: it reproduces main byte for byte plus this PR's applyToCode effect (rpai gone from code blocks and inline spans). That's the last docs piece of the train. |
What
Three related changes (the review rightly flagged that the original body described only the first):
rpk container statusrenders two== Exampleheadings — live on the published page. The override carried two content items that each emit the heading: a self-hosted item with== Examplehard-coded in its content, and a section item titled Example. Merged the Quick Start lead-in (still wrapped inifndef::env-cloud) into the single Example section, and applied the same fix to the rendered page so it takes effect before the next regeneration.applyToCode: trueon the rpai text transformation. doc-tools 5.3.1 captures help command examples into verbatim code blocks, where only rules flaggedapplyToCoderun. Without this flag the published examples tell readers to run the internal plugin binary name — five occurrences inrpk-ai-agent-a2a-send.adocalone renderrpai agent a2a send ...instead ofrpk ai agent a2a send .... This changes published command examples at the next regeneration.The matching
applyToCodeproperty declared inrpk-overrides.schema.json, which is what lets theValidate rpk-overrides.jsoncheck accept the new key.Also restores the
escape that a json round-trip had flattened to a literal invisible character (review finding — byte-identical semantics, readable source).Validation
Found by the ground-truth review (every generated page checked against
rpk --helpoutput). Regenerated the full tree with the updated override and confirmed one Example heading, the sample output in both builds, and the Quick Start pointer only whenenv-cloudis unset. The duplicate-heading warning added in doc-tools 5.3.0 makes this class self-reporting at generation time.Jira
Part of DOC-2408.
Related PRs (rpk docs automation train)
See redpanda-data/docs-extensions-and-macros#225 for the train overview. The rpai-in-inline-spans and backtick-splitting follow-ups from the review are being fixed in doc-tools (they live in the transformation chain, not this data).