Migrate docs from Mintlify to fumadocs#457
Conversation
- content unchanged: 140 mdx pages keep their paths and URLs; Mintlify components (Info, CodeGroup, Steps, Card, ...) aliased to fumadocs equivalents in components/mdx.tsx - docs.json stays the navigation source of truth; lib/tree.ts converts it to the fumadocs page tree at build time - API Reference generated from the same Stainless OpenAPI spec via fumadocs-openapi (virtual pages, playground off by default) - llms.txt, llms-full.txt, per-page raw markdown (.md suffix on any page URL), and AI page actions built in - Ask AI assistant wired to Anthropic via AI SDK (needs ANTHROPIC_API_KEY at deploy time) - redirects, GA4, Inter font, and brand colors ported from docs.json Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Stale comment
Risk assessment: Medium
This changes the production delivery stack for the entire documentation site rather than only moving content: 195 files are affected, with new Next.js routing, OpenAPI rendering, search, raw-markdown endpoints, and deployment/build configuration. That gives the migration a broad user-facing blast radius.
The new
POST /api/chatroute also invokes a billable Anthropic model from client-supplied message history without authentication, rate limiting, or request-size/history validation. Although its tool access is limited to public docs, this creates material cost-abuse, prompt-integrity, and operational-load risk. The existing broken-link workflow still runs the Mintlify checker and is currently failing against the migrated tree, so migration validation isn't green.I did not approve this PR because these cross-file runtime and operational changes meet the Medium-risk threshold.
Sent by Cursor Automation: Assign PR reviewers
The Vercel project was imported while the default branch was still Mintlify-only (no package.json), so framework auto-detection picked "Other" and served public/ statically. Pinning it here overrides the project setting on every deploy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Stale comment
Risk assessment: Medium
This PR replaces the production delivery stack for the entire documentation site: 196 files are affected, with new Next.js routing, navigation generation, OpenAPI rendering, search, raw-markdown/OG endpoints, and build/deployment configuration. Although most documentation files are mechanical moves, the runtime and infrastructure changes have a broad user-facing blast radius.
The public
POST /api/chatroute also sends client-provided message histories to a billable Anthropic model without authentication, rate limiting, or request-size/history validation, which creates material cost-abuse and operational-load risk. The latest update addsvercel.jsonto select the Next.js framework; it doesn't reduce those existing risks and further confirms that this PR changes deployment behavior.I didn't approve because the cross-file production migration and unauthenticated model-backed endpoint meet the Medium-risk threshold.
Sent by Cursor Automation: Assign PR reviewers
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Stale comment
Risk assessment: Medium
This PR still replaces the production delivery stack for the entire documentation site: 196 files are affected, including new Next.js page/API routes, navigation generation, OpenAPI rendering, search, markdown/OG endpoints, and Vercel/build configuration. Most content changes are mechanical moves, but the runtime and deployment changes have a broad user-facing blast radius.
The new public
POST /api/chatroute also accepts client-provided message histories and invokes a billable Anthropic model without authentication, rate limiting, or request-size/history validation. The latest update changes only the default model from Sonnet to Haiku; that may reduce per-request cost but doesn't remove the cost-abuse, prompt-integrity, or operational-load exposure.I didn't approve because the cross-file production migration and unauthenticated model-backed endpoint remain Medium risk.
Sent by Cursor Automation: Assign PR reviewers
- port Kernel brand CSS from style.css (global lowercase, zero border radius, sidebar eyebrow headings, table styling, tinker-box, pricing button vars) - Card forwards img prop, CardGroup/Columns forward className - pages with url: frontmatter redirect externally instead of rendering an empty body - guard the .md/.mdx rewrites against /llms.mdx/* paths (they were double-rewriting direct raw-markdown URLs to 404s) and special-case /index.md for the home page - /api/chat requires a same-origin Origin header and caps output tokens - search index tolerates single-page failures instead of failing whole - set metadataBase so OG image URLs are absolute - ignore .env, simplify proxy.ts to Accept-header negotiation only Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Top navbar with horizontal tab bar (guides / api reference / cli / mcp) like the Mintlify site, and the Kernel logo SVGs from docs.json instead of a text title. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
Stale comment
Risk assessment: Medium
This PR replaces the production delivery stack for the entire documentation site: 196 files change, including new Next.js page and API routes, sitewide rendering/layout code, navigation generation, OpenAPI rendering, search, raw-markdown/OG endpoints, and Vercel/build configuration. Most MDX changes are mechanical moves, but the runtime and deployment cutover affects every docs page and has a broad user-facing blast radius.
The updated
POST /api/chatnow checksOriginand caps output at 2,048 tokens, which reduces cross-site browser abuse and per-request cost. It remains an unauthenticated, billable Anthropic proxy with no rate limiting or input/history size validation; direct clients can forge the matchingOriginheader and send high-volume or token-heavy requests. The latest layout and branding changes don't reduce the migration's sitewide deployment risk.I didn't approve because the full-stack docs migration and remaining cost/operational exposure meet the Medium-risk threshold.
Sent by Cursor Automation: Assign PR reviewers
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Stale comment
Risk assessment: Medium
This PR replaces the production delivery stack for the entire documentation site: 196 files change, including new Next.js page and API routes, sitewide rendering/layout code, navigation generation, OpenAPI rendering, search, raw-markdown/OG endpoints, and Vercel/build configuration. Most MDX changes are mechanical moves, but the runtime and deployment cutover affects every docs page and has a broad user-facing blast radius.
The public
POST /api/chatroute remains an unauthenticated proxy to a billable Anthropic model. Its origin check and output cap reduce browser-based abuse and per-request cost, but there is still no rate limiting or input/history size validation, and non-browser clients can supply a matchingOriginheader. The latest commit adds only sidebar hover/active styling, so it doesn't reduce the migration or endpoint risks.I didn't approve because the sitewide production migration and remaining cost/operational exposure meet the Medium-risk threshold.
Sent by Cursor Automation: Assign PR reviewers
- size cap: read the raw body and check its length before JSON.parse instead of trusting Content-Length (absent on chunked requests), so an oversized body is rejected without being parsed and the cap can't be skipped by omitting the header - Ask AI index: skip external-link stub pages (frontmatter `url`, no real body) so search no longer returns empty internal URLs Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Carries main's latest content onto the migrated content/docs paths: - pricing feature matrix 'Browser telemetry' row (#460) - new audit-logs pages, info/ + reference/cli/ (#416), relocated into content/docs via directory-rename detection; docs.json nav merged Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Stale comment
Risk assessment: Medium
The actual diff changes 203 files and replaces the production delivery stack for the entire documentation site with a Next.js/Fumadocs application. It adds sitewide routing and rendering, generated OpenAPI pages, search, markdown/OG endpoints, a new dependency/build stack, and Vercel configuration. Most MDX changes are mechanical moves, but the runtime and deployment cutover affects every docs page and has a broad user-facing blast radius.
The PR also adds a public Anthropic-backed chat endpoint with a new system prompt, a server-side API key, BotID, dashboard-managed firewall controls, a 400,000-character request allowance, and Braintrust telemetry that logs user message content and client IP while instrumenting model output and usage. The latest update improves raw-body size enforcement and adds audit-log documentation, but it doesn't reduce the migration, privacy, cost, or operational surface.
I didn't approve because the sitewide runtime/infrastructure migration and the external model and telemetry integrations meet the Medium-risk threshold.
Sent by Cursor Automation: Assign PR reviewers
Carries main's CLI-reference sync (#463) and managed-auth tab-ownership docs (#462) onto the migrated content/docs paths. New reference/cli/org page relocated via directory-rename detection; the other CLI/auth edits auto-merged, docs.json nav merged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Stale comment
Risk assessment: Medium
This PR replaces the production delivery stack for the entire documentation site: 204 files change (+4063/−449), with new Next.js/Fumadocs routing and layouts, OpenAPI rendering, search, LLM markdown/OG endpoints, build tooling, and Vercel deploy config. Most MDX moves are mechanical, but the runtime and hosting cutover affects every docs URL and has a broad user-facing blast radius.
POST /api/chatis a public, billable Anthropic proxy. Relative to earlier revisions it is better guarded (same-origin check, BotID deep analysis, Vercel FirewallcheckRateLimit("chat"), ~400k-char body cap, 2,048-token output cap), but it remains unauthenticated and depends on dashboard-configured firewall rules outside this diff. Residual cost and operational abuse risk remains.The latest merge-from-main and chat/index hardening do not reduce the overall migration risk below Medium: this is still a cross-file production-platform rewrite with new API surface and deploy behavior.
I did not approve because these infrastructure, sitewide UX, and model-backed endpoint changes meet the Medium-risk threshold.
Sent by Cursor Automation: Assign PR reviewers
Brings the fumadocs site to parity with (and past) the Mintlify output: - app/sitemap.ts — sitemap.xml covering all content + API-reference pages on the canonical domain (skips external-link stubs) - app/robots.ts — robots.txt allowing indexing + pointing at the sitemap in production; disallows preview/branch deploys so they don't get indexed - per-page canonical link + og:url on content and API pages - root og:type=website, og:site_name=Kernel, twitter summary_large_image, and a site-wide fallback OG image (content pages still override) - pin metadataBase to the canonical domain so canonical/OG image URLs resolve to docs.kernel.sh rather than a per-deploy *.vercel.app host Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Stale comment
Risk assessment: Medium
This remains a sitewide production-platform migration, not a documentation-only change. The actual diff touches 206 files (+4,122 / −449) and replaces Mintlify delivery with a self-hosted Next.js/Fumadocs app: new App Router pages/layouts,
next.config.mjsrewrites/redirects,proxy.ts,package.json/bun.lock,vercel.json, search, OpenAPI rendering, and agent/markdown/OG endpoints. Most MDX moves are mechanical, but the runtime and deployment cutover still affect every docs page.The public
POST /api/chatpath still invokes a billable Anthropic model from client-supplied message history. Origin matching, BotID, Vercel Firewall rate limiting, and a large input-size cap reduce some abuse paths, but the endpoint stays unauthenticated and Origin checks are forgeable by non-browser clients. Braintrust instrumentation also logs chat input metadata (including client IP) when configured, adding an operational/privacy surface. The latest SEO commit (sitemap,robots, canonical/OG metadata) does not shrink that blast radius.I did not approve because the full-site infrastructure rewrite plus the public model-backed chat route meet the Medium-risk threshold.
Sent by Cursor Automation: Assign PR reviewers
Next shallow-merges metadata, so a page that sets openGraph drops the root's og:type/og:site_name/image. Spread shared siteOpenGraph into each page's openGraph so every page keeps og:type=website + og:site_name, and give API pages the site-default OG image. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Stale comment
Risk assessment: Medium
This remains a sitewide production-platform migration, not a documentation-only change. The actual diff touches 206 files (+4,139 / −449) and replaces Mintlify delivery with a self-hosted Next.js/Fumadocs app: App Router pages/layouts,
next.config.mjsrewrites/redirects,proxy.ts,package.json/bun.lock,vercel.json, search, OpenAPI rendering, and agent/markdown/OG endpoints. Most MDX moves are mechanical, but the runtime and deployment cutover still affect every docs page.The public
POST /api/chatpath still invokes a billable Anthropic model from client-supplied message history. Origin matching, BotID, Vercel Firewall rate limiting, and a large input-size cap reduce some abuse paths, but the endpoint stays unauthenticated and Origin checks are forgeable by non-browser clients. Braintrust instrumentation also logs chat input metadata (including client IP) when configured, adding an operational/privacy surface.The latest updates add production SEO surface (
sitemap,robots, canonical/OG metadata) and spread shared Open Graph fields into per-page metadata. That does not shrink the migration blast radius and expands indexing/social-preview behavior for the cutover.I did not approve because these infrastructure, sitewide UX, model-backed API, and SEO cutover changes meet the Medium-risk threshold.
Sent by Cursor Automation: Assign PR reviewers
The /og route only resolved content pages, so every API endpoint fell back to the generic site image. Route api-reference image slugs to apiSource and pre-generate them, so each endpoint gets its own titled OG card (matching content pages and the previous Mintlify behavior). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Stale comment
Risk assessment: Medium
This remains a sitewide production-platform migration, not a documentation-only change. The actual diff touches 206 files (+4,161 / −449) and replaces Mintlify delivery with a self-hosted Next.js/Fumadocs app: App Router pages/layouts,
next.config.mjsrewrites/redirects,proxy.ts,package.json/bun.lock,vercel.json, search, OpenAPI rendering, and agent/markdown/OG endpoints. Most MDX moves are mechanical, but the runtime and deployment cutover still affect every docs page.The public
POST /api/chatpath still invokes a billable Anthropic model from client-supplied message history, with a new system prompt and server-side API key. Origin matching, BotID, Vercel Firewall rate limiting, and a large input-size cap reduce some abuse paths, but the endpoint stays unauthenticated and Origin checks are forgeable by non-browser clients. Braintrust instrumentation also logs chat input metadata (including client IP) when configured, adding an operational/privacy surface.The latest update only wires per-page OG image generation for API-reference routes (
app/og,getApiPageImage). That is a narrow SEO/preview correctness fix and does not shrink the migration blast radius.I did not approve because these infrastructure, sitewide UX, model-backed API, and SEO cutover changes meet the Medium-risk threshold.
Sent by Cursor Automation: Assign PR reviewers
…points - /api/chat: wrap JSON.parse in try/catch so a malformed body returns 400 instead of an uncaught 500 - llms-full.txt + llms.mdx: external-link stub pages (frontmatter url) have no markdown body — exclude them from the corpus and redirect the per-page .md endpoint to the real resource (308), matching how the HTML app, sitemap, and Ask AI index already treat them Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Risk assessment: Medium
This remains a sitewide production-platform migration, not a documentation-only change. The actual diff touches 206 files (+4,178 / −449) and replaces Mintlify delivery with a self-hosted Next.js/Fumadocs app: App Router pages/layouts, next.config.mjs rewrites/redirects, proxy.ts, package.json/bun.lock, vercel.json, search, OpenAPI rendering, SEO (sitemap/robots/canonical/OG), and agent/markdown endpoints. Most MDX moves are mechanical, but the runtime and deployment cutover still affect every docs page.
The public POST /api/chat path still invokes a billable Anthropic model from client-supplied message history, with a new system prompt and server-side API key. Origin matching, BotID, Vercel Firewall rate limiting, and a large input-size cap reduce some abuse paths, but the endpoint stays unauthenticated and Origin checks are forgeable by non-browser clients. Braintrust instrumentation also logs chat input metadata (including client IP) when configured, adding an operational/privacy surface.
The latest update only hardens chat JSON parsing (400 on malformed bodies) and skips external-link stubs in llms endpoints. That does not shrink the migration, cost, or operational blast radius.
I did not approve because the full-site infrastructure rewrite plus the unauthenticated model-backed endpoint meet the Medium-risk threshold.
Sent by Cursor Automation: Assign PR reviewers
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
There are 6 total unresolved issues (including 5 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4ccfdcc. Configure here.
| // where localStorage is undefined | ||
| const [input, setInput] = useState(() => | ||
| typeof window === 'undefined' ? '' : (localStorage.getItem(StorageKeyInput) ?? ''), | ||
| ); |
There was a problem hiding this comment.
Ask AI draft never restores
Medium Severity
The Ask AI input reads localStorage inside the useState initializer with a server guard, but on SSR that initializer runs with window undefined and the state is fixed to ''. React reuses that state on hydration and does not re-run the initializer on the client, so a saved draft written via onChange never appears again after refresh or navigation.
Reviewed by Cursor Bugbot for commit 4ccfdcc. Configure here.




Summary
Replaces Mintlify hosting with a self-hosted fumadocs (Next.js) app, deployable on Vercel.
What's preserved
/browsers/standby). Content edits were limited to removing 3 dead snippet-import lines and adding frontmatter to one untracked testing doc.docs.jsonstays the navigation source of truth —lib/tree.tsconverts its tabs/groups into the sidebar at build time, so the editing workflow doesn't change. Redirects ported tonext.config.mjs.Info,Note,Tip,Warning,Card,CardGroup,Steps,Tabs,Accordion,Frame,Update,CodeGroup(incl. tab labels from fence titles, via a small remark plugin) are aliased to fumadocs equivalents incomponents/mdx.tsx.fumadocs-openapi(virtual pages, no generated files). Interactive playground is off (one flag incomponents/api-page.tsxto enable).New (things Mintlify gated behind paid tiers)
/llms.txt+/llms-full.txt(~970KB markdown dump).md/.mdxto any page URLANTHROPIC_API_KEYset in Vercel; degrades gracefully without itKnown gaps / review notes
/api-reference/getProjectsinstead of Mintlify's generated paths) — worth eyeballing hardest in the previewbun run buildcompiles all 561 pages green,bun run lintgreen, key routes smoke-tested (content pages, API reference, llms routes, .md rewrites, redirects). No visual QA beyond that yet.Deploy
Vercel: import repo, framework Next.js,
bun install && bun run build, setANTHROPIC_API_KEY, pointdocs.kernel.shat it.🤖 Generated with Claude Code
Note
High Risk
Full docs platform swap affects every URL, SEO, and deploy path;
/api/chatexposes a paid LLM with abuse controls that must be configured correctly in production.Overview
Replaces Mintlify with a fumadocs (Next.js) app (
bun dev/bun run build, Biome lint). MDX stays undercontent/docs/;docs.jsonremains the nav source of truth vialib/tree.ts(sidebar, eyebrows, external links). Mintlify tags (Info,Steps,Tabs, etc.) are aliased incomponents/mdx.tsxso existing pages need minimal edits (snippet imports inlined, one testing doc gets frontmatter).The app adds docs routes (catch-all MDX, separate OpenAPI pages from the same Stainless spec), site plumbing (sitemap, robots, OG images, GA4, BotID + firewall on
/api/chat), and brand styling inapp/global.css(lowercase UI, Kernel colors).New product surface: Orama
/api/search, Ask AI (floating panel +/api/chatwith Flexsearch tool, Anthropic, origin/bot/rate limits, Braintrust),/llms.txt//llms-full.txt, per-page.mdagent routes, copy markdown and Open in ChatGPT/Claude actions. API docs use custom response dropdown UI and method badges in the sidebar; interactive playground is off by default.Contributor docs (
README,AGENTS.md) and.gitignoreare updated for the Node/Next toolchain (bun.lock,.source,.next).Reviewed by Cursor Bugbot for commit 4ccfdcc. Bugbot is set up for automated code reviews on this repo. Configure here.