Upgrade to Next.js 16, React 19.2.6#765
Conversation
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
There was a problem hiding this comment.
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.
| "use cache"; | ||
|
|
||
| import { cacheLife } from "next/cache"; | ||
| import { config } from "@/config"; |
There was a problem hiding this comment.
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.
What changed
turbopackModuleIdsto theexperimentalblock and enable filesystem cache for devdevguardWebsiteUrlto a shared config constantdisableLogger,automaticVercelMonitors) and update to Sentry v10 configWhy
experimentaland introduces PPR as a first-class featureCloses issue #1996