Skip to content

test(web): pin #4372, a rejected streamed fragment emptying a text-only region - #4389

Merged
ryansolid merged 12 commits into
nextfrom
claude/project-thread-x1ore2-4372
Oct 29, 2026
Merged

ryansolid merged 12 commits into
nextfrom
claude/project-thread-x1ore2-4372

Conversation

@ryansolid

@ryansolid ryansolid commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Covers #4372, which is fixed by #4382. This PR is stacked on #4382's branch: merge #4382 first. After that, this PR's diff is tests only.

Before. <main><Errored fallback={() => "[ERR]"}><Loading fallback="[LOAD]"><span>{m()}</span></Loading></Errored></main>, where m rejects after the shell. When the client hydrates the shell and the rejected fragment arrives later (the normal streaming order), insertExpression throws TypeError: Cannot set properties of null (setting 'data'). The reactive system halts with REACTIVITY_HALTED and <main> is left empty.

After. Each case shows its outcome ([ERR] or !a). Nothing throws, reactivity stays up, and the client never asks again.

How. An earlier version of this PR changed solid's hydration.ts (+42 B). #4382's reclaimRegion change fixes the same root cause in @solidjs/web: a hole holding the fallback's raw string re-claims its region after the swap. It also covers a case the hydration.ts change missed, where a non-text node sits in the region. So the hydration.ts change, its changeset and its ledger edits are dropped, and only the tests stay.

How did you test this change?

  • packages/web/test/hydration/errored-outside-loading-4372.spec.tsx (hydrate config, real bootstrap via harness/hydration-bootstrap.ts). It covers 5 shapes (app, inner, sibling, element, text), each hydrated both after and before the chunk. On next, app, inner and text before the chunk fail. With fix(web): a hydrating hole holding a raw string re-claims its region (#4374) #4382, all 10 pass.
  • The artifacts are recorded by a new block in test/server/hydration-harness.spec.tsx.
  • packages/web/test/insert-sole-text-removed-4372.spec.tsx stays pinned as test.fails: code outside Solid that removes a sole text child by hand still breaks the next write.

Suites, after merging next @ 957f065 and #4382, then a clean turbo build --force:

  • web default: 1534 passed
  • web hydrate: 707 passed, plus 1 known flake (served-error-no-reask "[streamed] the content waits for its sheet")

Size: no source change beyond #4382.

🤖 Generated with Claude Code

https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2

…4374)

