Upgrade Next.js and add page smoke tests
Summary
- upgrade Next.js to stable 16.2.10, React/React DOM to 19.2.7, and the OpenNext Cloudflare adapter to 1.20.1
- remove the deprecated PostHog middleware convention that produced the Next.js warning and could not migrate to Node-only Proxy on OpenNext Cloudflare
- add a self-discovering Playwright production smoke suite covering every registered static page, agent, blog post, current/legacy docs page, product docs page, redirect alias, and invite-page shape
Why
Next.js 16 deprecates middleware.ts in favor of Node.js proxy.ts, while the current OpenNext Cloudflare adapter rejects Node.js Proxy. The existing PostHog client already sends analytics through its configured ingest host, so removing the unused middleware path resolves the warning without breaking the deploy target.
The page suite provides upgrade protection by asserting successful HTTP responses, visible meaningful content, document titles, absence of application-error output, and clean browser hydration across the generated route inventory.
Validation
npm test— 82 tests passednpm run build— passed on Next.js 16.2.10npm --workspace web run cf:build— OpenNext Cloudflare bundle completednpm --workspace web run test:e2e— 271 Chromium page checks passed
Summary by cubic
Upgraded next to 16.2.10 and react/react-dom to 19.2.7, added a Playwright page smoke suite, and removed the deprecated PostHog middleware.ts to resolve Next 16 warnings and Cloudflare incompatibility.
-
New Features
- Added self-discovering Playwright smoke tests for static pages, agents, blog posts, current/legacy/product docs (including versioned paths), redirect aliases, and invite pages.
- Each page is checked for a successful response, visible meaningful content, a non-empty title, no “Application error”, and now explicitly waits for load and initial hydration before assertions to catch uncaught errors.
- Config builds and starts the app on port 3100, runs Chromium tests, and in CI enables retries and the GitHub reporter. Run with:
npm --workspace web run test:e2e. - Updated
next-env.d.tsto the new Next 16 route types path to remove the dev-only reference.
-
Dependencies
- Upgraded
nextto 16.2.10. - Upgraded
reactandreact-domto 19.2.7. - Upgraded
@opennextjs/cloudflareto 1.20.1 and added@playwright/test(dev).
- Upgraded