fix: regression fixes — conditional rebind + updated compilation baselines

1. Only call __hfForceTimelineRebind() when the timeline poll actually
   had to wait (pollDuration > 2 intervals). For compositions with
   synchronous timeline registration, the rebind was unnecessary and
   shifted render timing, causing PSNR regressions in chat and
   gsap-letters-render-compat.

2. Regenerate compiled.html baselines for missing-host-comp-id and
   overlay-montage-prod to match the new flattenInnerRoot behavior
   (data-composition-id stripped from inlined inner roots, replaced
   with data-hf-authored-id).

3. Add late-bind polling to runtime init.ts — after external
   compositions load, poll for 5s to detect async timelines that
   register after initial binding (e.g. from fetch callbacks).
This commit is contained in:
Miguel Ángel
2026-05-18 03:46:58 -04:00
parent 0f1c64dcae
commit 04c35ce24c
4 changed files with 1828 additions and 100 deletions
+3 -1
View File
@@ -365,8 +365,10 @@ async function pollSubCompositionTimelines(
}
return true;
})()`;
const beforePoll = Date.now();
const ready = await pollPageExpression(page, expression, timeoutMs, intervalMs);
if (ready) {
const pollDurationMs = Date.now() - beforePoll;
if (ready && pollDurationMs > intervalMs * 2) {
await page.evaluate(`(function() {
if (typeof window.__hfForceTimelineRebind === "function") {
window.__hfForceTimelineRebind();