Skip to content

Upgrade to Next.js 16, React 19.2.6#765

Open
Konstantin-Zhukov wants to merge 10 commits into
mainfrom
next-migration
Open

Upgrade to Next.js 16, React 19.2.6#765
Konstantin-Zhukov wants to merge 10 commits into
mainfrom
next-migration

Conversation

@Konstantin-Zhukov
Copy link
Copy Markdown
Collaborator

@Konstantin-Zhukov Konstantin-Zhukov commented May 27, 2026

What changed

  • Upgrade Next.js from 15 to 16.2.6 and React from 19.2.4 to 19.2.6
  • Migrate turbopackModuleIds to the experimental block and enable filesystem cache for dev
  • Add Partial Pre-Rendering (PPR) Cache Components support in layouts
  • Extract devguardWebsiteUrl to a shared config constant
  • Remove deprecated Sentry options (disableLogger, automaticVercelMonitors) and update to Sentry v10 config

Why

  • Next.js 16 moves several Turbopack options under experimental and introduces PPR as a first-class feature

Closes issue #1996

move turbopackModuleIds to experimental (was silently ignored in turbopack object)
enable turbopackFileSystemCacheForDev for faster dev restarts
remove deprecated Sentry options (disableLogger, automaticVercelMonitors) — both were no-ops under Turbopack
Replaces the hardcoded "https://devguard.org" string with a single
config entry backed by DEVGUARD_WEBSITE_URL env var. Used by both the
landing-page tunnel handler and fetchLatestScannerImage.
- Enable cacheComponents: true in next.config.js
- Cache fetchLatestScannerImage with "use cache" + cacheLife("hours")
  so the external devguard.org call is skipped on subsequent requests
- Refactor RootLayout and OrganizationLayout to sync shell + async
  Shell component inside <Suspense>, required because cookies() is a
  dynamic API that cannot run during static shell generation
- Remove debug console.log and dead webpack topLevelAwait config
move turbopackModuleIds to experimental (was silently ignored in turbopack object)
enable turbopackFileSystemCacheForDev for faster dev restarts
remove deprecated Sentry options (disableLogger, automaticVercelMonitors) — both were no-ops under Turbopack
Replaces the hardcoded "https://devguard.org" string with a single
config entry backed by DEVGUARD_WEBSITE_URL env var. Used by both the
landing-page tunnel handler and fetchLatestScannerImage.
- Enable cacheComponents: true in next.config.js
- Cache fetchLatestScannerImage with "use cache" + cacheLife("hours")
  so the external devguard.org call is skipped on subsequent requests
- Refactor RootLayout and OrganizationLayout to sync shell + async
  Shell component inside <Suspense>, required because cookies() is a
  dynamic API that cannot run during static shell generation
- Remove debug console.log and dead webpack topLevelAwait config
…b into next-migration

# Conflicts:
#	package-lock.json
#	package.json
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the app to Next.js 16 / React 19.2.6 and adjusts related configuration for Turbopack, cache components, linting, and shared website URL configuration.

Changes:

  • Updates Next.js, React, eslint-config-next, and lockfile dependency graph.
  • Enables cache components and moves Turbopack module/cache settings into the experimental config.
  • Refactors layouts to use Suspense boundaries and centralizes the DevGuard website URL in config.

Reviewed changes

Copilot reviewed 7 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tsconfig.json Updates JSX compiler setting and reformats JSON arrays.
src/pages/api/landing-page-tunnel/[...path].ts Uses the shared DevGuard website URL config for tunnel forwarding.
src/data-fetcher/fetchOrgs.ts Removes debug logging/comment.
src/data-fetcher/fetchLatestScannerImage.ts Adds cache-components caching and switches latest-image fetch URL.
src/config.ts Adds devguardWebsiteUrl config value.
src/app/layout.tsx Splits session loading into a Suspense-wrapped async shell.
src/app/(loading-group)/[organizationSlug]/layout.tsx Splits organization loading into a Suspense-wrapped async shell.
package.json Updates framework/lint package versions and lint command.
package-lock.json Refreshes dependency graph for upgraded packages.
next.config.js Updates Turbopack/cache component config and removes deprecated Sentry options.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to +6
"use cache";

import { cacheLife } from "next/cache";
import { config } from "@/config";
Copy link
Copy Markdown
Collaborator Author

@Konstantin-Zhukov Konstantin-Zhukov May 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bundle compiles successfully, and caching works as expected as well.
At the file level, "use cache" creates a server reference using the same createServerReference / callServer mechanism as "use server".
For "use cache" modules, Next.js replaces the import with a stub at build time, so this restriction is never triggered.

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.

2 participants