Claude/restore docs merge fo on a#60
Conversation
Replace hardcoded documentation content with build-time dynamic loading using Vite's import.meta.glob. Documentation now automatically syncs with markdown files in the docs/ directory. Key changes: - Add docsLoader.ts utility for build-time markdown file discovery - Refactor Docs.tsx to load and render markdown dynamically - Auto-generate sidebar navigation from docs/ file structure - Extract headings from markdown for table of contents - Render with react-markdown + remark-gfm + syntax highlighting - Each doc is lazy-loaded as a separate chunk for performance - Search across all document titles via Cmd+K https://claude.ai/code/session_012KsDR5wEapUHh2cNNwryLm
Overhaul README to reflect VSPEC's positioning as "The Documentation Scope for AI Era". Includes value proposition, ecosystem overview, feature highlights, pricing table, tech stack, and design system tokens. https://claude.ai/code/session_012KsDR5wEapUHh2cNNwryLm
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe docs system moved from static pages to a dynamic, Markdown-driven pipeline: a new docsLoader discovers Markdown files at build time, the Docs page renders them via ReactMarkdown with syntax highlighting, and README/package.json/vite/workflow updates accommodate the new docs assets and tooling. Changes
Sequence DiagramsequenceDiagram
participant User
participant DocsComponent as Docs Component
participant DocsLoader as docsLoader Module
participant FileSystem as /docs Files
participant Renderer as ReactMarkdown Renderer
User->>DocsComponent: Open Docs page / select doc
DocsComponent->>DocsLoader: buildNavigation()
DocsLoader->>FileSystem: Scan /docs via import.meta.glob
FileSystem-->>DocsLoader: File metadata & URLs
DocsLoader-->>DocsComponent: navigation tree (DocCategory[])
DocsComponent->>DocsLoader: loadDocContent(filePath)
DocsLoader->>FileSystem: Fetch markdown content (URL)
FileSystem-->>DocsLoader: Raw markdown text
DocsLoader-->>DocsComponent: Markdown string
DocsComponent->>DocsComponent: extractHeadings(markdown) → headings/TOC
DocsComponent->>Renderer: Render markdown with custom components & Prism
Renderer-->>DocsComponent: Rendered HTML/JSX
DocsComponent-->>User: Display content, sidebar, and TOC
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9271ad5613
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const text = String(children || ''); | ||
| return ( | ||
| <h2 | ||
| id={slugify(text)} |
There was a problem hiding this comment.
Generate heading IDs from plain text, not React children
The heading anchor IDs are built from String(children), which turns formatted heading nodes into strings like "[object Object]"; meanwhile the TOC IDs come from extractHeadings using cleaned markdown text. In docs that use inline formatting in headings (for example many ### **...** entries under docs/), clicking "On This Page" links will fail because the computed IDs no longer match the actual heading IDs.
Useful? React with 👍 / 👎.
| loadDocContent(doc.filePath).then((content) => { | ||
| setMarkdownContent(content); | ||
| setLoading(false); |
There was a problem hiding this comment.
Prevent stale async doc loads from overwriting current page
This effect updates state from an uncancelled async loadDocContent call, so rapid navigation between docs can resolve promises out of order and render older content after a newer selection. Because each doc load is asynchronous (dynamic import), the previous request should be ignored/aborted when activeDocId changes to avoid showing mismatched document content.
Useful? React with 👍 / 👎.
- Switch markdown loading from ?raw (JS chunks) to ?url (static assets loaded via fetch at runtime) - reduces JS bundle by ~500KB - Add vendor-markdown chunk for react-markdown + remark-gfm - Raise CI bundle limit from 5MB to 6MB to accommodate docs assets https://claude.ai/code/session_012KsDR5wEapUHh2cNNwryLm
📊 Performance Report
View detailed Lighthouse report in artifacts. |
Pull Request
Description
Type of Change
Related Issues
Changes Made
Screenshots/Videos
Before
After
Testing
Design System Compliance
#7C85EDappropriately (sparingly)Checklist
Additional Notes
Summary by CodeRabbit
New Features
Documentation
Chores