Skip to content

feat(repo): add Mosaic docs site - #10862

Merged
alexcarpenter merged 74 commits into
mainfrom
carp/mosaic-docs-site
Nov 18, 2026
Merged

alexcarpenter merged 74 commits into
mainfrom
carp/mosaic-docs-site

Conversation

@alexcarpenter

@alexcarpenter alexcarpenter commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Description

Adds packages/mosaic-docs, a private Next.js site that documents Mosaic. It renders a page for every component, primitive and hook from the colocated doc files added in #10847.

  • Run it with pnpm dev:mosaic-docs from the repo root. It builds @clerk/mosaic first, then serves the site on port 6021.
  • Button, Badge and Banner have live previews. The other pages have docs only for now.
  • Every page is also available as Markdown for agents: append .md to the URL or send Accept: text/markdown. /llms.txt and /llms-full.txt are generated too.
  • Components, primitives and hooks can be left off the site with the EXCLUDED list in scripts/generate-docs.mjs; Captcha and the internal useMosaic* hooks are left off.
  • The landing page has an "Onboard your agent" button that copies a prompt telling an agent to fetch /docs/setup.md and follow it.
  • The Setup page at /docs/setup is authored in MDX. Its table of contents is built from the page's headings.
  • The code is split into reusable core, ui and next layers, kept apart from the Mosaic-specific content. The README lists the layers, and a test enforces their import rules.
  • The changeset is empty because the package is private and isn't released.
Light Dark
Home Home, light Home, dark
Component page Button page, light Button page, dark

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
mosaic-docs Ready Ready Preview Nov 18, 2026 4:34pm UTC
swingset Ready Ready Preview Nov 18, 2026 4:34pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
clerk-js-sandbox Skipped Skipped Nov 18, 2026 4:34pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1ec2a07

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The PR adds a new @clerk/mosaic-docs workspace and wires it into the repo scripts and Turbo tasks. It adds document catalog generation, document types, navigation data, and Markdown/LLM content helpers. It also adds a Next.js docs app with root layout, docs routes, proxying for Markdown requests, shared UI components, examples, and documentation content and styles.

Estimated code review effort: 4 (Complex) | ~60 minutes

Suggested reviewers: austincalvelage, ephem

Merge Risk: Low · previous review a20c9

This private docs site is mostly sound. A few minor content-negotiation and Markdown-fence edge cases remain and are unlikely to be hit with current content, so they can be tracked as follow-ups.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat(repo): add Mosaic docs site" matches the main change. The PR adds the private packages/mosaic-docs Next.js site that documents Mosaic components, primitives, and hooks, along with th…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description states that the PR adds packages/mosaic-docs, a private Next.js site that documents Mosaic components, primitives, and hooks. It gives run instructions (pnpm dev:mosaic-docs, port 6021…
Full details: Title check

Explanation

The title "feat(repo): add Mosaic docs site" matches the main change. The PR adds the private packages/mosaic-docs Next.js site that documents Mosaic components, primitives, and hooks, along with the dev:mosaic-docs script and Turbo task.

Full details: Description check

Explanation

The description states that the PR adds packages/mosaic-docs, a private Next.js site that documents Mosaic components, primitives, and hooks. It gives run instructions (pnpm dev:mosaic-docs, port 6021), describes the live previews, Markdown output, llms.txt generation, the EXCLUDED list, the core/ui/next layering, and the empty changeset. These points match the changeset in the raw summary.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 03761e4 and a20c9ac.

Files selected for processing: 9

  • packages/mosaic-docs/scripts/generate-docs.mjs
  • packages/mosaic-docs/scripts/generate-docs.test.mjs
  • packages/mosaic-docs/src/app/llms.mdx/docs/setup/route.ts
  • packages/mosaic-docs/src/app/page.tsx
  • packages/mosaic-docs/src/components/agent-prompt.tsx
  • packages/mosaic-docs/src/components/landing-footer.tsx
  • packages/mosaic-docs/src/lib/llms-docs.ts
  • packages/mosaic-docs/src/ui/copy-button.tsx
  • packages/mosaic-docs/src/ui/copy-page-button.tsx
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

@blacksmith-sh

blacksmith-sh Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Matches Button page with live preview

The Button page still renders live buttons, the Code tab opens the example source, and the outline jumps to Practices and the Button props table.

Recording

Watch full video · Original footage · 0:00 Button preview and code · 0:02 Outline navigation

Also checked · 36 match

Matches A page for every doc file
Matches Browser Accept and unknown pages
Matches MDX landing page TOC
Matches Escaped pipe in Markdown tables
Matches Layer import rules enforced
Matches Even sidebar divider spacing
Matches Narrow-screen page outline
Matches Homepage footer bar below the fold
Matches Class cleanup renders the same
Matches Setup guide with numbered steps
Matches Setup guide as Markdown
Matches Clerk docs syntax colors
Matches Empty Returns hidden on hook pages
Matches Sticky line numbers with edge fades
Matches Clerk logo in the header
Matches Practices as a Do/Don't table
Matches Even copy button spacing
Matches Setup moves to /docs/setup
Matches Onboard your agent button
Matches Footer category links open a page
Matches Setup guide in llms-full.txt
Matches Skip link on the landing page
Matches Copy failure state
Matches Windows doc paths
Matches Pages unchanged by the refactor
Matches Duplicates caught after placement
Matches ActionMenu, Branding, ClerkLogo left off
Matches Docs team review requests
Matches Related links to parts
Matches Design system wording
and 6 more claims in the full Proof report

Caution

New issue found while testing

HTML doc pages omit Vary: Accept

Unchanged on 1ec2a07: the same /docs URL returns HTML or markdown by Accept header, but the HTML response has no Vary: Accept, so a shared cache can serve one format to the other client.

Proof on 1ec2a072 (from 28e8fbb5) · Did Proof get it right? Yes · No

View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss

@pkg-pr-new

pkg-pr-new Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@10862

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@10862

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@10862

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@10862

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10862

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10862

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10862

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@10862

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10862

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10862

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10862

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@10862

@clerk/express

npm i https://pkg.pr.new/@clerk/express@10862

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@10862

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10862

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@10862

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10862

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@10862

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@10862

@clerk/react

npm i https://pkg.pr.new/@clerk/react@10862

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@10862

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@10862

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@10862

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@10862

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10862

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@10862

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@10862

commit: 1ec2a07

@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox November 17, 2026 16:05 Inactive
@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox November 17, 2026 16:07 Inactive
@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox November 17, 2026 16:09 Inactive
@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox November 17, 2026 16:13 Inactive
@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox November 17, 2026 16:16 Inactive
@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox November 17, 2026 16:30 Inactive
@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox November 17, 2026 16:42 Inactive
@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox November 17, 2026 16:46 Inactive
@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox November 17, 2026 16:52 Inactive
@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox November 17, 2026 16:59 Inactive
@manovotny

manovotny commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

This is looking great. Nice work.

Three threads are still open:

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

@manovotny manovotny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving so the failing Vercel – mosaic-docs check clears on everyone's PRs.

Until #10806 merges, most documented components aren't exported yet, so an import an agent writes from llms.txt can fail. Nothing links to the site in the meantime, and merging brings noindex and the reviewed copy to mosaic.clerk.com, which has neither today.

@alexcarpenter
alexcarpenter merged commit 2b3ec9e into main Nov 18, 2026
59 checks passed

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – swingset — 1ec2a072 Deployed Nov 18, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 1ec2a072 Deployed Nov 18, 2026 by vercel[bot]
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.

5 participants