Skip to content

Commit 1d09e6f

Browse files
committed
fix(core): set __renderReady unconditionally after binding attempt
The capturedTimeline guard broke CSS/WAAPI/Lottie compositions that have no GSAP timeline — __renderReady was never set, causing the parity harness to timeout after 30s. renderSeek works with or without a GSAP timeline (adapter-only seeking), so the correct invariant is "timeline binding was attempted" not "a timeline was found." Set __renderReady unconditionally in all three paths, after bindRootTimelineIfAvailable has run.
1 parent 3347486 commit 1d09e6f

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

packages/core/src/runtime/init.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ describe("initSandboxRuntimeModular", () => {
557557
expect(window.__player).toBeDefined();
558558
});
559559

560-
it("does not set __renderReady when no timeline is available", () => {
560+
it("sets __renderReady even without a GSAP timeline (CSS/WAAPI compositions)", () => {
561561
const root = document.createElement("div");
562562
root.setAttribute("data-composition-id", "main");
563563
root.setAttribute("data-root", "true");
@@ -571,6 +571,6 @@ describe("initSandboxRuntimeModular", () => {
571571
initSandboxRuntimeModular();
572572

573573
expect(window.__playerReady).toBe(true);
574-
expect(window.__renderReady).toBeUndefined();
574+
expect(window.__renderReady).toBe(true);
575575
});
576576
});

packages/core/src/runtime/init.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,9 +1460,7 @@ export function initSandboxRuntimeModular(): void {
14601460
.finally(() => {
14611461
externalCompositionsReady = true;
14621462
bindRootTimelineIfAvailable();
1463-
if (state.capturedTimeline) {
1464-
window.__renderReady = true;
1465-
}
1463+
window.__renderReady = true;
14661464
runAdapters("discover", state.currentTime);
14671465
bindMediaMetadataListeners();
14681466
installAssetFailureDiagnostics();
@@ -1633,11 +1631,11 @@ export function initSandboxRuntimeModular(): void {
16331631
player._timeline = state.capturedTimeline;
16341632
}
16351633

1636-
// __renderReady = timeline is bound, safe for deterministic seeking.
1634+
// __renderReady = timeline binding attempted, safe for deterministic seeking.
1635+
// Set unconditionally: renderSeek works with or without a GSAP timeline
1636+
// (CSS/WAAPI/Lottie compositions use adapter-only seeking).
16371637
// fileServer.ts sets this immediately (no timeline to bind in its runtime).
1638-
if (state.capturedTimeline) {
1639-
window.__renderReady = true;
1640-
}
1638+
window.__renderReady = true;
16411639

16421640
// When the bundler inlines compositions, data-composition-src is removed so
16431641
// loadExternalCompositions() is skipped. But inline scripts registering child
@@ -1650,9 +1648,7 @@ export function initSandboxRuntimeModular(): void {
16501648
player._timeline = state.capturedTimeline;
16511649
}
16521650
runAdapters("discover", state.currentTime);
1653-
if (state.capturedTimeline) {
1654-
window.__renderReady = true;
1655-
}
1651+
window.__renderReady = true;
16561652
postTimeline();
16571653
postState(true);
16581654
}, 0);

0 commit comments

Comments
 (0)