Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

fixed client-side export on fumadocs that was causing docs build to fail

Type of Change

  • Bug fix

Testing

Tested build 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 Oct 2, 2025

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

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Oct 2, 2025 3:48am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
sim Skipped Skipped Oct 2, 2025 3:48am

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.

Greptile Overview

Summary

This PR fixes a critical build failure in the fumadocs documentation system by correcting an import path for the `RootProvider` component. The change updates the import from `'fumadocs-ui/provider'` to `'fumadocs-ui/provider/next'` in the language-specific layout file.

This modification addresses a framework-specific compatibility issue. Fumadocs provides different provider entry points for different React frameworks, and the /next suffix specifically targets Next.js applications to ensure proper client-side rendering and hydration. The original generic provider import was incompatible with Next.js App Router's client-side bundling requirements, causing the documentation build to fail.

The fix integrates seamlessly with the existing fumadocs configuration established in source.config.ts and next.config.ts, which already set up MDX processing and documentation structure. This single-line change ensures the documentation site can build successfully while maintaining all existing functionality.

Important Files Changed

Changed Files
Filename Score Overview
apps/docs/app/[lang]/layout.tsx 5/5 Fixed RootProvider import path to use Next.js-specific provider export

Confidence score: 5/5

  • This PR is extremely safe to merge with virtually no risk of introducing issues
  • Score reflects a precise, framework-specific fix that directly addresses the root cause of build failures
  • No files require special attention as this is a straightforward import path correction

Sequence Diagram

sequenceDiagram
    participant User
    participant Browser
    participant NextJS as "Next.js App"
    participant Layout as "Layout Component"
    participant Fumadocs as "Fumadocs UI"
    participant I18n as "I18n Provider"

    User->>Browser: "Navigate to documentation page"
    Browser->>NextJS: "Request page with language parameter"
    NextJS->>Layout: "Call Layout component with params"
    Layout->>Layout: "await params to extract lang"
    Layout->>I18n: "Initialize i18n provider with lang"
    I18n-->>Layout: "Return configured provider"
    Layout->>Fumadocs: "Render DocsLayout with tree and config"
    Fumadocs->>Layout: "Render navigation with logo and dropdown"
    Layout->>Layout: "Add GitHub link and Analytics"
    Layout-->>Browser: "Return complete page structure"
    Browser-->>User: "Display documentation page"
Loading

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit b33ae5b into staging Oct 2, 2025
10 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/fumadocs branch October 2, 2025 03:52
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