Conversation
📝 WalkthroughWalkthroughThis PR migrates the docs app from Nextra to FUMAdocs framework. It removes legacy UI components and animations, replaces Next.js configuration, updates dependencies, introduces new MDX documentation pages, and refactors layout and routing to work with the new documentation system. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Preview Deployment🔗 Preview Links
Preview updates automatically with new commits |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Fix all issues with AI agents
In `@apps/docs/next.config.mjs`:
- Around line 31-43: The rewrite ordering causes the wildcard rule
"/ingest/:path*" to shadow the specific "/ingest/decide" rule; fix by reordering
the array of rewrite objects so the specific route object with source
"/ingest/decide" and destination "https://us.i.posthog.com/decide" appears
before the wildcard object with source "/ingest/:path*" (leave the
"/ingest/static/:path*" mapping as appropriate).
- Around line 25-29: Update the MDX rewrite object so its destination removes
the extra "/docs/" segment: leave source as "/docs/:path*.mdx" and change
destination from "/llms.mdx/docs/:path*" to "/llms.mdx/:path*" so the route
handler that serves LLM MDX content can match correctly.
In `@apps/docs/src/app/docs/layout.tsx`:
- Around line 1-5: The file uses the LayoutProps generic in the Layout signature
but doesn't import it, causing a TS build error; add an import for the type
(e.g. add "import type { LayoutProps } from 'next';") at the top of
apps/docs/src/app/docs/layout.tsx and do the same in
apps/docs/src/app/layout.tsx, or if your project exposes LayoutProps from
fumadocs-ui, import it from "fumadocs-ui" instead (ensure you use "import type"
to avoid runtime imports).
In `@apps/docs/src/components/ai/page-actions.tsx`:
- Around line 85-90: The SSR fallback sets fullMarkdownUrl to the literal
"loading" inside the useMemo (items) which produces a malformed query; change
the logic so URL construction is deferred to client mount: detect SSR by
checking typeof window and if undefined return an empty items array (or null)
from the useMemo, or convert the memo to a client-only pattern using useState +
useEffect to build fullMarkdownUrl from markdownUrl after mount; update
references to items/fullMarkdownUrl so render paths handle the empty array/null
case until the real URL is available.
In `@cli.json`:
- Around line 1-13: The cli.json references a missing dependency and
non-existent aliased dirs; either remove cli.json if fumadocs/ `@fumadocs/cli` is
not used, or install the package and create the required directories: add
`@fumadocs/cli` to dependencies (or devDependencies) in package.json and run
npm/yarn install, then create the aliased folders referenced by the "aliases"
keys ("uiDir", "componentsDir", "blockDir", "cssDir", "libDir") with the
expected content (e.g., ./components/ui, ./components, ./styles, ./lib), and
ensure the "$schema" path resolves or update it to the installed package schema
path; pick one approach and apply it consistently so cli.json is valid.
🧹 Nitpick comments (10)
apps/docs/src/lib/cn.ts (1)
1-1: Consider combiningclsxwithtwMergefor fullcnutility behavior.The standard
cnutility (as popularized by shadcn/ui) combinesclsxfor conditional class handling withtwMergefor Tailwind class deduplication. This implementation only re-exportstwMerge, which doesn't support conditional class syntax likecn("foo", isActive && "bar").♻️ Suggested implementation for full cn utility
-export { twMerge as cn } from "tailwind-merge"; +import { clsx, type ClassValue } from "clsx"; +import { twMerge } from "tailwind-merge"; + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)); +}This requires adding
clsxas a dependency inapps/docs/package.json.apps/docs/src/components/docs/DownloadButton.tsx (1)
1-25: Component folder structure doesn't follow guidelines.Per coding guidelines, components should follow the folder structure pattern:
ComponentName/ComponentName.tsxwith a barrel exportindex.ts. Consider moving to:
apps/docs/src/components/docs/DownloadButton/DownloadButton.tsxapps/docs/src/components/docs/DownloadButton/index.tsThe implementation itself is clean with proper accessibility attributes on the SVG.
📁 Suggested folder structure
Create
apps/docs/src/components/docs/DownloadButton/DownloadButton.tsxwith the current content, and add a barrel export:// apps/docs/src/components/docs/DownloadButton/index.ts export { DownloadButton } from "./DownloadButton";apps/docs/tsconfig.json (1)
1-36: Extend the shared TypeScript configuration for consistency.All other Next.js apps in the monorepo extend
@superset/typescript/next.json, butapps/docs/tsconfig.jsondoes not. This creates configuration drift from peer apps (admin, marketing, web).Extend the shared config while preserving the intentional compiler option overrides needed for the fumadocs setup:
{ "extends": "@superset/typescript/next.json", "compilerOptions": { "target": "ESNext", "lib": ["dom", "dom.iterable", "esnext"], "jsx": "react-jsx", "module": "esnext", "moduleResolution": "bundler", "allowJs": true, "noEmit": true, "isolatedModules": true, "incremental": true, "baseUrl": ".", "paths": { "@/*": ["./src/*"], "fumadocs-mdx:collections/*": [".source/*"] } }, "include": [ "next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts" ], "exclude": ["node_modules"] }apps/docs/src/lib/source.ts (1)
21-27: Consider adding error handling forgetText.If
page.data.getText("processed")fails (e.g., missing processed content), this will throw an unhandled exception. Per coding guidelines, errors should not be swallowed silently—at minimum, log them with context.🛠️ Suggested improvement
export async function getLLMText(page: InferPageType<typeof source>) { - const processed = await page.data.getText("processed"); + let processed: string; + try { + processed = await page.data.getText("processed"); + } catch (error) { + console.error(`[source/getLLMText] Failed to get processed text for page: ${page.data.title}`, error); + processed = ""; + } return `# ${page.data.title} ${processed}`; }apps/docs/src/app/llms-full.txt/route.ts (1)
5-9: Add Content-Type header and consider error resilience.Two observations:
The sibling route at
llms.mdx/docs/[[...slug]]/route.tssetsContent-Type: text/markdown, but this route omits it. For consistency and proper client handling, consider adding the header.
Promise.allwill reject immediately if any singlegetLLMTextcall fails, potentially returning nothing. ConsiderPromise.allSettledfor resilience if partial results are acceptable.🛠️ Suggested fix with Content-Type header
export async function GET() { const scan = source.getPages().map(getLLMText); const scanned = await Promise.all(scan); - return new Response(scanned.join("\n\n")); + return new Response(scanned.join("\n\n"), { + headers: { + "Content-Type": "text/plain; charset=utf-8", + }, + }); }apps/docs/README.md (1)
16-16: Wrap the bare URL in angle brackets or use Markdown link syntax.Static analysis (markdownlint MD034) flagged the bare URL. For proper Markdown formatting:
📝 Suggested fix
-Open http://localhost:3000 with your browser to see the result. +Open <http://localhost:3000> with your browser to see the result.apps/docs/src/app/og/docs/[...slug]/route.tsx (1)
8-27: Extract hardcoded site name to a constant or shared config.The
"My App"placeholder should be extracted to a named constant or shared configuration for maintainability and consistency across the app.🛠️ Suggested improvement
+const SITE_NAME = "My App"; // TODO: Move to shared config + export async function GET( _req: Request, { params }: RouteContext<"/og/docs/[...slug]">, ) { const { slug } = await params; const page = source.getPage(slug.slice(0, -1)); if (!page) notFound(); return new ImageResponse( <DefaultImage title={page.data.title} description={page.data.description} - site="My App" + site={SITE_NAME} />, { width: 1200, height: 630, }, ); }apps/docs/package.json (1)
17-19: Consider consistent version pinning strategy.The
fumadocs-*packages use exact versions (16.4.7,14.2.5) while other dependencies use caret ranges (^). This inconsistency may lead to confusion about the versioning strategy. Consider either:
- Using caret ranges for fumadocs packages if you want automatic minor/patch updates
- Documenting why exact pinning is needed for fumadocs (e.g., known compatibility issues)
apps/docs/content/docs/core-features.mdx (1)
6-24: Consider differentiating or consolidating content with overview.mdx.This page covers the same topics as
overview.mdx(Workspace Management, Terminal Integration, Team Collaboration, How It Works) but with less detail. This creates content redundancy and potential maintenance burden.Consider either:
- Making this page a deep-dive into each feature with more technical details
- Removing duplicate sections and linking to the overview instead
- Consolidating into a single comprehensive page
apps/docs/src/components/ai/page-actions.tsx (1)
21-243: Multiple exported components in a single file.This file exports two components (
LLMCopyButtonandViewOptions), which violates the coding guideline: "One component per file - do not create multi-component files."Consider splitting into:
apps/docs/src/components/ai/llm-copy-button.tsxapps/docs/src/components/ai/view-options.tsxBased on learnings, kebab-case file naming should be used for components in
src/components/.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (8)
apps/docs/public/file.svgis excluded by!**/*.svgapps/docs/public/globe.svgis excluded by!**/*.svgapps/docs/public/logo-full.pngis excluded by!**/*.pngapps/docs/public/logo.pngis excluded by!**/*.pngapps/docs/public/next.svgis excluded by!**/*.svgapps/docs/public/vercel.svgis excluded by!**/*.svgapps/docs/public/window.svgis excluded by!**/*.svgbun.lockis excluded by!**/*.lock
📒 Files selected for processing (44)
apps/docs/.gitignoreapps/docs/README.mdapps/docs/content/docs/core-features.mdxapps/docs/content/docs/guides.mdxapps/docs/content/docs/installation.mdxapps/docs/content/docs/meta.jsonapps/docs/content/docs/overview.mdxapps/docs/content/docs/quick-start.mdxapps/docs/mdx-components.tsxapps/docs/next.config.mjsapps/docs/next.config.tsapps/docs/package.jsonapps/docs/postcss.config.mjsapps/docs/source.config.tsapps/docs/src/app/api/search/route.tsapps/docs/src/app/docs/[[...slug]]/page.tsxapps/docs/src/app/docs/layout.tsxapps/docs/src/app/getting-started/page.mdxapps/docs/src/app/global.cssapps/docs/src/app/globals.cssapps/docs/src/app/layout.tsxapps/docs/src/app/llms-full.txt/route.tsapps/docs/src/app/llms.mdx/docs/[[...slug]]/route.tsapps/docs/src/app/og/docs/[...slug]/route.tsxapps/docs/src/app/page.mdxapps/docs/src/app/providers.tsxapps/docs/src/components/Footer.tsxapps/docs/src/components/Header.tsxapps/docs/src/components/ai/page-actions.tsxapps/docs/src/components/docs/DownloadButton.tsxapps/docs/src/components/motion/FadeUp.tsxapps/docs/src/components/motion/HeroParallax.tsxapps/docs/src/components/motion/TiltCard.tsxapps/docs/src/components/motion/index.tsapps/docs/src/components/three/HeroCanvas.tsxapps/docs/src/components/three/index.tsapps/docs/src/env.tsapps/docs/src/instrumentation-client.tsapps/docs/src/lib/cn.tsapps/docs/src/lib/layout.shared.tsxapps/docs/src/lib/source.tsapps/docs/src/mdx-components.tsxapps/docs/tsconfig.jsoncli.json
💤 Files with no reviewable changes (14)
- apps/docs/src/components/three/index.ts
- apps/docs/src/app/page.mdx
- apps/docs/src/components/motion/index.ts
- apps/docs/next.config.ts
- apps/docs/src/app/providers.tsx
- apps/docs/src/components/motion/TiltCard.tsx
- apps/docs/src/components/three/HeroCanvas.tsx
- apps/docs/src/app/getting-started/page.mdx
- apps/docs/src/app/globals.css
- apps/docs/src/components/Footer.tsx
- apps/docs/src/components/motion/HeroParallax.tsx
- apps/docs/mdx-components.tsx
- apps/docs/src/components/Header.tsx
- apps/docs/src/components/motion/FadeUp.tsx
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use object parameters for functions with 2+ parameters instead of positional arguments
Functions with 2+ parameters should accept a single params object with named properties for self-documentation and extensibility
Use prefixed console logging with context pattern: [domain/operation] message
Extract magic numbers and hardcoded values to named constants at module top
Use lookup objects/maps instead of repeated if (type === ...) conditionals
Avoid usinganytype - maintain type safety in TypeScript code
Never swallow errors silently - at minimum log them with context
Import from concrete files directly when possible - avoid barrel file abuse that creates circular dependencies
Avoid deep nesting (4+ levels) - use early returns, extract functions, and invert conditions
Use named properties in options objects instead of boolean parameters to avoid boolean blindness
Files:
apps/docs/src/app/llms-full.txt/route.tsapps/docs/src/app/docs/layout.tsxapps/docs/src/mdx-components.tsxapps/docs/src/components/ai/page-actions.tsxapps/docs/src/lib/cn.tsapps/docs/source.config.tsapps/docs/src/app/layout.tsxapps/docs/src/app/llms.mdx/docs/[[...slug]]/route.tsapps/docs/src/lib/layout.shared.tsxapps/docs/src/lib/source.tsapps/docs/src/components/docs/DownloadButton.tsxapps/docs/src/instrumentation-client.tsapps/docs/src/app/og/docs/[...slug]/route.tsxapps/docs/src/app/docs/[[...slug]]/page.tsxapps/docs/src/app/api/search/route.tsapps/docs/src/env.ts
apps/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use Drizzle ORM for all database operations - never use raw SQL
Files:
apps/docs/src/app/llms-full.txt/route.tsapps/docs/src/app/docs/layout.tsxapps/docs/src/mdx-components.tsxapps/docs/src/components/ai/page-actions.tsxapps/docs/src/lib/cn.tsapps/docs/source.config.tsapps/docs/src/app/layout.tsxapps/docs/src/app/llms.mdx/docs/[[...slug]]/route.tsapps/docs/src/lib/layout.shared.tsxapps/docs/src/lib/source.tsapps/docs/src/components/docs/DownloadButton.tsxapps/docs/src/instrumentation-client.tsapps/docs/src/app/og/docs/[...slug]/route.tsxapps/docs/src/app/docs/[[...slug]]/page.tsxapps/docs/src/app/api/search/route.tsapps/docs/src/env.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use Biome for formatting and linting - run at root level with
bun run lint:fixorbiome check --write
Files:
apps/docs/src/app/llms-full.txt/route.tsapps/docs/src/app/docs/layout.tsxapps/docs/src/mdx-components.tsxapps/docs/src/components/ai/page-actions.tsxapps/docs/src/lib/cn.tsapps/docs/source.config.tsapps/docs/src/app/layout.tsxapps/docs/src/app/llms.mdx/docs/[[...slug]]/route.tsapps/docs/src/lib/layout.shared.tsxapps/docs/src/lib/source.tsapps/docs/src/components/docs/DownloadButton.tsxapps/docs/src/instrumentation-client.tsapps/docs/src/app/og/docs/[...slug]/route.tsxapps/docs/src/app/docs/[[...slug]]/page.tsxapps/docs/src/app/api/search/route.tsapps/docs/src/env.ts
**/*.tsx
📄 CodeRabbit inference engine (AGENTS.md)
One component per file - do not create multi-component files
Files:
apps/docs/src/app/docs/layout.tsxapps/docs/src/mdx-components.tsxapps/docs/src/components/ai/page-actions.tsxapps/docs/src/app/layout.tsxapps/docs/src/lib/layout.shared.tsxapps/docs/src/components/docs/DownloadButton.tsxapps/docs/src/app/og/docs/[...slug]/route.tsxapps/docs/src/app/docs/[[...slug]]/page.tsx
apps/*/src/components/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Co-locate component dependencies: utils, hooks, constants, config, tests, stories in the same folder as the component using them
Files:
apps/docs/src/components/ai/page-actions.tsxapps/docs/src/components/docs/DownloadButton.tsx
apps/*/src/components/**/[A-Z]*.tsx
📄 CodeRabbit inference engine (AGENTS.md)
Create component folder structure with one folder per component: ComponentName/ComponentName.tsx with barrel export index.ts
Files:
apps/docs/src/components/docs/DownloadButton.tsx
🧠 Learnings (9)
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/*/src/components/**/[A-Z]*.tsx : Create component folder structure with one folder per component: ComponentName/ComponentName.tsx with barrel export index.ts
Applied to files:
apps/docs/src/app/docs/layout.tsxapps/docs/src/mdx-components.tsx
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/*/src/components/**/*.{ts,tsx} : Co-locate component dependencies: utils, hooks, constants, config, tests, stories in the same folder as the component using them
Applied to files:
apps/docs/src/mdx-components.tsxapps/docs/src/lib/source.tsapps/docs/.gitignore
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/**/proxy.ts : Never use `middleware.ts` in Next.js 16. Use `proxy.ts` instead for request interception.
Applied to files:
apps/docs/next.config.mjsapps/docs/src/app/llms.mdx/docs/[[...slug]]/route.ts
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/*/src/components/{ui,ai-elements,react-flow}/*.tsx : Use kebab-case single files for shadcn/ui components (e.g., button.tsx, base-node.tsx) in src/components/ui/, src/components/ai-elements, and src/components/react-flow/
Applied to files:
apps/docs/src/components/ai/page-actions.tsxapps/docs/src/app/layout.tsxapps/docs/src/components/docs/DownloadButton.tsx
📚 Learning: 2025-12-21T04:39:28.543Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/AGENTS.md:0-0
Timestamp: 2025-12-21T04:39:28.543Z
Learning: Applies to apps/desktop/**/*.{ts,tsx} : Use alias as defined in `tsconfig.json` when possible
Applied to files:
apps/docs/src/lib/cn.tsapps/docs/tsconfig.json
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to **/*.{ts,tsx} : Use named properties in options objects instead of boolean parameters to avoid boolean blindness
Applied to files:
apps/docs/tsconfig.json
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to **/*.{ts,tsx} : Extract magic numbers and hardcoded values to named constants at module top
Applied to files:
apps/docs/tsconfig.json
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/renderer/**/*.{ts,tsx} : Never import Node.js modules (fs, path, os, net) in renderer process or shared code - they are externalized for browser compatibility
Applied to files:
apps/docs/tsconfig.jsonapps/docs/src/lib/source.ts
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to **/*.test.{ts,tsx} : Co-locate tests with implementation files using .test.ts or .test.tsx suffix
Applied to files:
apps/docs/tsconfig.json
🧬 Code graph analysis (10)
apps/docs/src/app/llms-full.txt/route.ts (2)
apps/docs/src/app/llms.mdx/docs/[[...slug]]/route.ts (1)
GET(6-19)apps/docs/src/lib/source.ts (2)
source(6-10)getLLMText(21-27)
apps/docs/src/app/docs/layout.tsx (3)
apps/docs/src/app/layout.tsx (1)
Layout(9-17)apps/docs/src/lib/source.ts (1)
source(6-10)apps/docs/src/lib/layout.shared.tsx (1)
baseOptions(4-15)
apps/docs/src/components/ai/page-actions.tsx (2)
packages/ui/src/lib/utils.ts (1)
cn(4-6)packages/ui/src/components/ui/button.tsx (1)
buttonVariants(60-60)
apps/docs/src/app/layout.tsx (1)
apps/docs/src/app/docs/layout.tsx (1)
Layout(5-11)
apps/docs/src/app/llms.mdx/docs/[[...slug]]/route.ts (4)
apps/docs/src/app/llms-full.txt/route.ts (2)
revalidate(3-3)GET(5-10)apps/docs/src/app/og/docs/[...slug]/route.tsx (3)
revalidate(6-6)GET(8-27)generateStaticParams(29-34)apps/docs/src/lib/source.ts (2)
source(6-10)getLLMText(21-27)apps/docs/src/app/docs/[[...slug]]/page.tsx (1)
generateStaticParams(30-32)
apps/docs/src/lib/source.ts (1)
apps/docs/source.config.ts (1)
docs(10-21)
apps/docs/src/components/docs/DownloadButton.tsx (1)
packages/shared/src/constants.ts (1)
DOWNLOAD_URL_MAC_ARM64(30-30)
apps/docs/src/instrumentation-client.ts (7)
apps/docs/src/env.ts (1)
env(5-36)apps/admin/src/env.ts (1)
env(5-45)apps/api/src/env.ts (1)
env(4-48)apps/marketing/src/env.ts (1)
env(5-37)apps/web/src/env.ts (1)
env(5-47)apps/desktop/src/renderer/lib/posthog.ts (1)
posthog(6-6)packages/shared/src/constants.ts (1)
POSTHOG_COOKIE_NAME(43-43)
apps/docs/src/app/docs/[[...slug]]/page.tsx (4)
apps/docs/src/lib/source.ts (2)
source(6-10)getPageImage(12-19)apps/docs/src/mdx-components.tsx (1)
getMDXComponents(5-11)apps/docs/src/app/llms.mdx/docs/[[...slug]]/route.ts (1)
generateStaticParams(21-23)apps/docs/src/app/og/docs/[...slug]/route.tsx (1)
generateStaticParams(29-34)
apps/docs/src/app/api/search/route.ts (1)
apps/docs/src/lib/source.ts (1)
source(6-10)
🪛 markdownlint-cli2 (0.18.1)
apps/docs/README.md
16-16: Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Deploy Admin
- GitHub Check: Deploy Web
- GitHub Check: Deploy API
- GitHub Check: Deploy Marketing
- GitHub Check: Deploy Docs
- GitHub Check: Build
🔇 Additional comments (30)
apps/docs/.gitignore (1)
1-26: LGTM! Clean organization and appropriate ignore patterns.The restructured .gitignore is well-organized with clear sections and properly ignores all necessary artifacts:
- New
.sourceentry appropriately handles fumadocs generated content- Consolidated "# test & build" section groups related artifacts logically
- The
.env*.localpattern follows Next.js best practices (ignoring local overrides while allowing base config to be committed)- All standard Next.js build artifacts are properly covered
apps/docs/src/env.ts (1)
17-24: LGTM! Optional PostHog configuration for docs app.Making
NEXT_PUBLIC_POSTHOG_KEYandNEXT_PUBLIC_POSTHOG_HOSToptional is appropriate for a documentation site that may be deployed without analytics. This correctly aligns with the guarded initialization ininstrumentation-client.ts.Note: This intentionally diverges from other apps (
web,marketing,admin) where these fields are required. This allows the docs app to run standalone without PostHog configuration.apps/docs/src/instrumentation-client.ts (2)
7-26: LGTM! Proper guard for optional PostHog initialization.The conditional initialization correctly prevents PostHog from being called when the key is not configured, aligning with the optional schema in
env.ts. This ensures the docs app can run without analytics dependencies.
11-11: Thedefaults: "2025-11-30"is a valid PostHog configuration option. PostHog JS recognizes date strings in this format to enable specific breaking-change defaults—in this case, behaviors introduced on 2025-11-30 including session recording and rageclick defaults. No changes needed.apps/docs/src/app/global.css (1)
1-26: LGTM!The global CSS correctly imports Tailwind and FUMAdocs styles. The sidebar customizations are well-commented and use appropriate selectors for the fumadocs-ui structure.
apps/docs/src/mdx-components.tsx (1)
1-11: LGTM!Clean implementation of the MDX components mapper for FUMAdocs. The spread order correctly prioritizes: default components → custom components → user overrides. Type safety is maintained with the
MDXComponentstype.apps/docs/postcss.config.mjs (1)
1-5: LGTM!Correct PostCSS configuration for Tailwind CSS v4 using the
@tailwindcss/postcssplugin.apps/docs/src/lib/layout.shared.tsx (1)
1-15: LGTM!Clean, focused helper function that properly configures the navigation title with logo and branding. Good use of the fumadocs-ui types and Next.js Image component with explicit dimensions.
apps/docs/source.config.ts (1)
1-27: LGTM!Clean fumadocs-mdx configuration with proper schema setup and content directory configuration. The empty
mdxOptionsserves as a good placeholder for future MDX customizations.apps/docs/src/app/layout.tsx (2)
10-17: Layout structure looks good.The HTML structure with
suppressHydrationWarningis appropriate for theme providers that may cause hydration mismatches. The flex column layout provides a solid foundation for the docs pages.
1-9: No changes needed.LayoutPropsis a built-in Next.js route-aware type helper that is automatically generated during build/typegen and globally available without importing. The code is correct as written.Likely an incorrect or invalid review comment.
apps/docs/src/lib/source.ts (2)
5-10: LGTM!The source loader configuration follows fumadocs conventions correctly. The baseUrl, source adapter, and lucide icons plugin are properly wired.
12-19: LGTM!Clean helper that constructs both the segments array and the OG image URL. The spread operator preserves immutability of the original slugs.
apps/docs/README.md (1)
1-45: LGTM!The README is well-structured and provides clear guidance for the fumadocs setup, including the project structure, routes table, and external resources.
apps/docs/src/app/llms.mdx/docs/[[...slug]]/route.ts (3)
6-19: LGTM!Clean route handler implementation with proper:
- 404 handling via
notFound()- Content-Type header for markdown
- Async params handling for Next.js 15+
21-23: LGTM!Static params generation is correctly delegated to the source, enabling proper static site generation for all doc pages.
8-8: No action needed.RouteContextis a global type generated by Next.js during the build process (next typegen,next build, ornext dev) and does not require an import. The code correctly uses it as a global type, which is the intended pattern for Next.js 16+ route handlers with dynamic segments.apps/docs/src/app/og/docs/[...slug]/route.tsx (1)
29-34: Remove the unusedlangproperty fromgenerateStaticParamsoutput.The route pattern
/og/docs/[...slug]has no[lang]dynamic segment. The returnedlangproperty will be ignored by Next.js during static generation and indicates a copy-paste error from a different route. Change the return value to{ slug: getPageImage(page).segments }only.apps/docs/package.json (1)
1-38: Migration changes look appropriate.The dependency swap from Nextra/three.js stack to FUMAdocs ecosystem is clean. Build scripts are properly updated for the fumadocs-mdx workflow, and the
postinstallhook ensures MDX generation happens after installation.apps/docs/content/docs/guides.mdx (1)
1-10: LGTM!Placeholder page for future guides is appropriately structured with valid front matter.
apps/docs/src/app/docs/layout.tsx (1)
6-10: Layout structure follows fumadocs conventions.The DocsLayout wrapper with page tree and base options spread is the correct pattern for fumadocs documentation layouts.
apps/docs/content/docs/installation.mdx (1)
1-29: LGTM!Well-structured installation documentation with clear sections for different platforms and build options. The DownloadButton component usage is consistent with other docs pages.
apps/docs/content/docs/quick-start.mdx (1)
19-22: Missing closing</Cards>tag.The
<Cards>component is opened on line 19 but there's no closing tag at the end of the file. This will cause a JSX parsing error.🐛 Proposed fix
<Cards> <Card title="Overview" href="/docs/overview" /> <Card title="Installation" href="/docs/installation" /> +</Cards>Likely an incorrect or invalid review comment.
apps/docs/content/docs/meta.json (1)
1-13: LGTM!The navigation structure is well-organized with clear section separators and properly references the MDX pages added in this PR.
apps/docs/content/docs/overview.mdx (1)
1-59: LGTM!Well-structured overview page with clear sections covering features, architecture, and tech stack. The front matter is properly formatted for FUMAdocs.
apps/docs/src/app/api/search/route.ts (1)
1-7: LGTM!Clean implementation following fumadocs patterns. The language configuration is properly documented with reference to Orama's supported languages.
apps/docs/src/app/docs/[[...slug]]/page.tsx (3)
19-27: LGTM!The DocsPage rendering with MDX body, title, description, and table of contents follows fumadocs patterns correctly.
30-48: LGTM!Static params generation and metadata configuration are well-implemented. The OpenGraph image integration using
getPageImagealigns with the source utility pattern used elsewhere in the codebase.
12-12: No action needed —PagePropsis a Next.js global type helper.
PagePropsis automatically generated by Next.js (v16+) during build/dev/typegen and is globally available without import. No import is required or should be added.Likely an incorrect or invalid review comment.
apps/docs/src/components/ai/page-actions.tsx (1)
226-240: LGTM for external link handling.Good security practices applied:
rel="noreferrer noopener"andtarget="_blank"are correctly set for all external links.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| // Fumadocs MDX rewrites | ||
| { | ||
| source: "/docs/:path*.mdx", | ||
| destination: "/llms.mdx/docs/:path*", | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
fumadocs llms.txt LLM text configuration nextjs rewrite
💡 Result:
Yes — Fumadocs already includes patterns for producing an LLM-friendly llms.txt (and per-page .mdx endpoints) and shows how to wire Next.js rewrites to expose them.
Quick steps (minimal):
-
Create a getLLMText helper that returns page content (uses page.data.getText('processed')). See Fumadocs example. [1]
-
Expose a site-wide llms file route (cached, returns joined pages) — e.g. app/llms-full.txt/route.ts that collects source.getPages().map(getLLMText) and returns a Response. This produces /llms-full.txt for AI crawlers. [1]
-
Expose per-page Markdown via a dynamic route (app/llms.mdx/[[...slug]]/route.ts) that returns getLLMText(page) with Content-Type: text/markdown and generateStaticParams. [1]
-
Add Next.js rewrites so clean URLs map to those handlers. Example next.config.ts rewrites:
- map /docs/:path*.mdx -> /llms.mdx/:path* (so requests for /docs/whatever.mdx hit your mdx route)
- if you serve llms.txt from an API route, add rewrite /llms.txt -> /api/llms.txt; alternatively write static public/llms.txt. [1][2][3]
Example rewrite snippet:
async rewrites() {
return [
{ source: '/docs/:path*.mdx', destination: '/llms.mdx/:path*' },
{ source: '/llms.txt', destination: '/api/llms.txt' }, // or public/llms.txt
];
}
(place in next.config.ts). [1][3]
- (Optional) Use Accept header negotiation / a proxy to serve Markdown to AI agents (fumadocs-core/negotiation helper + proxy middleware). [1]
References:
- Fumadocs AI & LLM docs (getLLMText, llms-full.txt, llms.mdx, rewrites, Accept negotiation). [1]
- Guidance on exposing llms.txt in Next.js (API route vs public file + rewrite example). [3]
If you want, I can: generate the exact route files + getLLMText code for your Fumadocs project (Next.js App Router) or produce a ready-to-drop next.config.ts — which would you prefer?
Fix the MDX rewrite destination path to match fumadocs' recommended pattern.
The destination /llms.mdx/docs/:path* includes an extra /docs/ segment. According to fumadocs documentation, this rewrite should map to /llms.mdx/:path* instead, so the route handler at app/llms.mdx/[[...slug]]/route.ts can properly serve the LLM text content.
{
source: "/docs/:path*.mdx",
destination: "/llms.mdx/:path*",
},
🤖 Prompt for AI Agents
In `@apps/docs/next.config.mjs` around lines 25 - 29, Update the MDX rewrite
object so its destination removes the extra "/docs/" segment: leave source as
"/docs/:path*.mdx" and change destination from "/llms.mdx/docs/:path*" to
"/llms.mdx/:path*" so the route handler that serves LLM MDX content can match
correctly.
| { | ||
| source: "/ingest/static/:path*", | ||
| destination: "https://us-assets.i.posthog.com/static/:path*", | ||
| }, | ||
| { | ||
| source: "/ingest/:path*", | ||
| destination: "https://us.i.posthog.com/:path*", | ||
| }, | ||
| { | ||
| source: "/ingest/decide", | ||
| destination: "https://us.i.posthog.com/decide", | ||
| }, | ||
| ]; |
There was a problem hiding this comment.
Rewrite ordering may cause /ingest/decide to be unreachable.
The /ingest/:path* rewrite on line 36 will match /ingest/decide before the more specific rule on line 40 is evaluated. Next.js rewrites are processed in order, and the first match wins.
Consider reordering to place more specific routes first:
♻️ Suggested reorder
// PostHog rewrites
{
source: "/ingest/static/:path*",
destination: "https://us-assets.i.posthog.com/static/:path*",
},
+ {
+ source: "/ingest/decide",
+ destination: "https://us.i.posthog.com/decide",
+ },
{
source: "/ingest/:path*",
destination: "https://us.i.posthog.com/:path*",
},
- {
- source: "/ingest/decide",
- destination: "https://us.i.posthog.com/decide",
- },🤖 Prompt for AI Agents
In `@apps/docs/next.config.mjs` around lines 31 - 43, The rewrite ordering causes
the wildcard rule "/ingest/:path*" to shadow the specific "/ingest/decide" rule;
fix by reordering the array of rewrite objects so the specific route object with
source "/ingest/decide" and destination "https://us.i.posthog.com/decide"
appears before the wildcard object with source "/ingest/:path*" (leave the
"/ingest/static/:path*" mapping as appropriate).
| import { DocsLayout } from "fumadocs-ui/layouts/docs"; | ||
| import { baseOptions } from "@/lib/layout.shared"; | ||
| import { source } from "@/lib/source"; | ||
|
|
||
| export default function Layout({ children }: LayoutProps<"/docs">) { |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if the file exists and view its contents
if [ -f "apps/docs/src/app/docs/layout.tsx" ]; then
echo "=== File exists, showing content ==="
cat -n "apps/docs/src/app/docs/layout.tsx"
else
echo "File not found"
fiRepository: superset-sh/superset
Length of output: 500
🏁 Script executed:
#!/bin/bash
# Search for LayoutProps in the codebase
echo "=== Searching for LayoutProps definitions ==="
rg -n "LayoutProps" --type ts --type tsxRepository: superset-sh/superset
Length of output: 154
🏁 Script executed:
#!/bin/bash
# Check for fumadocs-ui package.json or exports
echo "=== Checking fumadocs-ui in node_modules or package info ==="
find . -path "*/node_modules/fumadocs-ui*" -name "package.json" -o -path "*/node_modules/fumadocs-ui*" -name "*.d.ts" | head -20Repository: superset-sh/superset
Length of output: 124
🏁 Script executed:
#!/bin/bash
# Search for LayoutProps without file type restrictions
echo "=== Searching for LayoutProps ==="
rg "LayoutProps" | head -20Repository: superset-sh/superset
Length of output: 946
🏁 Script executed:
#!/bin/bash
# Check other layout files for comparison
echo "=== Finding layout files ==="
find apps/docs -name "layout.tsx" -o -name "layout.ts"Repository: superset-sh/superset
Length of output: 155
🏁 Script executed:
#!/bin/bash
# Check one of the root/parent layout files to see how they handle LayoutProps
if [ -f "apps/docs/src/app/layout.tsx" ]; then
echo "=== Root layout.tsx content ==="
cat -n "apps/docs/src/app/layout.tsx"
fiRepository: superset-sh/superset
Length of output: 653
🏁 Script executed:
#!/bin/bash
# Check package.json for fumadocs-ui dependency
echo "=== Checking package.json for fumadocs-ui ==="
rg "fumadocs-ui" package.json --type jsonRepository: superset-sh/superset
Length of output: 109
🏁 Script executed:
#!/bin/bash
# Check layout.shared.tsx
echo "=== layout.shared.tsx content ==="
cat -n "apps/docs/src/lib/layout.shared.tsx"Repository: superset-sh/superset
Length of output: 578
🏁 Script executed:
#!/bin/bash
# Check tsconfig in apps/docs
echo "=== tsconfig.json in apps/docs ==="
if [ -f "apps/docs/tsconfig.json" ]; then
cat "apps/docs/tsconfig.json"
fiRepository: superset-sh/superset
Length of output: 800
🏁 Script executed:
#!/bin/bash
# Check for global type definitions
echo "=== Looking for .d.ts files in apps/docs ==="
find apps/docs -name "*.d.ts"Repository: superset-sh/superset
Length of output: 108
🏁 Script executed:
#!/bin/bash
# Check if there's a global.d.ts or types folder
echo "=== Checking types/global files ==="
find apps/docs -type f \( -name "global.d.ts" -o -path "*/types/*" \)Repository: superset-sh/superset
Length of output: 99
🏁 Script executed:
#!/bin/bash
# Check the fumadocs-ui imports used elsewhere and search for LayoutProps in node_modules if available
echo "=== Search for all fumadocs-ui imports ==="
rg "from ['\"]fumadocs-ui" apps/docs | head -20Repository: superset-sh/superset
Length of output: 972
🏁 Script executed:
#!/bin/bash
# Try to understand what fumadocs-ui exports by checking if there's documentation or example usage
echo "=== Check if there are any example or test files using fumadocs ==="
find apps/docs -type f \( -name "*.tsx" -o -name "*.ts" \) -exec grep -l "fumadocs-ui" {} \;Repository: superset-sh/superset
Length of output: 398
🏁 Script executed:
#!/bin/bash
# Check if maybe LayoutProps is defined in next.js app router types
echo "=== Checking for React or Next.js layout type patterns ==="
rg "type.*LayoutProps|interface.*LayoutProps" --type ts --type tsxRepository: superset-sh/superset
Length of output: 167
🏁 Script executed:
#!/bin/bash
# Search for LayoutProps without file type filters
echo "=== Direct search for LayoutProps definition ==="
rg "LayoutProps" -iRepository: superset-sh/superset
Length of output: 961
🏁 Script executed:
#!/bin/bash
# Check if the build actually works - look for build outputs or CI config
echo "=== Checking for build scripts or CI config ==="
cat package.json 2>/dev/null | jq '.scripts' | head -20Repository: superset-sh/superset
Length of output: 973
🏁 Script executed:
#!/bin/bash
# Check apps/docs package.json specifically
if [ -f "apps/docs/package.json" ]; then
echo "=== apps/docs/package.json ==="
cat "apps/docs/package.json"
fiRepository: superset-sh/superset
Length of output: 1076
Missing LayoutProps type import will cause TypeScript compilation error.
The LayoutProps type is used on line 5 but is not imported. With TypeScript strict mode enabled in tsconfig.json, this will prevent the project from building.
Proposed fix
import { DocsLayout } from "fumadocs-ui/layouts/docs";
+import type { LayoutProps } from "fumadocs-ui/layouts/shared";
import { baseOptions } from "@/lib/layout.shared";
import { source } from "@/lib/source";Alternatively, if LayoutProps is not available from fumadocs-ui:
import { DocsLayout } from "fumadocs-ui/layouts/docs";
+import type { ReactNode } from "react";
import { baseOptions } from "@/lib/layout.shared";
import { source } from "@/lib/source";
-export default function Layout({ children }: LayoutProps<"/docs">) {
+export default function Layout({ children }: { children: ReactNode }) {Note: The same issue exists in apps/docs/src/app/layout.tsx.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import { DocsLayout } from "fumadocs-ui/layouts/docs"; | |
| import { baseOptions } from "@/lib/layout.shared"; | |
| import { source } from "@/lib/source"; | |
| export default function Layout({ children }: LayoutProps<"/docs">) { | |
| import type { LayoutProps } from "fumadocs-ui/layouts/shared"; | |
| import { DocsLayout } from "fumadocs-ui/layouts/docs"; | |
| import { baseOptions } from "@/lib/layout.shared"; | |
| import { source } from "@/lib/source"; | |
| export default function Layout({ children }: LayoutProps<"/docs">) { |
🤖 Prompt for AI Agents
In `@apps/docs/src/app/docs/layout.tsx` around lines 1 - 5, The file uses the
LayoutProps generic in the Layout signature but doesn't import it, causing a TS
build error; add an import for the type (e.g. add "import type { LayoutProps }
from 'next';") at the top of apps/docs/src/app/docs/layout.tsx and do the same
in apps/docs/src/app/layout.tsx, or if your project exposes LayoutProps from
fumadocs-ui, import it from "fumadocs-ui" instead (ensure you use "import type"
to avoid runtime imports).
| try { | ||
| await navigator.clipboard.write([ | ||
| new ClipboardItem({ | ||
| "text/plain": fetch(markdownUrl).then(async (res) => { | ||
| const content = await res.text(); | ||
| cache.set(markdownUrl, content); | ||
|
|
||
| return content; | ||
| }), | ||
| }), | ||
| ]); | ||
| } finally { | ||
| setLoading(false); | ||
| } |
There was a problem hiding this comment.
Missing error handling for fetch failures.
The fetch operation lacks proper error handling:
- No check for
res.ok- error responses (404, 500) will be cached and copied as content - Errors are silently swallowed in the
finallyblock without logging, violating the guideline to "never swallow errors silently"
🔧 Suggested fix with error handling
try {
- await navigator.clipboard.write([
- new ClipboardItem({
- "text/plain": fetch(markdownUrl).then(async (res) => {
- const content = await res.text();
- cache.set(markdownUrl, content);
-
- return content;
- }),
- }),
- ]);
+ const res = await fetch(markdownUrl);
+ if (!res.ok) {
+ console.error("[LLMCopyButton] Failed to fetch markdown:", res.status, res.statusText);
+ return;
+ }
+ const content = await res.text();
+ cache.set(markdownUrl, content);
+ await navigator.clipboard.writeText(content);
+ } catch (error) {
+ console.error("[LLMCopyButton] Clipboard write failed:", error);
} finally {
setLoading(false);
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| try { | |
| await navigator.clipboard.write([ | |
| new ClipboardItem({ | |
| "text/plain": fetch(markdownUrl).then(async (res) => { | |
| const content = await res.text(); | |
| cache.set(markdownUrl, content); | |
| return content; | |
| }), | |
| }), | |
| ]); | |
| } finally { | |
| setLoading(false); | |
| } | |
| try { | |
| const res = await fetch(markdownUrl); | |
| if (!res.ok) { | |
| console.error("[LLMCopyButton] Failed to fetch markdown:", res.status, res.statusText); | |
| return; | |
| } | |
| const content = await res.text(); | |
| cache.set(markdownUrl, content); | |
| await navigator.clipboard.writeText(content); | |
| } catch (error) { | |
| console.error("[LLMCopyButton] Clipboard write failed:", error); | |
| } finally { | |
| setLoading(false); | |
| } |
| const items = useMemo(() => { | ||
| const fullMarkdownUrl = | ||
| typeof window !== "undefined" | ||
| ? new URL(markdownUrl, window.location.origin) | ||
| : "loading"; | ||
| const q = `Read ${fullMarkdownUrl}, I want to ask questions about it.`; |
There was a problem hiding this comment.
SSR fallback produces an invalid URL.
When window is undefined during SSR/hydration, fullMarkdownUrl becomes the literal string "loading", resulting in a malformed query: "Read loading, I want to ask questions about it.".
While this is a client component and the popover content likely only renders client-side, consider using a more defensive approach or deferring URL construction until the component mounts.
🔧 Suggested fix
const items = useMemo(() => {
- const fullMarkdownUrl =
- typeof window !== "undefined"
- ? new URL(markdownUrl, window.location.origin)
- : "loading";
+ if (typeof window === "undefined") return [];
+ const fullMarkdownUrl = new URL(markdownUrl, window.location.origin);
const q = `Read ${fullMarkdownUrl}, I want to ask questions about it.`;Then handle the empty array case in the render, or use a useEffect to set items after mount.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const items = useMemo(() => { | |
| const fullMarkdownUrl = | |
| typeof window !== "undefined" | |
| ? new URL(markdownUrl, window.location.origin) | |
| : "loading"; | |
| const q = `Read ${fullMarkdownUrl}, I want to ask questions about it.`; | |
| const items = useMemo(() => { | |
| if (typeof window === "undefined") return []; | |
| const fullMarkdownUrl = new URL(markdownUrl, window.location.origin); | |
| const q = `Read ${fullMarkdownUrl}, I want to ask questions about it.`; |
🤖 Prompt for AI Agents
In `@apps/docs/src/components/ai/page-actions.tsx` around lines 85 - 90, The SSR
fallback sets fullMarkdownUrl to the literal "loading" inside the useMemo
(items) which produces a malformed query; change the logic so URL construction
is deferred to client mount: detect SSR by checking typeof window and if
undefined return an empty items array (or null) from the useMemo, or convert the
memo to a client-only pattern using useState + useEffect to build
fullMarkdownUrl from markdownUrl after mount; update references to
items/fullMarkdownUrl so render paths handle the empty array/null case until the
real URL is available.
| { | ||
| "$schema": "node_modules/@fumadocs/cli/dist/schema/default.json", | ||
| "aliases": { | ||
| "uiDir": "./components/ui", | ||
| "componentsDir": "./components", | ||
| "blockDir": "./components", | ||
| "cssDir": "./styles", | ||
| "libDir": "./lib" | ||
| }, | ||
| "baseDir": "", | ||
| "uiLibrary": "radix-ui", | ||
| "commands": {} | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify directory paths and fumadocs CLI installation
echo "=== Checking directory existence ==="
for dir in "./components/ui" "./components" "./styles" "./lib"; do
if [ -d "$dir" ]; then
echo "✓ Directory exists: $dir"
else
echo "✗ Directory missing: $dir"
fi
done
echo ""
echo "=== Checking package.json for fumadocs CLI ==="
if [ -f "package.json" ]; then
jq -r '.dependencies["@fumadocs/cli"] // .devDependencies["@fumadocs/cli"] // "not found"' package.json
else
echo "package.json not found"
fi
echo ""
echo "=== Checking schema file existence ==="
if [ -f "node_modules/@fumadocs/cli/dist/schema/default.json" ]; then
echo "✓ Schema file exists"
head -20 node_modules/@fumadocs/cli/dist/schema/default.json
else
echo "✗ Schema file not found"
fi
echo ""
echo "=== Verifying cli.json syntax ==="
if [ -f "cli.json" ]; then
if jq empty cli.json 2>/dev/null; then
echo "✓ cli.json has valid JSON syntax"
else
echo "✗ cli.json has invalid JSON syntax"
fi
else
echo "cli.json not found"
fiRepository: superset-sh/superset
Length of output: 418
🏁 Script executed:
# Check package.json structure and dependencies
if [ -f "package.json" ]; then
echo "=== Checking for fumadocs-related packages ==="
jq '.dependencies, .devDependencies' package.json | grep -i fumadocs || echo "No fumadocs packages found"
echo ""
echo "=== Checking for documentation build tools ==="
jq '.dependencies, .devDependencies' package.json | grep -iE "(docs|doc|build|cli)" | head -20
fi
echo ""
echo "=== Checking for other config files ==="
ls -la | grep -E '\.(json|yaml|yml|toml|config)$' | awk '{print $NF}'
echo ""
echo "=== Checking README or documentation ==="
if [ -f "README.md" ]; then
echo "README.md exists"
grep -i "fumadocs\|cli.json\|documentation\|docs" README.md | head -5 || echo "No fumadocs/cli.json references in README"
fiRepository: superset-sh/superset
Length of output: 442
🏁 Script executed:
# Check git status and history of cli.json
if git rev-parse --git-dir > /dev/null 2>&1; then
echo "=== Git status of cli.json ==="
git status cli.json 2>/dev/null || echo "Not in git or file is new"
echo ""
echo "=== Recent changes to cli.json ==="
git log --oneline -5 -- cli.json 2>/dev/null || echo "No git history"
fi
echo ""
echo "=== Check project structure ==="
find . -maxdepth 2 -type d -name "components" -o -name "styles" -o -name "lib" 2>/dev/null | head -10Repository: superset-sh/superset
Length of output: 260
Remove cli.json or complete the fumadocs setup; configuration is broken.
The configuration file references @fumadocs/cli which is not installed (missing from package.json dependencies), and all aliased directories (./components/ui, ./components, ./styles, ./lib) don't exist in the project. The schema file cannot be resolved, making this configuration unusable. Either remove the file if fumadocs is not part of the project, or install the dependency and create the required directory structure.
🤖 Prompt for AI Agents
In `@cli.json` around lines 1 - 13, The cli.json references a missing dependency
and non-existent aliased dirs; either remove cli.json if fumadocs/ `@fumadocs/cli`
is not used, or install the package and create the required directories: add
`@fumadocs/cli` to dependencies (or devDependencies) in package.json and run
npm/yarn install, then create the aliased folders referenced by the "aliases"
keys ("uiDir", "componentsDir", "blockDir", "cssDir", "libDir") with the
expected content (e.g., ./components/ui, ./components, ./styles, ./lib), and
ensure the "$schema" path resolves or update it to the installed package schema
path; pick one approach and apply it consistently so cli.json is valid.
Description
Related Issues
Type of Change
Testing
Screenshots (if applicable)
Additional Notes
Summary by CodeRabbit
Release Notes
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.