Repository navigation
Redirect /changelog to /docs/changelog (307) - #3668
Conversation
Match /changelog and /<locale>/changelog with an optional trailing slash and 307 to the corresponding /docs/changelog so old links keep working without baking in a permanent rewrite.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA 307 temporary redirect is added to ChangesMiddleware Redirect Logic
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 12 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryAdds a 307 temporary redirect in
Confidence Score: 4/5Safe to merge; the redirect is narrowly scoped, cannot loop back on itself, and preserves query strings via the cloned URL. The logic is straightforward and well-tested manually per the PR description. The only noteworthy path is the no-locale case, where a request to /changelog takes two hops to reach the final page (via intlMiddleware's own locale redirect), but this is a minor user-experience detail, not a correctness problem. No files require special attention. web/proxy.ts is the only changed file and the change is self-contained. Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant Middleware as web/proxy.ts
participant intlMW as intlMiddleware
participant App as Next.js App
Note over Browser,App: Case 1 — no locale prefix
Browser->>Middleware: GET /changelog
Middleware-->>Browser: 307 /docs/changelog
Browser->>Middleware: GET /docs/changelog
Middleware->>intlMW: pass-through
intlMW-->>Browser: 302 /en/docs/changelog
Browser->>App: GET /en/docs/changelog
Note over Browser,App: Case 2 — locale prefix present
Browser->>Middleware: GET /ja/changelog
Middleware-->>Browser: 307 /ja/docs/changelog
Browser->>Middleware: GET /ja/docs/changelog
Middleware->>intlMW: pass-through (locale already set)
intlMW->>App: /ja/docs/changelog (no extra redirect)
Reviews (1): Last reviewed commit: "Add temporary /changelog → /docs/changel..." | Re-trigger Greptile |
Summary
web/proxy.tsso/changelogand/<locale>/changelog(with or without trailing slash) land on/docs/changelog.Testing
/changelog,/changelog/,/ja/changelog,/pt-BR/changelog/all match;/changelog/foo,/changelogs,/docs/changelogdo not.Related
Summary by cubic
Add a temporary 307 redirect so
/changelogand/<locale>/changelog(with or without trailing slash) go to/docs/changelog, preserving the locale when present. This keeps cmux.com/changelog working as a docs shortcut without a permanent rewrite.Written for commit 287ac83. Summary will update on new commits.
Summary by CodeRabbit