feat(console): ADR-0046 P2 — /docs/:name package-documentation route#1677
Merged
Conversation
One authenticated route renders any installed `doc` metadata item (flat
Markdown docs compiled from a package's src/docs/*.md):
- fetches the item via the standard metadata API (meta.getItem('doc', name))
- renders the sanitized body through @object-ui/plugin-markdown
- rewrites relative cross-references [x](./other_doc.md#anchor) →
/docs/other_doc#anchor before rendering (fenced/inline code untouched),
with SPA navigation on rewritten links
- unknown names degrade to a "Documentation not found" notice per the
ADR — never a hard failure
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Merged
2 tasks
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
ADR-0046 P2 (framework side merged as framework#1789): one authenticated console route renders any installed
docmetadata item — flat Markdown docs compiled from a package'ssrc/docs/*.md./docs/:nameroute (App.tsx, insideProtectedRoute): fetches the item via the standard metadata API (meta.getItem('doc', name)), renders the sanitized body through@object-ui/plugin-markdown(react-markdown + remark-gfm + rehype-sanitize).doc-links.ts):[x](./other_doc.md#anchor)→/docs/other_doc#anchorbefore rendering; fenced code blocks and inline code spans stay literal; rewritten links navigate via react-router (no full reload).Test plan
doc-links.test.ts— 7 cases (rewrite, anchors, external/non-doc links untouched, code blocks/spans untouched, path-shaped targets skipped)pnpm buildgreen (console build includestsc)/docs/todo_index, link rewritten to/docs/todo_user_guideand SPA-navigates,/docs/todo_nonexistentshows the not-found notice, list API stays content-free while item API returns the full body🤖 Generated with Claude Code