Skip to content

Commit d79e18c

Browse files
committed
fix(hydration): sweep rebuilt tail on childSlot same-identity resume
When a <Hydrate> resume re-renders an existing block through childSlot's same-identity paths (body-fn or same-component), renderBlock runs but nothing checks rebuiltRange or parks the cursor past the slot's range. A renderable hole whose content was entirely a rebuilt root keeps the server tail on screen, and the cursor is not advanced for later siblings. Add the same rebuiltRange/sweepRebuiltTail check and cursor advancement that componentSlotImpl performs after render, to both same-identity early-return paths in childSlot.
1 parent 5e57a13 commit d79e18c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎packages/octane/src/runtime.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37103,6 +37103,11 @@ export function childSlot(
3710337103
state.block.body = comp;
3710437104
renderBlock(state.block);
3710537105
state.currentComp = comp;
37106+
if (hydration !== null && !state.borrowed && state.end !== null) {
37107+
const rebuilt = hydration.rebuiltRange;
37108+
if (rebuilt !== null && rebuilt === state.start) hydration.sweepRebuiltTail(state.end);
37109+
hydration.node = getNextSibling(state.end);
37110+
}
3710637111
return;
3710737112
}
3710837113
if (state.block !== null && comp === state.currentComp) {
@@ -37128,6 +37133,11 @@ export function childSlot(
3712837133
if (state.block.props !== props) journalRootProperty(state.block, 'props', state.block.props);
3712937134
state.block.props = props;
3713037135
renderBlock(state.block);
37136+
if (hydration !== null && !state.borrowed && state.end !== null) {
37137+
const rebuilt = hydration.rebuiltRange;
37138+
if (rebuilt !== null && rebuilt === state.start) hydration.sweepRebuiltTail(state.end);
37139+
hydration.node = getNextSibling(state.end);
37140+
}
3713137141
return;
3713237142
}
3713337143
const signalInstanceKey =

0 commit comments

Comments
 (0)