fix: redirect root path to default locale#35
Conversation
- 11 sessions from basic agent loop to autonomous teams - Python MVP implementations for each session - Mental-model-first docs in en/zh/ja - Interactive web platform with step-through visualizations - Incremental architecture: each session adds one mechanism
|
Someone is attempting to deploy a commit to the crazyboym's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
Adds an App Router root page to redirect / to the default locale route, addressing the reported 404 when visiting http://localhost:3000 directly.
Changes:
- Added
web/src/app/page.tsxto redirect/→/en.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export default function RootPage() { | ||
| redirect("/en"); |
There was a problem hiding this comment.
The redirect target is hard-coded to "/en" here, while the supported locales are also defined elsewhere (e.g., in app/[locale]/layout.tsx and lib/i18n-server.ts). This can drift over time if the default locale changes. Consider introducing a shared DEFAULT_LOCALE (and possibly LOCALES) constant in a common module and importing it here (and from the other locale lists) so there’s a single source of truth.
| export default function RootPage() { | |
| redirect("/en"); | |
| const DEFAULT_LOCALE = process.env.NEXT_PUBLIC_DEFAULT_LOCALE || "en"; | |
| export default function RootPage() { | |
| redirect(`/${DEFAULT_LOCALE}`); |
| export default function RootPage() { | ||
| redirect("/en"); | ||
| } |
There was a problem hiding this comment.
The PR description mentions that the README’s web-module instructions are insufficient, but this PR only adds a root redirect and does not update any README/docs. Either update the README as part of this PR or adjust the PR title/description to reflect the actual scope (root-path redirect only).
|
Correction: This PR was automatically closed by GitHub when we force-pushed after a The root redirect fix is a valid improvement -- 更正:这个 PR 是 |
|
Root redirect is now live in commit 14c7228. Credited in the commit message. Thanks again! 根路径重定向已合并,commit message 中注明了贡献者。 |
fix issues: #32 README中web模块说明不足,默认页面404