Repository navigation
Open
Labels
Description
Needs your OK: this is waiting on a Next upgrade whose bundled React has the fix. Nothing people see changes. Swap pipeline:proposed for pipeline:ready once you've picked an option below and want it built.
What happens
- The symptom. The e2e test "signing out" in
tests/e2e/root-layouts.spec.ts("lands on the home page, and /app then asks to sign in") fails now and then withMinified React error #418(args[]=HTML), a hydration error. The test collects console errors and expects none. - It isn't about signing out. The trace shows the error comes while
page.goto('/app')hydrates Your signups, before the Sign out click. - How often:
- alone, with the reseed's 8 signups: 0 of 120 runs;
- with the seeded organizer at about 60 signups, as partway through a full e2e run, with
--workers=2on a loaded machine: 7 of 60 (about 12%).
- Seen before in this project:
- a 13-slot English signup page (
/s/[slug]): 9 of 180 loads onmainbefore the localization work (Epic: OpenSignup in Swedish, and other languages after it #619), and 33 of 180 on the localization stack; - organizer signup pages too;
- Test the organizer app in every test language #1016's first full e2e run, where it passed on a second run.
- a 13-slot English signup page (
- Who it affects. Nobody sees a broken page: React recovers by rendering that part again in the browser. The cost is a flaky CI job, an error in the console, and a wasted client re-render on the pages with the longest lists.
Why
- It's a bug in the React that Next bundles: Bug: A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. react/react#35210.
- What goes wrong. When hydration starts before the browser has read all of the page's inline data, a
<ul>waits for a list item that hasn't arrived yet. React then retries the<ul>without moving back its place in the server HTML, so it compares the wrong nodes and reports a mismatch that isn't there. - Why long lists. Your signups is one
<ul>with an<li>per signup (src/app/(organizer)/app/(chrome)/page.tsx), and a public signup is one<ul>of slots (src/app/s/[slug]/signup-view.tsx). More items and a busier machine make the gap more likely. - The upstream fix. [Fiber] Correctly handle replaying when hydrating react/react#35494, merged on 13 January 2026, released in React 19.3.
- Where we are.
mainuses Next 15.5.29, which bundles React19.2.0-canary-0bdb9206-20250818, from before the fix. 15.5.29 is the newest 15.x (npm'sbackporttag), so no 15.x release has the fix. - Where the fix is. Next 16.4.6, npm's
latesttoday, bundles React19.3.0-canary-278794d7-20261002, built well after the fix landed. - The
reactpin doesn't decide this. App Router pages run the copy bundled inside Next (next/dist/compiled/react-dom), not thereactandreact-dominpackage.json.
Evidence
- The fix makes it go away. With React's fix patched into the built JavaScript, as a local test only and not committed, the same loop failed 0 of 60 under the same load, against 7 of 60 without it.
- How to reproduce:
- Postgres up, migrations applied, then
pnpm build. - A scratch Playwright config whose
globalSetupruns the normal reseed (seedE2EandclearSignInRateLimitsfromtests/e2e/helpers/seed.ts), then gives the seeded organizer about 55 more signups throughcreateSignup, publishing every other one with one slot. That's roughly what a full e2e run leaves them with. - Run the test many times with two workers, on a loaded machine, clearing
rate_limitsbetween batches:pnpm exec playwright test -c playwright.flake.config.ts tests/e2e/root-layouts.spec.ts \ -g 'signing out' --project=chromium --repeat-each=30 --workers=2 --trace retain-on-failure
- Expect a few failures in 60, each
Minified React error #418withargs[]=HTML, logged while/apphydrates.
- Postgres up, migrations applied, then
Fix, in outline
Two ways to get React's fix:
- Upgrade Next to a 16.x release whose bundled React has it. 16.4.6 does. It's a major upgrade with its own breaking changes, so it's a PR of its own, and a high-risk one under the pipeline's rules (a dependency's major version).
pnpm patchNext's bundled react-dom with the upstream fix. Small, but it's a patch on minified vendor code. It pins the exact Next version, and has to be dropped or redone on every Next update.
Choices this makes
- Wait, then option 1. The owner chose to leave the code alone until a Next release with the fixed React is taken on. No 15.x release will have it, so in practice that's the Next 16 upgrade.
Watch for
- Until then, a test that fails with React error 418 (
args[]=HTML) under load is this bug, not the test. Don't loosen the "no console errors" check or add retries to hide it. - Page "Your signups" so every signup in a workspace can be reached #871 pages Your signups. Shorter lists on
/appmay make the sign-out test flake less there, but long signup pages keep the bug. - A Next major upgrade moves more than this. Read its upgrade guide, and check the page JavaScript against
budgets.jsonafterpnpm build: raising a budget goes to the owner.
Done when
- The app runs a React with [Fiber] Correctly handle replaying when hydrating react/react#35494 in it: the version string in
node_modules/next/dist/compiled/react-dom/cjs/react-dom-client.production.jsis a 19.3 canary built after 13 January 2026, or the patch is applied. - The repro above fails 0 of 60 where it failed about 7 of 60 before.
pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test,pnpm test:db,pnpm build && pnpm budgetsandpnpm test:e2epass.
From an investigation of the flaky "signing out" e2e test, checked against main at be771ff (Next 15.5.29). Checked by repeated runs of that test with and without React's fix patched in, and by reading the React version each Next release bundles. https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Activity