From d10b2f4dedc176e0b92001d284cddd87924e961b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Mon, 18 May 2026 05:24:33 -0400 Subject: [PATCH] fix(core): only rebind timelines when late arrivals were actually detected MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The late-bind polling was unconditionally rebinding on its first check even when all timelines were already present, causing visual regressions across style-prod tests. Now tracks sawMissing flag — only rebinds if the poll previously detected missing timelines that subsequently appeared. Compositions with synchronous timeline registration exit the poll immediately with no side effects. --- packages/core/src/runtime/init.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/src/runtime/init.ts b/packages/core/src/runtime/init.ts index b0f83e0ff..12007ed3c 100644 --- a/packages/core/src/runtime/init.ts +++ b/packages/core/src/runtime/init.ts @@ -1471,6 +1471,7 @@ export function initSandboxRuntimeModular(): void { postState(true); let lateBindChecks = 0; + let sawMissing = false; const lateBindInterval = setInterval(() => { if (++lateBindChecks > 50) { clearInterval(lateBindInterval); @@ -1482,10 +1483,11 @@ export function initSandboxRuntimeModular(): void { const id = hosts[i].getAttribute("data-composition-id"); if (id && !timelines[id]) { allBound = false; + sawMissing = true; break; } } - if (allBound && lateBindChecks > 1) { + if (allBound && !sawMissing) { clearInterval(lateBindInterval); return; }