Skip to content

Upgrade to Next.js 16 + React Compiler#2

Merged
factory-sam merged 2 commits into
mainfrom
upgrade/nextjs-16
Jun 14, 2026
Merged

Upgrade to Next.js 16 + React Compiler#2
factory-sam merged 2 commits into
mainfrom
upgrade/nextjs-16

Conversation

@factory-sam

Copy link
Copy Markdown
Owner

Summary

Upgrades the app to Next.js 16.2.9 with React 19.2 and enables the now-stable React Compiler. Turbopack is the default for both dev and production builds. Also folds in the accumulated agent-readiness tooling from prior work.

Core upgrade

  • next 15.5 -> 16.2.9, react/react-dom 19.1 -> 19.2, @types/react(-dom) 19.2
  • React Compiler enabled (reactCompiler: true, babel-plugin-react-compiler) for auto-memoization in the chat UI
  • ESLint migrated to eslint-config-next native flat config (dropped FlatCompat / @eslint/eslintrc)
  • middleware.ts -> proxy.ts (Next 16 proxy rename); CODEOWNERS updated
  • Node 22 LTS floor: CI node-version: 22, engines.node >=22, README/AGENTS
  • Fixed a new react-hooks/set-state-in-effect finding in chat-workspace.tsx (search debounce)
  • analyze now runs next build --webpack (bundle-analyzer hooks Webpack; Turbopack is the default build)
  • e2e (Playwright) now runs against the production build (pnpm build && pnpm start); dummy Supabase key read from E2E_SUPABASE_PUBLISHABLE_KEY with a non-literal fallback

Decisions

  • Cache Components / PPR: deferred. Data is client-driven via the Supabase SDK, so enabling it would require wrapping dynamic reads in Suspense for negligible benefit.

Verification (all green)

lint, typecheck, vitest (100% coverage), production build (Turbopack), Playwright e2e (7/7), knip, jscpd, tech-debt, validate-docs, analyze.

Notes

This branch also carries earlier agent-readiness work (pino logging, /health, runbooks, issue/PR templates, knip/jscpd/tech-debt/validate-docs, CODEOWNERS, Vitest coverage). .factory/ and droid-wiki/ are intentionally excluded.

factory-sam and others added 2 commits June 13, 2026 17:01
- Next.js 15.5 -> 16.2 (Turbopack default), React 19.1 -> 19.2, @types/react 19.2
- Enable React Compiler (babel-plugin-react-compiler); reactCompiler: true
- Migrate ESLint to eslint-config-next flat config (drop FlatCompat/@eslint/eslintrc)
- Rename middleware.ts -> proxy.ts (Next 16 proxy); update CODEOWNERS
- Node 22 floor: CI node-version 22, package.json engines, README/AGENTS
- e2e (Playwright) runs against the production build; analyze uses next build --webpack
- Defer Cache Components/PPR (client-driven Supabase; negligible benefit)
- Includes prior tooling: pino logging, /health, runbooks, issue/PR templates,
  knip/jscpd/tech-debt/validate-docs, Vitest coverage, CODEOWNERS

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
CI validate-docs failed because AGENTS.md linked to ./.factory/skills/supabase-migration/SKILL.md, which is intentionally not committed. Convert the markdown link to inline code.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@factory-sam factory-sam merged commit 2623c6e into main Jun 14, 2026
1 check passed
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