A `<Loading>` with a bare-string fallback, the sole content of a
markerless parent, leaves the hole's `current` as that string after the
root pass. `reclaimRegion` bailed for non-node currents, so after the
streamed `$df` swap the content pass reconciled against the stale string:
the server's text stayed beside a fresh copy (a nested Errored's fallback
rendered twice), or text after an element moved or was replaced instead
of adopted. While hydrating, a disconnected-or-primitive `current` now
re-claims the region, as it does when the nodes it tracks are gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
…d its node (#4372)

An Errored outside a streamed Loading whose fragment rejects: the client
hydrated the shell, so the root insert tracked the claimed fallback's
text ("[LOAD]") as a sole text child. The fragment's swap replaced that
node, and the rejected fragment's fresh render cleared what the swap put
in, so the Errored's fallback text was written to `parent.firstChild`,
which was null: TypeError, REACTIVITY_HALTED, an empty <main>. The text
fast path now needs that node to exist; with none, the value is inserted
like a first one, as the element path already does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
@changeset-bot

changeset-bot Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cb53a88

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
Name Type
@solidjs/web Patch
@solidjs/babel-plugin Patch
@solidjs/diagnostics Patch
@solidjs/element Patch
@solidjs/h Patch
@solidjs/html Patch
test-integration Patch
board-example Patch
canvas-example Patch
server-dbmon-example Patch
todos-server-example Patch
@solidjs/compiler Patch
@solidjs/signals Patch
solid-js Patch
@solidjs/universal Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Size (brotli, eager entry chunk)

scenario head vs base minified vs base minified vs recorded cap lazy chunks (not counted)
signals: core floor (createSignal/Memo/Effect/Root/flush) 7.43 KB 0 B 0 B −150 B 7.44 KB ✅
signals: + createStore 14.94 KB 0 B 0 B −1373 B 15.04 KB ✅
signals: + isPending/latest 10.38 KB 0 B 0 B −40 B 10.38 KB ✅
signals: + until/refresh (truth readers, no optimism) 8.04 KB 0 B 0 B −154 B 8.05 KB ✅
app: render + one signal (the simple-app floor) 9.77 KB 0 B 0 B −210 B 9.75 KB ⚠️ over by 21 B, 230 B minified headroom
app: hydrating (no stores) with Show/For/Loading/Errored/lazy 18.68 KB −4 B (−0.0%) −3 B −164 B 18.49 KB ⚠️ over by 194 B, 184 B minified headroom lazy-page.js 0.04 KB
app: hydrating + every store primitive family 31.84 KB +42 B (+0.1%) −3 B −3 B 31.80 KB ⚠️ over by 40 B, 23 B minified headroom lazy-page.js 0.04 KB
app: CSR with Show/For/Loading/Errored/lazy 13.43 KB 0 B 0 B −201 B 13.40 KB ⚠️ over by 26 B, 221 B minified headroom lazy-page.js 0.04 KB
app: CSR, observe tier (same app on the observe artifacts) 15.16 KB 0 B 0 B −209 B 15.14 KB ⚠️ over by 22 B, 229 B minified headroom lazy-page.js 0.04 KB
app: CSR, observe tier + attribution engine enabled 29.75 KB 0 B 0 B −208 B 29.70 KB ⚠️ over by 47 B, 228 B minified headroom lazy-page.js 0.04 KB
app: compiled floor (one template, one text hole, one delegated click) 9.96 KB 0 B 0 B −209 B 9.93 KB ⚠️ over by 32 B, 229 B minified headroom
app: compiled CSR (JSX todo app: spread/merge/omit, events, class/style, keyed For, Show, Loading + lazy, store) 26.22 KB 0 B 0 B −526 B 26.27 KB ✅ stats.js 0.18 KB
app: compiled hydrating (the same JSX todo app through hydrate(), compiled hydratable) 32.39 KB −76 B (−0.2%) −3 B −431 B 32.25 KB ⚠️ over by 144 B, 451 B minified headroom stats.js 0.20 KB
frames: eager client consumer (frames client + transport, lazy codec) 11.75 KB 0 B 0 B 0 B 11.76 KB ✅
page: base server components (hydrating + dynamic + frames + sf reference) 33.60 KB +7 B (+0.0%) −3 B −85 B 33.37 KB ⚠️ over by 227 B, 105 B minified headroom assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 9.02 KB, wire.js 3.47 KB
page: live server components (base + live/GET + action + isPending/latest) 37.99 KB −38 B (−0.1%) −3 B −17 B 37.75 KB ⚠️ over by 240 B, 37 B minified headroom assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, trace.js 9.03 KB, wire.js 3.47 KB
page: compiled base server components (the base page as JSX: templates with class/style/attributes/events, For/Show; no spread) 35.62 KB −1 B (−0.0%) −3 B −74 B 35.43 KB ⚠️ over by 186 B, 94 B minified headroom assets.js 0.78 KB, decode.js 7.09 KB, regions.js 1.06 KB, sc-comments.js 0.20 KB, trace.js 9.00 KB, wire.js 3.47 KB
page: compiled live server components (the compiled base page + live/GET + action + isPending/latest) 41.90 KB −67 B (−0.2%) −3 B −3 B 41.56 KB ⚠️ over by 339 B, 23 B minified headroom eager (counted): web.js 22.41 KB; assets.js 0.78 KB, decode.js 7.09 KB, regions.js 1.07 KB, sc-comments.js 0.19 KB, trace.js 9.09 KB, wire.js 3.47 KB
page: base + router (base page + @solidjs/router: createRouter, two routes, preload, useNavigate) 41.13 KB +101 B (+0.2%) −3 B −85 B 40.81 KB ⚠️ over by 317 B, 105 B minified headroom assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.06 KB, server.js 1.03 KB, serverForms.js 3.57 KB, trace.js 9.01 KB, wire.js 3.48 KB
page: live + router (live page + @solidjs/router: createRouter, two routes, preload, useNavigate) 47.55 KB −2 B (−0.0%) −3 B −3 B 47.16 KB ⚠️ over by 385 B, 23 B minified headroom eager (counted): client.js 27.55 KB; assets.js 0.78 KB, decode.js 7.09 KB, lazy-page.js 0.04 KB, regions.js 1.07 KB, server.js 1.03 KB, serverForms.js 3.30 KB, trace.js 9.01 KB, wire.js 3.49 KB
server: floor (getRequestEvent + isServer) 1.27 KB 0 B 0 B −69 B 1.34 KB ✅
server: renderToString (the server-render floor) 22.79 KB 0 B 0 B 0 B 22.80 KB ✅

⚠️ Over the brotli cap within the minified allowance (passes)

  • app: render + one signal (the simple-app floor): over brotli cap by 21 B; minified 26,819 B vs 27,029 B recorded with the cap (−210 B) — 230 B of the 20 B minified allowance left; +0 B minified over this PR's base
  • app: hydrating (no stores) with Show/For/Loading/Errored/lazy: over brotli cap by 194 B; minified 53,456 B vs 53,620 B recorded with the cap (−164 B) — 184 B of the 20 B minified allowance left; −3 B minified over this PR's base
  • app: hydrating + every store primitive family: over brotli cap by 40 B; minified 97,042 B vs 97,045 B recorded with the cap (−3 B) — 23 B of the 20 B minified allowance left; −3 B minified over this PR's base
  • app: CSR with Show/For/Loading/Errored/lazy: over brotli cap by 26 B; minified 37,006 B vs 37,207 B recorded with the cap (−201 B) — 221 B of the 20 B minified allowance left; +0 B minified over this PR's base
  • app: CSR, observe tier (same app on the observe artifacts): over brotli cap by 22 B; minified 41,954 B vs 42,163 B recorded with the cap (−209 B) — 229 B of the 20 B minified allowance left; +0 B minified over this PR's base
  • app: CSR, observe tier + attribution engine enabled: over brotli cap by 47 B; minified 88,293 B vs 88,501 B recorded with the cap (−208 B) — 228 B of the 20 B minified allowance left; +0 B minified over this PR's base
  • app: compiled floor (one template, one text hole, one delegated click): over brotli cap by 32 B; minified 27,351 B vs 27,560 B recorded with the cap (−209 B) — 229 B of the 20 B minified allowance left; +0 B minified over this PR's base
  • app: compiled hydrating (the same JSX todo app through hydrate(), compiled hydratable): over brotli cap by 144 B; minified 100,613 B vs 101,044 B recorded with the cap (−431 B) — 451 B of the 20 B minified allowance left; −3 B minified over this PR's base
  • page: base server components (hydrating + dynamic + frames + sf reference): over brotli cap by 227 B; minified 101,474 B vs 101,559 B recorded with the cap (−85 B) — 105 B of the 20 B minified allowance left; −3 B minified over this PR's base
  • page: live server components (base + live/GET + action + isPending/latest): over brotli cap by 240 B; minified 115,200 B vs 115,217 B recorded with the cap (−17 B) — 37 B of the 20 B minified allowance left; −3 B minified over this PR's base
  • page: compiled base server components (the base page as JSX: templates with class/style/attributes/events, For/Show; no spread): over brotli cap by 186 B; minified 107,844 B vs 107,918 B recorded with the cap (−74 B) — 94 B of the 20 B minified allowance left; −3 B minified over this PR's base
  • page: compiled live server components (the compiled base page + live/GET + action + isPending/latest): over brotli cap by 339 B; minified 123,221 B vs 123,224 B recorded with the cap (−3 B) — 23 B of the 20 B minified allowance left; −3 B minified over this PR's base
  • page: base + router (base page + @solidjs/router: createRouter, two routes, preload, useNavigate): over brotli cap by 317 B; minified 125,302 B vs 125,387 B recorded with the cap (−85 B) — 105 B of the 20 B minified allowance left; −3 B minified over this PR's base
  • page: live + router (live page + @solidjs/router: createRouter, two routes, preload, useNavigate): over brotli cap by 385 B; minified 140,482 B vs 140,485 B recorded with the cap (−3 B) — 23 B of the 20 B minified allowance left; −3 B minified over this PR's base

Bundled with Rolldown (what Vite ships), brotli q11, decimal KB. A scenario fails only when it is over its brotli cap and its minified size is more than 20 B over the minified recorded with the cap; over the cap within that allowance is brotli layout noise and passes with a warning. Caps and their recorded minified in scripts/size/scenarios.js; the floor and page caps in floor-caps.json are frozen (lower only, or Size-Exception: in the PR body). npm run ratchet lowers caps per RC; it never raises one (scripts/size/README.md).

@coveralls

coveralls commented Oct 28, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 40800912527

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage remained the same at 78.516%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1355
Covered Lines: 1125
Line Coverage: 83.03%
Relevant Branches: 1084
Covered Branches: 790
Branch Coverage: 72.88%
Branches in Coverage %: Yes
Coverage Strength: 29.92 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 4 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 200 untouched benchmarks
⏩ 5 skipped benchmarks1


Comparing claude/project-thread-x1ore2-4372 (cb53a88) with next (957f065)

Open in CodSpeed

Footnotes

  1. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@ryansolid
ryansolid marked this pull request as ready for review October 28, 2026 20:38
…ext node back (#4372)

Moves the #4372 fix off `insertExpression`'s hot text path, which every
app ships, to the cold path that breaks its assumption. A streamed
Loading whose fallback an insert claimed as its sole text child: the
fragment's swap takes that text node with the placeholder range, and the
rejected fragment's fresh render clears what the swap put in, leaving the
region empty. The next text value (an outer Errored's fallback, or text
the content renders fresh) was then written to a missing first child.
The clear now leaves an emptied region an empty text node, which that
write fills. The insert fast path is back as it was on next; the
hand-removal spec is pinned as a known failure. Adds the `text` shape:
an empty rejected template under no Errored, the same crash on next.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
… next

A `placeholder(id)` helper serves the region capture and the two
existing `pl-*` lookups, so the fix costs +42 B minified in hydrating
bundles (from +85 B) and 0 B in every CSR scenario and the non-hydrating
floors. The three scenarios that sat at their recorded minified get a
dated ledger line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
@ryansolid ryansolid changed the title fix(web): hydration no longer crashes when an Errored outside a streamed Loading catches its rejection (#4372) fix(solid): hydration no longer crashes when a rejected streamed fragment empties a text-only region (#4372) Oct 28, 2026
@ryansolid ryansolid changed the title fix(solid): hydration no longer crashes when a rejected streamed fragment empties a text-only region (#4372) test(web): pin #4372, a rejected streamed fragment emptying a text-only region Oct 29, 2026
@ryansolid
ryansolid merged commit 02b52b5 into next Oct 29, 2026
8 checks passed
@ryansolid
ryansolid deleted the claude/project-thread-x1ore2-4372 branch November 5, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants