fix(docs): replace <ComponentsList /> in copy-page and markdown output#9484
Merged
shadcn merged 2 commits intoshadcn-ui:mainfrom Apr 8, 2026
Merged
Conversation
Contributor
|
@ramonclaudio is attempting to deploy a commit to the shadcn-pro Team on Vercel. A member of the Team first needs to authorize it. |
Collaborator
|
hmm I thought I fixed this. Thanks for the PR. Will review. |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
NP. |
2132259 to
21cab84
Compare
Contributor
Author
|
@shadcn anything I can do to help get this merged? |
65a5d3b to
1ff1203
Compare
1ff1203 to
4a3a700
Compare
The <ComponentsList /> tag on /docs/components was emitted as-is by the Copy Page button and the /llm/[slug] markdown endpoint because getComponentsList() walked components.children for pages directly. After shadcn-ui#9304 restructured the folder into components/radix/ and components/base/ subfolders, the filter always returned [] and the tag was replaced with an empty string (or, in the copy-page case, never replaced at all). - Reuse getPagesFromFolder() from lib/page-tree so the walker stays in sync with the on-screen ComponentsList React component. - Match the existing llms.txt format: flat absolute URLs (the /docs/components/:name -> /docs/components/radix/:name redirect in next.config.mjs is the canonical form) plus the frontmatter description pulled via source.getPage() on each page. - Export replaceComponentsList() and call it from docs/[[...slug]]/page.tsx so the Copy Page button goes through the same replacement path as processMdxForLLMs.
4a3a700 to
6d7a0ed
Compare
ramonclaudio
added a commit
to ramonclaudio/shadcn-ui
that referenced
this pull request
Apr 8, 2026
These three components have shipped since llms.txt was added in shadcn-ui#8460 and were never listed. LLMs hitting /llms.txt get a catalog missing them: - Direction: text direction provider (RTL support) - Native Select: styled native HTML select - Sonner: opinionated toast (Toast uses it under the hood but Sonner is also exposed as its own component at /docs/components/sonner) Noticed while working on shadcn-ui#9484.
ramonclaudio
added a commit
to ramonclaudio/shadcn-ui
that referenced
this pull request
Apr 8, 2026
llms.txt was added in shadcn-ui#8460 and hasn't kept up with the docs tree. Audited every section against apps/v4/content/docs and fixed the drift in one pass. Removed: - About (/docs/about) returns 404, the mdx file doesn't exist Added to Overview: - Skills (/docs/skills) - Directory (/docs/directory) Added whole RTL section (new since shadcn-ui#8460): - RTL (/docs/rtl) - RTL - Next.js - RTL - Vite - RTL - TanStack Start Added to Components: - Direction (Misc) - Native Select (Form & Input, after Select) - Sonner (Feedback & Status, after Toast, since Sonner has its own docs page even though Toast already uses it under the hood) Added to Registry: - Namespaces - Add a Registry (open source registry index) - Open in v0 integration - registry.json schema docs - registry-item.json spec docs Descriptions match the short curated style of the rest of the file. Noticed while working on shadcn-ui#9484.
ramonclaudio
added a commit
to ramonclaudio/shadcn-ui
that referenced
this pull request
Apr 8, 2026
llms.txt was added in shadcn-ui#8460 and hasn't kept up with the docs tree. Audited every URL against apps/v4/content/docs and fixed the drift in one pass. Removed: - About (/docs/about): returns 404, no about.mdx exists - Form (/docs/components/form): points at a phantom. No radix/form.mdx exists post-shadcn-ui#9304. URL only resolves because of a redirect in next.config.mjs, which lands at /docs/forms. That page is already listed as 'Forms Overview' in the ## Forms section, and the real form library docs (React Hook Form, TanStack Form, Next.js) are listed there too. The Form component entry is a stale duplicate. Added to Overview: - Skills (/docs/skills) - Directory (/docs/directory) Added whole RTL section (new since shadcn-ui#8460): - RTL (/docs/rtl) - RTL - Next.js - RTL - Vite - RTL - TanStack Start Added to Components: - Direction (Misc) - Native Select (Form & Input, after Select) - Sonner (Feedback & Status, after Toast, since Sonner has its own docs page even though Toast already uses it under the hood) Added to Registry: - Namespaces - Add a Registry (open source registry index) - Open in v0 integration - registry.json schema docs - registry-item.json spec docs Descriptions match the short curated style of the rest of the file. Noticed while working on shadcn-ui#9484.
shadcn
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces
<ComponentsList />on/docs/componentsin both the Copy Page button and the/docs/components.mdendpoint. Today the tag ships to the clipboard as-is and gets silently stripped to an empty string in the markdown endpoint, becausegetComponentsList()walkedcomponents.childrenfor pages directly, and #9304 restructured the folder intocomponents/radix/andcomponents/base/subfolders so the filter returns[].getPagesFromFolderfromapps/v4/lib/page-tree.tsso this walker stays in sync with the on-screenComponentsListReact component if the tree shape changes againapps/v4/public/llms.txt: flat absolute URLs plus the MDX frontmatter description for each component. The flat URL is the canonical form becauseapps/v4/next.config.mjs:53redirects/docs/components/:nameto/docs/components/radix/:name(permanent: false, default-to-radix)replaceComponentsListand call it fromapps/v4/app/(app)/docs/[[...slug]]/page.tsx:87so the Copy Page button andprocessMdxForLLMsshare the same replacement pathBefore
Copy Page button on
ui.shadcn.com/docs/components(raw tag ships to clipboard):https://ui.shadcn.com/docs/components.md(tag silently stripped to empty string, LLMs get a useless file):After
Copy Page and
/docs/components.mdwith this PR (both identical, format matchesllms.txt):Verification
pnpm test→ 179 passed, 1 skippedpnpm --filter=v4 dev, then Copy Page on/docs/componentsandcurl http://localhost:4000/docs/components.mdboth return the same flat list of 59 components with absolute URLs and descriptionshttp://localhost:4000/docs/components/accordion→ 307 →/radix/accordion) and prod (https://ui.shadcn.com/docs/components/accordion→ 307 →/radix/accordion)