From 968a739eafccf07f7990e1309959f60737749b65 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Sep 2026 10:25:28 +0000 Subject: [PATCH] docs(apps/docs): fix stale docblock in page.tsx breadcrumb walk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The census paragraph on origin/main still claimed "8 short trails remain" and that content/docs/releases/meta.json "still lists index" — both went false when PR #13946 removed "index" from that meta.json (0 hits repo-wide now under content/docs/**/meta.json). Rewrite it to the mechanism only (how a URL-less ancestor arises, that #12352/#13946 fixed every known instance, and that the condition is structural and can recur) rather than a count that rotted within a day. Also fixes an independent misattribution in the same paragraph: getBreadcrumbItems() does not drop the URL-less ancestor itself — it emits it with url: undefined. The drop is local, in docsTrail()'s own loop guard (`if (... || !item.url) continue;`). No behavior change: docsTrail(), the breadcrumb loop, and the "missing URL is deliberately not reconstructed" rule paragraph are untouched. --- .../docs/app/[lang]/docs/[[...slug]]/page.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/apps/docs/app/[lang]/docs/[[...slug]]/page.tsx b/apps/docs/app/[lang]/docs/[[...slug]]/page.tsx index 5cd5390049..c3443d0395 100644 --- a/apps/docs/app/[lang]/docs/[[...slug]]/page.tsx +++ b/apps/docs/app/[lang]/docs/[[...slug]]/page.tsx @@ -55,14 +55,17 @@ type DocPage = NonNullable>; * `index` node. ⛔ Nothing here splits `page.url` on `/`, and nothing constructs a * URL the loader has not already produced. * - * ⚠️ **An ancestor can arrive without a URL, and this drops it.** Fumadocs - * attaches a folder's `index.mdx` as that folder's `index` node only when the - * folder's `meta.json` does **not** list `"index"` in `pages`; a folder that - * lists it reaches this walk with a `name` and no `url`. That was once 17 of the - * 35 `meta.json` files under `content/docs`, shortening 172 of 404 trails. 16 of - * the 17 were fixed producer-side (#12352) and 8 short trails remain, all under - * `content/docs/releases/` — a directory AGENTS.md fences off, so its `meta.json` - * still lists `"index"`. The condition is therefore live, just rare. + * ⚠️ **An ancestor can arrive without a URL, and the loop below drops it.** + * `getBreadcrumbItems()` does not drop anything itself — it emits that + * ancestor with a `name` and `url: undefined`. The drop happens locally, in + * this file: the `if (typeof item.name !== 'string' || !item.url) continue;` + * guard in the loop below skips it. Fumadocs attaches a folder's `index.mdx` + * as that folder's `index` node only when the folder's `meta.json` does + * **not** list `"index"` in `pages`; a folder that lists it reaches this walk + * with a `name` and no `url`. #12352 and #13946 fixed every `meta.json` under + * `content/docs` that did so — today's corpus has none — but the condition is + * structural, not retired: any `meta.json` that lists `"index"` again + * reproduces it. * * ⛔ The missing URL is deliberately **not** reconstructed here — that fence is * the reason #12352 was fixable at all. The folder's index page exists, is in the