Skip to content

Conversation

@kostyniuk
Copy link

@kostyniuk kostyniuk commented Dec 20, 2025

🎯 Changes

Update Next.js middleware description to match the Next.js 16 syntax.

βœ… Checklist

πŸš€ Release Impact

  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Documentation
    • Updated middleware architecture reference in the React framework comparison guide.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions github-actions bot added the documentation Everything documentation related label Dec 20, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 20, 2025

Walkthrough

A documentation file was updated to replace a reference from middleware.ts to proxy.ts in the "Middleware Architecture" section of the React framework comparison guide.

Changes

Cohort / File(s) Summary
Documentation reference update
docs/start/framework/react/comparison.md
Updated middleware architecture reference from middleware.ts to proxy.ts

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

documentation

Poem

🐰 A reference was shifted, from one name to the next,
The rabbit now hops through proxy.ts, context correct,
No logic was bent, just a pathway made clear,
Documentation's now tidyβ€”the way we hold dear! πŸ“šβœ¨

Pre-merge checks and finishing touches

βœ… Passed checks (3 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title accurately describes the main change: updating a Next.js middleware reference in documentation from middleware.ts to proxy.ts to match Next.js 16 syntax.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

πŸ“œ Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 27d1c5e and 4745e4c.

πŸ“’ Files selected for processing (1)
  • docs/start/framework/react/comparison.md (1 hunks)
🧰 Additional context used
πŸ““ Path-based instructions (1)
docs/**/*.{md,mdx}

πŸ“„ CodeRabbit inference engine (AGENTS.md)

Use relative links to docs/ folder format (e.g., ./guide/data-loading) for internal documentation references

Files:

  • docs/start/framework/react/comparison.md

```

**Next.js** has a single middleware.ts file that runs on the Edge Runtime for all requests. It cannot access server-only resources like databases and has limitations compared to Node.js runtime.
**Next.js** has a single proxy.ts file that runs on the Edge Runtime for all requests. It cannot access server-only resources like databases and has limitations compared to Node.js runtime.
Copy link
Contributor

@coderabbitai coderabbitai bot Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Inaccuracy: proxy.ts runs on Node.js runtime, not Edge Runtime.

The proxy runtime is Node.js, and it cannot be configured; the edge runtime is NOT supported in proxy. The documentation currently claims proxy.ts "runs on the Edge Runtime," which contradicts the official Next.js 16 documentation. Please correct this to accurately reflect that proxy.ts runs on the Node.js runtime.

πŸ”Ž Proposed fix
-**Next.js** has a single proxy.ts file that runs on the Edge Runtime for all requests. It cannot access server-only resources like databases and has limitations compared to Node.js runtime.
+**Next.js** has a single proxy.ts file that runs on the Node.js runtime. Unlike the deprecated middleware.ts (which ran on Edge Runtime), proxy.ts has full access to server-side resources like databases.
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Next.js** has a single proxy.ts file that runs on the Edge Runtime for all requests. It cannot access server-only resources like databases and has limitations compared to Node.js runtime.
**Next.js** has a single proxy.ts file that runs on the Node.js runtime. Unlike the deprecated middleware.ts (which ran on Edge Runtime), proxy.ts has full access to server-side resources like databases.
πŸ€– Prompt for AI Agents
docs/start/framework/react/comparison.md around line 245: the doc incorrectly
states that Next.js proxy.ts runs on the Edge Runtime; update the sentence to
state that proxy.ts runs on the Node.js runtime (cannot be configured to Edge)
and clarify that it therefore can access server-only resources like databases
while edge runtime is not supported for proxy.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kostyniuk what about this comment here? we also should probably mention both, next 15 and next 16

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Everything documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants