improvement(docs): instant copy button + performance optimizations#3076
improvement(docs): instant copy button + performance optimizations#3076waleedlatif1 merged 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile OverviewGreptile SummaryImproved docs page performance by moving markdown content loading to server-side, eliminating client-side fetch delays for the "Copy page" button. Added Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant NextJS as Next.js Server
participant MDX as MDX Loader
participant Component as Page Component
Note over Browser,Component: Before (Client-side fetch)
Browser->>Component: Load page
Component->>Browser: Render with copy button
Browser->>Browser: User clicks "Copy page"
Browser->>NextJS: fetch(markdownUrl)
NextJS-->>Browser: Raw markdown content
Browser->>Browser: Copy to clipboard
Note over Browser,Component: After (Server-side)
Browser->>NextJS: Request page
NextJS->>MDX: getText('processed')
MDX-->>NextJS: Markdown content
NextJS->>Component: Render with content prop
Component->>Browser: Page with embedded content
Browser->>Browser: User clicks "Copy page"
Browser->>Browser: Instant copy (no fetch)
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Summary
display: 'swap'to prevent invisible text during font loadlazyOnloadstrategyType of Change
Testing
Tested manually
Checklist