Skip to content

Commit de309ca

Browse files
committed
fix(octane): preserve signal retry visit across hydration deferral
When hydration.suspend defers a renderBlock call, the locally captured retryVisit was dropped on return. The resumed renderBlock re-enters scopeSignalOwner which finds the cached owner and skips the branch that builds a visit, so pruneSignalRetryVisit never ran for that attempt. Capture the visit in the hydration suspend closure and restore it to the SIGNAL_RETRY_VISIT global immediately before the deferred renderBlock re-entry, so the re-entered call finds and consumes it normally.
1 parent 86afe31 commit de309ca

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎packages/octane/src/runtime.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11104,7 +11104,11 @@ export function renderBlock(block: Block): void {
1110411104
(!hydration.owns(block) ||
1110511105
(block.kind === 'dynamic' && block.endMarker !== null && hydration.rebuilds(block.endMarker)))
1110611106
) {
11107-
hydration.suspend(() => renderBlock(block));
11107+
const deferredVisit = retryVisit;
11108+
hydration.suspend(() => {
11109+
if (deferredVisit !== null) SIGNAL_RETRY_VISIT = deferredVisit;
11110+
renderBlock(block);
11111+
});
1110811112
return;
1110911113
}
1111011114
const previousOwner = renderPhaseOwner;

0 commit comments

Comments
 (0)