Skip to content

Redirect /changelog to /docs/changelog (307) - #3668

Merged
lawrencecchen merged 1 commit into
mainfrom
task-changelog-redirect
May 6, 2026
Merged

lawrencecchen merged 1 commit into
mainfrom
task-changelog-redirect

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a 307 (temporary) redirect in web/proxy.ts so /changelog and /<locale>/changelog (with or without trailing slash) land on /docs/changelog.
  • Locale prefix is preserved when present, so non-default locales keep their language.

Testing

  • Local middleware regex match check (manual): /changelog, /changelog/, /ja/changelog, /pt-BR/changelog/ all match; /changelog/foo, /changelogs, /docs/changelog do not.
  • Vercel preview will exercise the real redirect end-to-end.

Related

  • Task: keep cmux.com/changelog working as a shortcut to the docs changelog page

Summary by cubic

Add a temporary 307 redirect so /changelog and /<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

  • Chores
    • Improved changelog URL routing to automatically direct users to their localized documentation version. Accessing the changelog now preserves your language preference throughout the navigation.

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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@vercel

vercel Bot commented May 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment May 6, 2026 10:24pm
cmux-staging Building Building Preview, Comment May 6, 2026 10:24pm

@coderabbitai

coderabbitai Bot commented May 6, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ec32430a-fff1-44c4-8800-915e2c0d2fbf

📥 Commits

Reviewing files that changed from the base of the PR and between f3210c2 and 287ac83.

📒 Files selected for processing (1)
  • web/proxy.ts

📝 Walkthrough

Walkthrough

A 307 temporary redirect is added to web/proxy.ts that routes /changelog requests (with optional locale prefix) to /<locale>/docs/changelog, preserving any locale information in the path.

Changes

Middleware Redirect Logic

Layer / File(s) Summary
Changelog Redirect Handler
web/proxy.ts
Adds regex-based middleware that captures optional locale prefixes (/<ll> or /<ll>-<REGION>) from /changelog paths and issues a 307 redirect to /<locale>/docs/changelog.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • manaflow-ai/cmux#1626: Both modify web/proxy.ts middleware logic—main PR adds changelog redirect, related PR adjusts PostHog proxy matcher.
  • manaflow-ai/cmux#2193: Both add early route-specific redirects to web/proxy.ts before next-intl middleware (changelog vs. legal-page routes).
  • manaflow-ai/cmux#1716: Both modify web/proxy.ts middleware with path-based redirects (changelog 307 vs. cmux.dev→cmux.com 301).

Poem

🐰 A changelog hops along the way,

With locale tucked in every stray,

Three-oh-seven says: redirect, I pray!

To docs it skips, a quick ballet! 📖✨

🚥 Pre-merge checks | ✅ 12 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (12 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding a 307 redirect from /changelog to /docs/changelog.
Description check ✅ Passed The description includes Summary and Testing sections as required by the template, though Demo Video and Review Trigger sections are not filled out; however, these appear to be optional for this type of change.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Swift Actor Isolation ✅ Passed PR only modifies web/proxy.ts (TypeScript). Custom check targets Swift 6 actor isolation, which is not applicable to TypeScript/web changes.
Cmux Swift Blocking Runtime ✅ Passed Check not applicable. PR modifies only web/proxy.ts (TypeScript), not Swift code. The Swift blocking runtime check applies only to Swift files.
Cmux Swift Concurrency ✅ Passed The PR modifies only web/proxy.ts (TypeScript). The cmux Swift concurrency check applies exclusively to Swift code changes. This PR contains no Swift files, making the check not applicable.
Cmux Swift @Concurrent ✅ Passed The PR modifies only web/proxy.ts (TypeScript), not Swift files. The Swift @concurrent annotation check does not apply to non-Swift code changes.
Cmux Swift File And Package Boundaries ✅ Passed Custom check is for Swift file/package boundaries. PR only modifies web/proxy.ts (TypeScript). No production Swift files are modified, making check not applicable.
Cmux Swift Logging ✅ Passed Custom check for Swift logging violations is not applicable. PR only modifies web/proxy.ts (TypeScript), containing no Swift code changes. Check is for production Swift changes only.
Cmux Swiftui State Layout ✅ Passed PR modifies only web/proxy.ts (TypeScript middleware). Contains no SwiftUI changes—no @Published, @Observable, @StateObject, or SwiftUI state patterns. Check not applicable to non-SwiftUI code.
Cmux Architecture Rethink ✅ Passed This PR modifies only web/proxy.ts (TypeScript middleware). The check applies to Swift architecture changes. No Swift files are modified, making the check not applicable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task-changelog-redirect

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a 307 temporary redirect in web/proxy.ts so that /changelog (with or without locale prefix and/or trailing slash) forwards to /docs/changelog, preserving any locale prefix in the destination.

  • The regex ^(\\/[a-z]{2}(?:-[A-Z]{2})?)?\\/changelog\\/?$ is correctly anchored, handles trailing slashes, and avoids matching sub-paths like /changelog/foo or /changelogs; no infinite-redirect risk since /docs/changelog cannot match the pattern.
  • No-locale requests (/changelog) are redirected to /docs/changelog (no locale), which then passes through intlMiddleware and may incur a second redirect to the detected locale (e.g. /en/docs/changelog); locale-prefixed requests (/ja/changelog) land directly at /ja/docs/changelog in one hop.
  • The regex only covers ISO 639-1 + optional ISO 3166-1 locale forms (e.g. pt-BR); any script-tag variant locales the project might add in the future (e.g. zh-Hant) would fall through to intlMiddleware unredirected — worth keeping in mind if the locale set expands.

Confidence Score: 4/5

Safe 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

Filename Overview
web/proxy.ts Adds a 307 redirect block for /changelog → /docs/changelog before the intl middleware; regex and clone logic are correct for the documented cases, with one minor double-redirect path for no-locale requests.

Sequence Diagram

sequenceDiagram
    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)
Loading

Reviews (1): Last reviewed commit: "Add temporary /changelog → /docs/changel..." | Re-trigger Greptile

@lawrencecchen
lawrencecchen merged commit 11cb337 into main May 6, 2026
23 of 24 checks passed
@lawrencecchen
lawrencecchen deleted the task-changelog-redirect branch May 6, 2026 22:31

This branch was successfully deployed

1 active deployment
Preview – cmux — 287ac83c Deployed May 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant