fix(nextjs-turbopack): document proxy.ts as the correct Next.js 16 middleware filename#2033
fix(nextjs-turbopack): document proxy.ts as the correct Next.js 16 middleware filename#2033t0kubetsu wants to merge 2 commits into
Conversation
Next.js 16 + Turbopack uses proxy.ts (not middleware.ts) as the middleware file. Add a Middleware File Naming section so code review skills do not flag proxy.ts as a security issue or misnamed file. Closes affaan-m#2032
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a "Middleware File Naming" section to Next.js Turbopack docs: Next.js 16+ expects ChangesMiddleware File Naming Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
1 issue found across 1 file
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
cubic-dev-ai correctly flagged the Turbopack/webpack framing as inaccurate. The proxy.ts convention is a Next.js 16 change, not a Turbopack-specific one. Rewrite the section to say so clearly.
Problem
The
nextjs-turbopackskill says nothing about middleware file naming. Other ECC skills referencemiddleware.tsthroughout, which causes a false-positive security finding when reviewing a Next.js 16 + Turbopack codebase that correctly usesproxy.ts.This was discovered during a real code review: Claude flagged a working
proxy.tsauth middleware as a critical security issue ("the auth gate was silently bypassed") and opened a PR to rename it tomiddleware.ts. The project maintainer correctly closed it as "Won't fix" pointing to the Next.js docs.Root Cause
Next.js 16 introduced
proxy.tsas the middleware filename for Turbopack mode:https://nextjs.org/docs/app/getting-started/proxy
ECC has no record of this convention change, so any security or code review skill operating on a Next.js 16 + Turbopack project will misidentify
proxy.tsas an incorrectly named file.Fix
Add a Middleware File Naming section to
skills/nextjs-turbopack/SKILL.mdwith:proxy.tsduring reviewsCloses #2032
Summary by cubic
Document
proxy.tsas the correct middleware filename for Next.js 16 inskills/nextjs-turbopack/SKILL.mdto stop false-positive security flags (closes #2032). Clarifies the filename is version-based (16+:proxy.ts, pre-16:middleware.ts), adds a “do not flagproxy.ts” warning, and links to the official docs.Written for commit e91109d. Summary will update on new commits. Review in cubic
Summary by CodeRabbit