docs(docs): add a module README#4344
Conversation
|
Warning Review limit reached
More reviews will be available in 55 minutes and 3 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdds ChangesDocs Module README
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
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 `@src/modules/docs/README.md`:
- Around line 12-16: Add the `text` language identifier to two unlabeled code
fence blocks in the README.md file. The first code block contains the API
endpoint examples starting with GET /api/public/docs, and the second code block
contains the URL path examples starting with /docs. For each code block, change
the opening fence from triple backticks to triple backticks followed by the word
`text` on the same line.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: b6b66bbf-ca7b-4ecd-b706-e7472c92ae74
📒 Files selected for processing (1)
src/modules/docs/README.md
There was a problem hiding this comment.
Pull request overview
Adds a module-level README for the docs module to centralize the consumed backend contract, routes, rendering pipeline, and config knobs so downstream consumers can integrate/override it correctly.
Changes:
- Add
src/modules/docs/README.mddocumenting the public docs API contract and wire shape. - Document the module’s routes (
/docs,/docs/api,/docs/:category/:slug) and theuseDocsPagerendering pipeline (ToC, runnable examples, cross-link rewrites). - Summarize downstream config surface (
config.docs.*) including personas/quickstart/reference/search.
| { id, label, guides: [{ slug, title, persona, order, summary, anchor? }] } | ||
| ``` | ||
|
|
||
| `store.normalizeTree` maps it to the canonical `{ slug, title, order, articles }` |
| - **Runnable examples** — consecutive fenced blocks are lifted into `examples` and | ||
| replaced with a nonce-tagged `data-docs-example` marker the article view hydrates | ||
| via `<DocsCodeblock>` (language tabs + copy-with-my-key). |
| ``` | ||
| GET /api/public/docs → guide tree { data: { categories: [...] } } | ||
| GET /api/public/docs/:slug.md → article markdown (raw text/markdown body) | ||
| GET /api/spec.json → merged OpenAPI 3 spec (JSON) | ||
| ``` |
The docs module shipped without a README; its consumed contract (GET /api/public/docs wire shape incl. the optional per-guide anchor, GET /api/spec.json), surfaces, rendering pipeline, and config knobs lived only in scattered code comments. Document them, pointing at code rather than restating. Closes #4339
c487add to
2b976ad
Compare
What
The docs module shipped without a
README.md; its consumed backend contract, surfaces, rendering pipeline, and config knobs lived only in scattered code comments. Addssrc/modules/docs/README.mddocumenting:GET /api/public/docswire shape incl. the optional per-guideanchor,GET /api/spec.json),/docs,/docs/api,/docs/:category/:slug),useDocsPagerendering pipeline (heading anchors · runnable examples · cross-link rewrite),reference.tagGuides, fuzzy search).Points at code rather than restating it. Verified accurate against the current module (search is fuzzy-only post-#4332; no Algolia).
Closes #4339
Summary by CodeRabbit