Skip to content

chore(web): Upgrade to next 16#970

Merged
brendan-kellam merged 4 commits intomainfrom
bkellam/upgrade-next
Mar 1, 2026
Merged

chore(web): Upgrade to next 16#970
brendan-kellam merged 4 commits intomainfrom
bkellam/upgrade-next

Conversation

@brendan-kellam
Copy link
Contributor

@brendan-kellam brendan-kellam commented Mar 1, 2026

Summary by CodeRabbit

  • Chores
    • Upgraded Next.js to v16 along with React, TypeScript tooling, ESLint, and Sentry (v10.40.0).
  • Performance / Runtime
    • Forced runtime rendering for app root to ensure dynamic responses.
  • Stability
    • Simplified server-side data fetching and error handling for more predictable behavior.

@github-actions

This comment has been minimized.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 1, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fdf4b66 and 53ed310.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (9)
  • packages/web/.eslintignore
  • packages/web/.eslintrc.json
  • packages/web/eslint.config.mjs
  • packages/web/package.json
  • packages/web/src/app/[domain]/chat/[id]/opengraph-image.tsx
  • packages/web/src/app/[domain]/components/navigationMenu/trialIndicator.tsx
  • packages/web/src/app/error.tsx
  • packages/web/src/features/chat/components/chatThread/answerCard.tsx
  • packages/web/src/lib/utils.ts

Walkthrough

Bump Next.js to 16 and related deps (React, Sentry, ESLint tooling); remove some Sentry options; switch page data fetch to direct Prisma query and force dynamic rendering; simplify org data error handling; rename middleware → proxy; migrate ESLint config to module and adjust ignores/overrides.

Changes

Cohort / File(s) Summary
Changelog
CHANGELOG.md
Added "Updated to Next.JS 16." entry under Unreleased.
Package dependencies
packages/web/package.json
Upgraded next to 16.1.6, react/react-dom to 19.2.4, @sentry/nextjs to 10.40.0, updated related types and eslint/tooling versions and resolutions.
Next/Sentry config & TS
packages/web/next.config.mjs, packages/web/tsconfig.json
Removed Sentry options reactComponentAnnotation, disableLogger, automaticVercelMonitors; changed TS jsx from preservereact-jsx.
App entry / data fetching
packages/web/src/app/page.tsx, packages/web/src/data/org.ts
page.tsx now exports dynamic = 'force-dynamic' and uses prisma.org.findUnique for org lookup; src/data/org.ts removed try/catch and returns Prisma result directly.
Proxy middleware rename
packages/web/src/proxy.ts
Renamed exported function middlewareproxy (same signature and behavior).
ESLint migration & ignores
packages/web/.eslintrc.json, packages/web/eslint.config.mjs, packages/web/.eslintignore
Deleted legacy .eslintrc.json; added eslint.config.mjs with combined presets, custom overrides and ignores; removed several paths from .eslintignore so they are now linted.
Minor lint/comment tweaks
packages/web/src/... (several files) src/app/[domain]/chat/.../opengraph-image.tsx, trialIndicator.tsx, error.tsx, answerCard.tsx, src/lib/utils.ts
Removed/added several ESLint directive comments and small whitespace changes — no logic changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • chore(web): Upgrade to next 16 #970 — Mirrors the same Next.js/React/Sentry upgrade and identical edits across changelog, package.json, next.config.mjs, app/page, data/org, proxy, tsconfig, and ESLint files.
🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(web): Upgrade to next 16' directly and clearly summarizes the main change: upgrading Next.js to version 16, which is confirmed by the package.json changes (next 15.5.10 → 16.1.6) and CHANGELOG entry.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bkellam/upgrade-next

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.

🧹 Nitpick comments (2)
packages/web/src/app/page.tsx (1)

4-4: Prefer reusing getOrgFromDomain to avoid duplicated org lookup logic.

This page now duplicates query logic already present in packages/web/src/data/org.ts. Centralizing on one helper reduces drift risk.

♻️ Proposed refactor
-import { prisma } from "@/prisma";
+import { getOrgFromDomain } from "@/data/org";
@@
-    const org = await prisma.org.findUnique({
-        where: {
-            domain: SINGLE_TENANT_ORG_DOMAIN
-        }
-    });
+    const org = await getOrgFromDomain(SINGLE_TENANT_ORG_DOMAIN);

Also applies to: 14-18

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/web/src/app/page.tsx` at line 4, The page is duplicating org lookup
logic; replace the direct Prisma query in page.tsx with a call to the existing
helper getOrgFromDomain (from packages/web/src/data/org.ts) to centralize lookup
logic, remove the duplicated Prisma query, and add the appropriate import for
getOrgFromDomain; ensure any downstream usage (variables returned from the
original query) is adapted to the shape returned by getOrgFromDomain so behavior
remains unchanged.
packages/web/package.json (1)

166-168: Align eslint-plugin-react-hooks with React 19.2 guidance by upgrading to v6+.

React is upgraded to 19.2.4, and React 19.2 documentation explicitly recommends eslint-plugin-react-hooks v6+. Your project currently uses v5.2.0 with ESLint 8. While v5.2.0 still functions, v6+ is the recommended path forward for React 19.2 tooling alignment (v6+ is designed for ESLint 9 and flat config). Upgrading to v6+ will ensure you stay aligned with React's current best practices.

🔧 Proposed fix
   "devDependencies": {
-    "eslint-plugin-react-hooks": "^5.2.0",
+    "eslint-plugin-react-hooks": "^6.0.0",
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/web/package.json` around lines 166 - 168, Update the dependency
"eslint-plugin-react-hooks" from v5.2.0 to a v6+ release (e.g. ^6.0.0) in
package.json and reinstall dependencies (npm/yarn/pnpm) so the project uses the
plugin aligned with React 19.2.4; after upgrading, run the linter and fix any
rule-name or config warnings (adjust ESLint config if needed for plugin v6
compatibility) and ensure CI lint step still passes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/web/package.json`:
- Around line 166-168: Update the dependency "eslint-plugin-react-hooks" from
v5.2.0 to a v6+ release (e.g. ^6.0.0) in package.json and reinstall dependencies
(npm/yarn/pnpm) so the project uses the plugin aligned with React 19.2.4; after
upgrading, run the linter and fix any rule-name or config warnings (adjust
ESLint config if needed for plugin v6 compatibility) and ensure CI lint step
still passes.

In `@packages/web/src/app/page.tsx`:
- Line 4: The page is duplicating org lookup logic; replace the direct Prisma
query in page.tsx with a call to the existing helper getOrgFromDomain (from
packages/web/src/data/org.ts) to centralize lookup logic, remove the duplicated
Prisma query, and add the appropriate import for getOrgFromDomain; ensure any
downstream usage (variables returned from the original query) is adapted to the
shape returned by getOrgFromDomain so behavior remains unchanged.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a2f80a2 and fdf4b66.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (7)
  • CHANGELOG.md
  • packages/web/next.config.mjs
  • packages/web/package.json
  • packages/web/src/app/page.tsx
  • packages/web/src/data/org.ts
  • packages/web/src/proxy.ts
  • packages/web/tsconfig.json
💤 Files with no reviewable changes (1)
  • packages/web/next.config.mjs

@brendan-kellam brendan-kellam merged commit c2863ed into main Mar 1, 2026
6 of 7 checks passed
@brendan-kellam brendan-kellam deleted the bkellam/upgrade-next branch March 1, 2026 03:49
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