Skip to content

Demos/next js 16#54

Merged
mschristensen merged 5 commits intomainfrom
demos/next-js-16
Apr 14, 2026
Merged

Demos/next js 16#54
mschristensen merged 5 commits intomainfrom
demos/next-js-16

Conversation

@mschristensen
Copy link
Copy Markdown
Collaborator

@mschristensen mschristensen commented Apr 14, 2026

Upgrade both Vercel React demos (use-chat and use-client-transport) from Next.js 15 to Next.js 16, which defaults to Turbopack.

What changed

  • Next.js 15 → 16: Bumped next and eslint-config-next to ^16 in both demos. Turbopack is now the default bundler, replacing webpack.
  • Removed webpack config: The custom webpack config that resolved .js.ts extension aliases for the symlinked SDK is no longer needed — Turbopack handles this natively.
  • Set turbopack.root: Next.js 16 infers the workspace root by walking up to the topmost lockfile, which lands outside the repo. Explicitly setting turbopack.root to the repo root gives the correct resolution scope for the file:-linked @ably/ai-transport dependency.
  • tsconfig.json updates: Next.js 16 regenerated config — jsx: "react-jsx" replaces "preserve", added .next/dev/types/**/*.ts to includes, reformatted arrays.
  • Dropped .js extensions in local imports: route.ts files in both demos import ./tools instead of ./tools.js, matching Turbopack's resolution.

@mschristensen mschristensen marked this pull request as ready for review April 14, 2026 18:20
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 92.89% 2015 / 2169
🔵 Statements 91.09% 2158 / 2369
🔵 Functions 93.83% 365 / 389
🔵 Branches 78.29% 909 / 1161
File CoverageNo changed files found.
Generated in workflow #111 for commit 3fe8c1b by the Vitest Coverage Report Action

mschristensen and others added 4 commits April 14, 2026 19:32
Bump next and eslint-config-next from ^15 to ^16. Remove the webpack
extensionAlias config since Turbopack handles .js → .ts resolution
natively. Drop the .js suffix from the local tools import. The
tsconfig.json changes are auto-generated by Next.js 16.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bump next and eslint-config-next from ^15 to ^16. Remove the webpack
extensionAlias config since Turbopack handles .js → .ts resolution
natively. Drop the .js suffix from the local tools import. The
tsconfig.json changes are auto-generated by Next.js 16.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Next.js 16 infers the workspace root by walking up to the topmost
lockfile, which lands on ~/package-lock.json. Setting turbopack.root
to the repo root gives the correct resolution scope for the symlinked
@ably/ai-transport dependency.
Without the `body` option, the server route receives `id: undefined`
and creates a channel outside the `ai:` namespace, which doesn't have
`mutableMessages` enabled. Match the use-client-transport demo by
including `id: chatId` in the transport body.
Copy link
Copy Markdown
Contributor

@ttypic ttypic left a comment

Choose a reason for hiding this comment

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

LGTM

@ttypic ttypic self-requested a review April 14, 2026 18:43
@mschristensen mschristensen merged commit cf84c28 into main Apr 14, 2026
11 checks passed
@mschristensen mschristensen deleted the demos/next-js-16 branch April 14, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants