Skip to content

chore(frontend): upgrade to Next.js 16 - #248

Open
IanHollow wants to merge 2 commits into
Anyesh:mainfrom
IanHollow:chore/frontend-next-16
Open

IanHollow wants to merge 2 commits into
Anyesh:mainfrom
IanHollow:chore/frontend-next-16

Conversation

@IanHollow

@IanHollow IanHollow commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Upgrade the frontend from Next.js 14 to 16.3.8. The App Router upgrade also moves React and React DOM to 19.3.0. Update NextAuth to its current v4 release and Lucide to a version that supports React 19.

The upgrade replaces the removed next lint command with the ESLint CLI and a flat config. It moves the Next config to TypeScript, removes options that Next 16 no longer accepts, and lets the production build check TypeScript. The existing standalone output and runtime API proxy remain in place. Contributor guidance now states Next's Node.js minimum.

Type of change

  • CI/CD or build changes
  • Refactoring (no intended user-facing change)

Checklist

  • Read CONTRIBUTING.md and the Next.js 15 and 16 upgrade guides.
  • Updated the lockfile without peer dependency overrides.
  • Updated the TypeScript and lint configuration for Next 16.
  • Ran the frontend checks and a standalone server smoke test.

Testing

  • npm ci completed without peer dependency overrides.
  • npm run typecheck, npm run lint, npm run i18n:check, and npm run vocab:check passed.
  • npm test -- --run passed: 19 test files, 194 tests.
  • npm run build passed with Turbopack and TypeScript validation.
  • The standalone server returned HTTP 200 for /, /login, and /api/auth/providers.
  • git diff --check passed.

Docker was unavailable locally, so I tested the standalone output directly. The new ESLint preset reports 79 warnings in existing code. Five newly enforced rules are set to warning severity so this framework upgrade does not require unrelated UI changes; lint still fails on all other errors.

Additional notes

PRs #237 and #246 also change the frontend package files. Whichever merges second will need a rebase and another install/build check.

Summary by Sourcery

Upgrade the frontend toolchain to Next.js 16 and React 19 while modernizing its build, lint, and type-check configuration.

Enhancements:

  • Upgrade the frontend to Next.js 16 with React 19 and compatible NextAuth and Lucide dependencies.
  • Adopt Next.js 16-compatible TypeScript, ESLint flat configuration, and typed Next configuration while preserving standalone builds and runtime API proxying.

Build:

  • Replace the removed Next.js lint command with the ESLint CLI and add a dedicated TypeScript typecheck script.

Documentation:

  • Document the updated Node.js requirement and frontend typecheck command.

Tests:

  • Update affected TypeScript code and tests for the upgraded toolchain.

Chores:

  • Refresh frontend dependencies and lockfile for the framework upgrade.

@sourcery-ai

sourcery-ai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Sorry @IanHollow, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 6 days and 1 hour by commenting @sourcery-ai review. Upgrade to get a review now.

@github-actions github-actions Bot added the javascript Pull requests that update javascript code label Oct 5, 2026
@sourcery-ai

sourcery-ai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Reviewer's Guide

Upgrades the frontend from Next.js 14/React 18 to Next.js 16.3.8/React 19.3, migrating configuration and linting to the Next 16-compatible TypeScript and ESLint 9 flat-config setup while preserving standalone deployment and the runtime API proxy. Supporting type fixes, dependency lockfile updates, documentation, and contributor workflow changes are included.

Flow diagram for the Next.js 16 frontend validation workflow

flowchart LR
    Install[npm ci] --> Typecheck[npm run typecheck]
    Install --> Lint[npm run lint]
    Install --> Build[npm run build]
    Build --> Smoke[Standalone server smoke test]
Loading

File-Level Changes

Change Details Files
Upgrade the frontend framework, React runtime, and related ecosystem packages to Next.js 16.
  • Move Next.js from 14.2.35 to 16.3.8 and React/React DOM from 18.2 to 19.3.
  • Update NextAuth, Lucide, ESLint, and Next ESLint configuration packages for compatibility.
  • Refresh the lockfile without peer-dependency overrides.
frontend/package.json
frontend/package-lock.json
Replace deprecated Next linting and adapt the project to ESLint 9 flat configuration.
  • Replace next lint with the ESLint CLI and add a dedicated typecheck script.
  • Remove the legacy ESLint config and define Next Core Web Vitals and TypeScript flat presets.
  • Keep five newly surfaced React/framework rules at warning severity while preserving errors for other violations.
frontend/.eslintrc.json
frontend/eslint.config.mjs
frontend/package.json
Migrate and simplify Next.js configuration for Next 16 while preserving deployment behavior.
  • Convert next.config.js to typed next.config.ts and remove unsupported configuration.
  • Retain standalone output and unoptimized images; keep the runtime API proxy in the route handler so BACKEND_URL is resolved per request.
  • Update generated Next type references and TypeScript inclusion settings.
frontend/next.config.js
frontend/next.config.ts
frontend/app/api/v1/[...path]/route.ts
frontend/next-env.d.ts
frontend/tsconfig.json
Resolve React 19 and stricter TypeScript compatibility issues in application and test code.
  • Use typed next-intl translators instead of any in outfit-card helpers.
  • Convert empty props interfaces to type aliases and make a test variable immutable.
frontend/components/outfits/outfit-card.tsx
frontend/components/ui/input.tsx
frontend/components/ui/textarea.tsx
frontend/tests/upload-manager.test.ts
Update contributor and user documentation for the new frontend workflow and runtime requirements.
  • Document Node.js 20.9+ for frontend development, with CI and Docker using Node.js 24.
  • Direct contributors to the new npm run typecheck command.
CONTRIBUTING.md
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

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

Labels

javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants