Repository navigation
refactor: reuse child teardown for hydration slots - #2098
Merged
trueadm merged 1 commit intoOct 15, 2026
Merged
Conversation
domgan-oai
marked this pull request as ready for review
October 15, 2026 16:17
Contributor
Benchmark report
Compares js-framework: 1k/10k row operationsAll 20 timed operations (20 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)
13 other measured values are unchanged. Public-import reachability bundles (bytes)
39 other measured values are unchanged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hydration-boundary slots already run their feature-owned teardown before generic slot dispatch. Remove the duplicate
hydrateBlockSlotbranch and use the existing child-block fallback, preserving the abort/waiter cleanup before child unmount. Keep the prefetch rationale beside its owner.Validation
pnpm format:check(repo-wide not run; changed-file formatting passed)pnpm typecheck(repo-wide not run; scoped owning-project typecheck passed)pnpm test(repo-wide not run)pnpm syncpassed without generated changes; independent complexity review found no actionable issue.perf-review: final diff scan found 0 candidates.unmountSlotruns per teardown slot; no shape, allocation, DOM, or scheduling changes. Common later slot kinds lose one comparison; a hydration-boundary teardown gains two fixed comparisons. The paired browser timings show no significant regression or speedup.concise-code: src +1/−6 (runtime +1/−6); no new files or exports. Keeping the branch preserves duplicate logic; removing the feature-owned callback would break prefetch cleanup.Risk / follow-ups
The gzip savings are small and not universal. Brotli changes were mixed, including +145 B for the complete bindings app and +35 B for Threadline Oxc. This does not move portal teardown ownership or change foreign-target cleanup.
Provenance
agent-authored)Codex task · host
com-79386Need help on this PR? Tag
@codesmith-botwith what you need.Note
Low Risk
Teardown order is preserved (feature teardown then child unmount); targeted deferred-hydration lifecycle tests reportedly cover prefetch abort and child cleanup.
Overview
Removes the dedicated
hydrateBlockSlotbranch from genericunmountSlotdispatch so hydration boundaries are torn down like other slots with a child block:teardownHydrateBoundarystill runs first viaSLOT_FLAG_TEARDOWN(installers, stream wait,prefetchAbort, waiters), then the existing fallbackelsepath unmountsval.block.Documents that
load()-driven procedural prefetch can start before passive setup, so aborting prefetch belongs in boundary teardown rather than in the removed generic walk comment inblock.ts.Reviewed by Cursor Bugbot for commit 2913f9c. Bugbot is set up for automated code reviews on this repo. Configure here.