You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found while verifying #180 against a running build. Unrelated to that card and deliberately not fixed there — #180's surface was apps/docs/app/[lang]/layout.tsx, and this lives in next.config.mjs.
(Angle-bracket markup omitted throughout — this repo's sanitizer strips it.)
What happens
Every docs page renders a "Copy Markdown" button and a "View as Markdown" link, both pointing at page.url plus .mdx. On a locale-prefixed page page.url carries the prefix, so the link is /zh-Hans/docs/architecture.mdx.
next.config.mjs rewrites only the unprefixed shape:
There is no locale-prefixed variant, so every prefixed .mdx URL falls through to app/[lang]/docs/[[...slug]], where architecture.mdx is not an enumerated slug, and 404s.
Measured
Against next start on a production build of b61f04e:
page
markdownUrl it renders
that URL answers
/docs/architecture
/docs/architecture.mdx
200
/zh-Hans/docs/architecture
/zh-Hans/docs/architecture.mdx
404
/ja/docs/architecture
/ja/docs/architecture.mdx
404
The markdownUrl values were read out of the served payload, not off the source.
Six of the seven locales are affected, on every one of the 79 docs pages — so roughly 400 rendered links that 404. English is the only locale where the button works.
Why it is worth fixing
It is a visible, clickable dead end in the UI, not a machine-facing edge case. A reader on any non-English page who clicks "Copy Markdown" gets a 404 page.
The .mdx surface is the AI-facing half of this site (it is what llms.txt and the copy button exist for), so the locales where it silently fails are exactly the ones least likely to be spot-checked by an English-speaking maintainer.
Directions (not adjudicated)
Add a locale-prefixed rewrite alongside the existing one (/:lang/docs/:path*.mdx), and decide what the handler serves for a locale that has no translation — presumably the same English fallback the page itself serves.
Have the page emit the unprefixed .mdx URL regardless of locale, on the grounds that app/llms.mdx/... is default-locale-only by the same reasoning as fix(docs): serve llms-full.txt in the default locale only #183. That makes the link work everywhere but hands a reader on a translated page the English markdown.
These differ in what a translated page's markdown should be, which is a content question, not a routing one.
Found while verifying #180 against a running build. Unrelated to that card and deliberately not fixed there — #180's surface was
apps/docs/app/[lang]/layout.tsx, and this lives innext.config.mjs.(Angle-bracket markup omitted throughout — this repo's sanitizer strips it.)
What happens
Every docs page renders a "Copy Markdown" button and a "View as Markdown" link, both pointing at
page.urlplus.mdx. On a locale-prefixed pagepage.urlcarries the prefix, so the link is/zh-Hans/docs/architecture.mdx.next.config.mjsrewrites only the unprefixed shape:There is no locale-prefixed variant, so every prefixed
.mdxURL falls through toapp/[lang]/docs/[[...slug]], wherearchitecture.mdxis not an enumerated slug, and 404s.Measured
Against
next starton a production build ofb61f04e:markdownUrlit renders/docs/architecture/docs/architecture.mdx/zh-Hans/docs/architecture/zh-Hans/docs/architecture.mdx/ja/docs/architecture/ja/docs/architecture.mdxThe
markdownUrlvalues were read out of the served payload, not off the source.Six of the seven locales are affected, on every one of the 79 docs pages — so roughly 400 rendered links that 404. English is the only locale where the button works.
Why it is worth fixing
.mdxsurface is the AI-facing half of this site (it is whatllms.txtand the copy button exist for), so the locales where it silently fails are exactly the ones least likely to be spot-checked by an English-speaking maintainer.Directions (not adjudicated)
/:lang/docs/:path*.mdx), and decide what the handler serves for a locale that has no translation — presumably the same English fallback the page itself serves..mdxURL regardless of locale, on the grounds thatapp/llms.mdx/...is default-locale-only by the same reasoning as fix(docs): serve llms-full.txt in the default locale only #183. That makes the link work everywhere but hands a reader on a translated page the English markdown.These differ in what a translated page's markdown should be, which is a content question, not a routing one.
Filed unassigned for triage.
Generated by Claude Code