Turn document ยท 2026-05-19

Upgrade apps/web to Next.js 16.2.6

The web app now builds and passes focused validation on Next.js 16.2.6 with React 19. The change keeps route behavior and synthetic admin proxy behavior intact while refreshing the root and Docker workspace Bun lockfiles.

Summary

Upgraded apps/web from the Next 14 / React 18 stack to Next 16.2.6 and React 19.2.x. The Bun lockfile was refreshed, the Docker workspace lock snapshot was synced, and a React 19 nullable ref type issue exposed by the Next 16 build was fixed.

Changes Made

Context

The requested upgrade was intentionally dependency-focused. No routes, backend contracts, environment variable names, or shared package exports were changed. Before editing, the web build and the targeted route tests passed on the previous locked Next 14.2.35 stack.

Important Implementation Details

No broad codemod was run. The only source-code change was a targeted type correction in apps/web/app/terminal.tsx. Next 16's build now runs with Turbopack by default in this project and completed successfully after the ref typing was narrowed to the actual nullable runtime value.

The Docker workspace sync changed the mirrored lockfile, but did not need to rewrite the mirrored package manifest or TypeScript base config.

Relevant Diff Snippets

"next": "^16.2.6",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3"
type ListScrollState = {
  listRef: React.RefObject<HTMLDivElement | null>;
  listNode: HTMLDivElement | null;
  setListRef: (node: HTMLDivElement | null) => void;
};

Expected Impact for End-Users

There should be no intentional user-facing behavior change. The expected visible behavior remains: /, /tape, and /news render the terminal app; /signals, /charts, and /replay redirect to /; synthetic admin API routes keep their gated proxy behavior.

Validation

Issues, Limitations, and Mitigations

During dev:web smoke testing, the browser logged a live socket channel validation warning because only the web app was running, not the full backend service stack. Route rendering, redirect behavior, and gated synthetic admin proxy behavior were still verified. A full-stack live feed verification can be done separately with bun run dev if needed.

The upgrade did not include a full monorepo test run because the acceptance bar was intentionally web-focused.

Follow-up Work

Helpful Links