Repository navigation
fix(web): duplicate data-lha on escalated live attrs; data calls during hydration - #4055
Conversation
…4032) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AV6Ya8uSU8gut3V3odqxck
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AV6Ya8uSU8gut3V3odqxck
🦋 Changeset detectedLatest commit: 9b9b921 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
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 |
Size (brotli, eager entry chunk)
|
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AV6Ya8uSU8gut3V3odqxck
|
The failing check on 8163bc3 is Generated by Claude Code |
Coverage Report for CI Build 38588871668Coverage remained the same at 77.515%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Merging this PR will degrade performance by 12.63%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | memo + sync render effect only (reference) |
26.4 ms | 30.4 ms | -13.15% |
| ❌ | createStore setter: delete + set one root key (#3044 overlay) |
1.8 ms | 2 ms | -12.1% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing claude/project-thread-pe3qnr (9b9b921) with next (f048691)
|
Generated by Claude Code |
…-call closure The dropCap closure in ssr() cost ~13% on the link-claim renderToString bench (one allocation per template instance). Write the removal at the three escalation sites instead; renderToString floor 20.55 -> 20.56 KB. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AV6Ya8uSU8gut3V3odqxck
Re-measures the renderToString floor on top of #4043: 20,570 B (72,373 minified), combined cap 20.58 KB as the maintainer accepted. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KRieFbP8sapvTBygyVm3mg
|
CodSpeed's two flagged regressions are not this PR's: both are Generated by Claude Code |
Re-measures the frames eager cap on top of #4055: 11,540 B brotli / 34,499 B minified. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KRieFbP8sapvTBygyVm3mg
Summary
Closes #4032. Closes #4033.
#4032 (duplicate
data-lha). Before: an in-tag hole whose value is pending inside a live region made the tag escalate, but the attr capture had already spliced itsdata-lhaaddress into the tag. The tag then left with two addresses, and anattrsop could carry a staledata-lha. After: when the hole escalates,ssr()removes the address the capture injected, at each of the three escalation sites inpackages/web/src/server.ts, so each tag carries one address. The removal is written inline rather than as a closure insidessr(), which cost about 13% on the link-claim renderToString bench.#4033 (data server functions never hit the network during hydration with
components: true). Before: a data call made while the document was hydrating waited onawaitBoundaryfor a frame site that could never arrive, so its fetch never started. There were two causes. First,boundaryMayArriveread only_$HY.done, which flips asetTimeoutaftersharedConfig.done, so a call made inonHydrationEndstill looked like it might find a site. Second, under the hydration tracePromiseis a stub that never runs its executor, so the waiter was registered with no resolver and every later call with the same id hung behind it. After:boundaryMayArrivealso checkssharedConfig.done; waiters are released at hydration end (releaseArrivals, shared with the reveal subscriber); and a stub promise is never cached as a waiter.The frames client grows 27 B br (cap 11.495 → 11.522 KB, ledger entry in
scripts/size/scenarios.js). This PR also updates #4045's ledger wording now that it was accepted.Size-Exception: renderToString floor 20.55 -> 20.58 KB (+39 B br / +131 B min on top of #4043, measured 20,570 B / 72,373 min against next @ f048691) for the #4032 address removal in
ssr(). Accepted by the maintainer (2026-10-14) as one combined cap of about 20.58 KB together with #4043; this PR merges second and sets it.adopted-fallback-residue.spec.tsxis now split in two files. The frames boundary index is module state, and that file's second page had been passing only because it read the first page's stale index. The nested case is now inadopted-fallback-residue-nested.spec.tsx(one page per file); it passes with and without this change.How did you test this change?
test/server/live-attr-escalation-4032.spec.tsx: a pending attr inside<Loading>fails before the fix and passes after; a nested guard case passes on both.test/hydration/data-call-during-hydration-4033.spec.tsx: a data call inonHydrationEnd, and a call made after a trace-stub call, each expect one fetch. Both fail onnextand pass here.pnpm build. Then the web server suite: 1673 passed; the only failure is theserver-functions-adapter-request"rebuild failure" test, which is also red onnext. Hydrate suite: 503 passed (16 expected fail). DOM suite: 1392/1392. Prettier clean.next(with fix(web): a deferred hole keeps its server component's claims arming #4043): DOM 1392/1392, server 1674 passed (same Node 22-only failure), hydrate 503 passed.pnpm bench:serverlink-claim, A/B againstnext@ c818604 (5 runs each): level within noise after the inline change; the closure version was measurably slower.next@ f048691.🤖 Generated with Claude Code
https://claude.ai/code/session_01AV6Ya8uSU8gut3V3odqxck