From afbe56173e1d245638844246209ce8525d48b6ae Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Wed, 26 Aug 2026 03:31:00 +0800 Subject: [PATCH] fix(docs): delete the shadowed root route; proxy.ts owns / `apps/docs/app/page.tsx` called `redirect('/docs')` and never ran. `proxy.ts` rewrites `/` to `/en` before routing, so `app/[lang]/page.tsx` serves the homepage. The file was code `grep` finds and the runtime never executes -- AGENTS.md "Route & surface ownership" rule 1 -- and its content was also wrong for today's site, which no longer forwards `/` to the docs. Measured on a local production build (`next build && next start`, Next 16.3.1), four configurations, `GET /`: page.tsx proxy GET / GET /docs present present 200 homepage, 72117 B 200 absent present 200 homepage, 72117 B 200 absent absent 404 (Next default, 8686 B) 404 present absent 307 -> /docs, which is itself 404 404 Deleting it changes nothing served: the `/` response is byte-identical apart from the Next build id, which changes on every build (`/docs`, untouched by this diff, differs in exactly the same way -- the control). Keeping it as a "fallback" was measured too, and it is not one. In the only configuration where the file would run -- the proxy not matching `/` -- every unprefixed path already 404s, `/docs` included, so the file rescues one URL out of a 404 and into another. It also makes that failure quieter: with the file present `/` answers 307 instead of 404, masking a proxy that has stopped running. Absence must be loud (rule 3), so the honest end state is deletion. Co-Authored-By: Claude Opus 5 --- apps/docs/app/page.tsx | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 apps/docs/app/page.tsx diff --git a/apps/docs/app/page.tsx b/apps/docs/app/page.tsx deleted file mode 100644 index 7710bcce69..0000000000 --- a/apps/docs/app/page.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import { redirect } from 'next/navigation'; - -export default function RootPage() { - // Middleware should handle locale routing, but keep the root focused on docs. - redirect('/docs'); -}