Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • Server-side markdown content for instant "Copy page" button (no fetch delay)
  • Added font display: 'swap' to prevent invisible text during font load
  • Changed analytics script to lazyOnload strategy
  • Minor styling fixes (navbar, code block, 404 page color)

Type of Change

  • Improvement (non-breaking enhancement)

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jan 30, 2026 6:55am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 30, 2026

Greptile Overview

Greptile Summary

Improved docs page performance by moving markdown content loading to server-side, eliminating client-side fetch delays for the "Copy page" button. Added display: 'swap' to font configurations to prevent invisible text during font loading, and changed analytics script from blocking to lazyOnload strategy. Minor styling improvements include converting navbar backdrop blur from inline styles to Tailwind classes, updating 404 page gradient colors to match brand theme, and fixing whitespace formatting in icon components.

Confidence Score: 5/5

  • Safe to merge - all changes are performance optimizations and minor style improvements
  • Changes are well-contained improvements to documentation site performance with no breaking changes. Server-side markdown loading is a proper pattern, font display swap prevents FOIT, and lazyOnload analytics strategy improves initial page load. Code simplifications in copy button and styling are clean.
  • No files require special attention

Important Files Changed

Filename Overview
apps/docs/app/[lang]/[[...slug]]/page.tsx Server-side markdown content loading for instant copy button, replaced CodeBlock with pre wrapper
apps/docs/components/page-actions.tsx Simplified copy button by removing async fetch logic and cache, now uses server-provided content
apps/docs/app/[lang]/layout.tsx Added font display swap and moved analytics script to lazyOnload strategy for performance
apps/docs/components/ui/code-block.tsx Simplified copy button styling, changed selector from .nd-codeblock to figure

Sequence Diagram

sequenceDiagram
    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)
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@waleedlatif1 waleedlatif1 merged commit f718079 into staging Jan 30, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the improvement/docs branch January 30, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants