Conversation
chargome
commented
Feb 4, 2026
- Update next and eslint-config-next to ^16.1.6
- Migrate middleware to proxy (renamed src/middleware.ts to src/proxy.ts per Next.js 16 convention)
- Migrate ESLint to flat config format (eslint.config.mjs)
- Add --webpack flag to dev/build scripts (We'll cover Turbopack at a later point)
- Move src/pages/ to root pages/ (Next.js 16 requires app and pages at same level)
- Add images.localPatterns config for query string support on local images
- Fix component type errors for React 19 / Next.js 16 compatibility
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| "start:dev": "NODE_ENV=development yarn build && yarn start", | ||
| "start": "next start", | ||
| "lint": "next lint", | ||
| "lint": "eslint \"{src,app,scripts}/**/*.{ts,tsx,js,jsx}\"", |
There was a problem hiding this comment.
Lint commands exclude new pages/ directory
Medium Severity
The PR description says pages were moved to root pages/ directory for Next.js 16 compatibility, but the lint commands were changed from next lint (which auto-discovers directories) to explicit eslint "{src,app,scripts}/**/*" patterns. This means pages/_error.jsx and any future files in pages/ are now excluded from ESLint and Prettier checks.
Additional Locations (1)
f37545c to
15e724c
Compare
| }, | ||
| { | ||
| from: '/platforms/android/manual-configuration/', | ||
| to: '/platforms/android/manual-setup/', | ||
| }, | ||
| { | ||
| from: '/platforms/android/configuration/manual-init/', | ||
| to: '/platforms/android/manual-setup/', | ||
| to: '/platforms/android/configuration/manual-init/', | ||
| }, | ||
| { | ||
| from: '/platforms/android/advanced-usage/', |
There was a problem hiding this comment.
Bug: The redirect for /platforms/android/manual-configuration/ points to a non-existent page, /platforms/android/configuration/manual-init/, which will cause a 404 error.
Severity: MEDIUM
Suggested Fix
Update the redirect rule in src/proxy.ts. The to field for the path /platforms/android/manual-configuration/ should be changed from /platforms/android/configuration/manual-init/ to the correct, existing path /platforms/android/manual-setup/.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: src/proxy.ts#L951-L957
Potential issue: A redirect rule for the old documentation path
`/platforms/android/manual-configuration/` was updated to point to
`/platforms/android/configuration/manual-init/`. However, the target page at this new
path does not exist in the codebase. This change will cause users who navigate using the
old URL to encounter a 404 error instead of being redirected to the correct
documentation page, which is located at `/platforms/android/manual-setup/`.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| deviceType: ua.device.type || 'desktop', | ||
| isBot: false, | ||
| }; | ||
| return patterns.some(pattern => pattern.test(userAgent)); |
There was a problem hiding this comment.
Proxy AI patterns diverge from shared constant
Medium Severity
The isAIOrDevTool function replaced the shared AI_AGENT_PATTERN import with hardcoded inline patterns that are missing gptbot, codex, perplexity, cohere, and gemini. These AI tools will now receive HTML instead of markdown. The shared AI_AGENT_PATTERN in trafficClassification.ts is still used by tracesSampler, creating an inconsistency where these tools get 100% trace sampling but no markdown content.
| /vscode/i, // VS Code extensions | ||
| /intellij/i, // IntelliJ plugins | ||
| /sublime/i, // Sublime Text plugins | ||
| /got/i, // Got HTTP library (sindresorhus/got) |
There was a problem hiding this comment.
Overly broad /got/i user agent regex pattern
Low Severity
The /got/i regex matches any user agent containing the three-letter substring "got" (case-insensitive), which is overly broad. Additionally, the got HTTP library is a general-purpose HTTP client, not specifically an AI or dev tool — any server-side application using got to fetch documentation would incorrectly receive markdown instead of HTML. A more specific pattern like /^got\//i would target the actual library's user agent format.
|
|
||
| // This function can be marked `async` if using `await` inside | ||
| export function middleware(request: NextRequest) { | ||
| export function proxy(request: NextRequest) { |
There was a problem hiding this comment.
Rename to proxy breaks redirect validation CI script
Medium Severity
The rename from src/middleware.ts to src/proxy.ts broke scripts/check-redirects-on-rename.ts, which still hardcodes src/middleware.ts in 7 places (file path, git diff check, git show). The parseMiddlewareTs function gracefully returns empty arrays when the file doesn't exist, so the CI redirect validation silently skips all redirects in the proxy file. The error message in scripts/no-vercel-json-redirects.mjs was updated to reference proxy.ts, but the functional check-redirects script was missed.
Additional Locations (1)
|
Leaving this here for posterity: |

