Preview: tl.set holds never render when the root timeline has zero duration
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- html, typescript
Research direction
Start in packages/core/src/runtime/init.ts and compare the createDurationFloorTimeline path with ensureChildCandidatesActive. Reproduce the supplied static tl.set example or a Studio resize, then verify that preview renders #box at 200×150 at any playhead position while snapshot behavior remains correct.
Written by the indexing model from the issue text.
Description
Describe the bug
A root timeline whose own duration is 0 — e.g. one that only holds tl.set(...) at position 0, which is exactly what Studio writes for a static resize — never renders its sets in the preview. After resizing an element in Studio the file is correct, but the element snaps back to its authored size in the preview (keeping the drag offset), so it looks like the resize was lost.
Cause: in packages/core/src/runtime/init.ts, an unusable (zero) root duration takes the createDurationFloorTimeline fallback: the root timeline is added to a new paused wrapper padded to the composition duration. The author's root was created gsap.timeline({ paused: true }) and stays paused, and a paused child is never rendered when its parent is seeked. The nested-composition path already unpauses held children (ensureChildCandidatesActive); the floor wrapper does not.
Minimal reproduction
<div id="root" data-composition-id="main" data-start="0" data-duration="2" data-width="1920" data-height="1080">
<div id="box" class="clip" data-start="0" data-duration="2" data-track-index="1"
style="position:absolute; left:100px; top:100px; width:400px; height:300px; background:tomato"></div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
<script>
window.__timelines = window.__timelines || {};
const tl = gsap.timeline({ paused: true });
tl.set("#box", { width: 200, height: 150 }, 0);
window.__timelines["main"] = tl;
</script>
Steps to reproduce
npx hyperframes previewon the composition above (or produce it by resizing an element in Studio in a composition without tweens).- Look at
#boxat any playhead position.
Expected behavior
#box renders at 200×150.
Actual behavior
#box stays at 400×300. In the preview iframe, __timelines.main.paused() is true, its children are never initialised, and __player.seek(t) has no effect on it. After __timelines.main.paused(false), __player.seek(0.5) renders 200×150. A single tween in the timeline (non-zero duration) avoids the fallback and the bug. hyperframes snapshot --at 0.5 of the same file renders 200×150 correctly, so only the preview runtime is affected.
Environment
hyperframes CLI 0.8.77 (also on main @ 0985b45), GSAP 3.12.5 and 3.15.0, macOS, Chrome (headed and headless).
Additional context
Fix PR to follow: unpause the root timeline once the floor wrapper actually holds it, mirroring ensureChildCandidatesActive.
- Dominant language
- TypeScript
- Stars
- 54.1k
- Forks
- 4.9k
- Avg merge
- 10h 29m
- Merged PRs (30d)
- 756
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from heygen-com/hyperframes
-
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
heygen-com/hyperframes#5002 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
heygen-com/hyperframes#4702 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Studio catalog prompt editor has no accessible namePossibly taken @lorenzozanee claimed this 10 days ago. Openbug difficulty/easy triage/ready
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
heygen-com/hyperframes#4384 ·
Maintainers usually reply within 1 day
-
lint: validate composition variables declared on supported root elementsMay be free again A pull request for this issue was closed without being merged. Openbug difficulty/easy triage/ready
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
heygen-com/hyperframes#4383 ·
Maintainers usually reply within 1 day
-
lint: report AVIF/M4A media-kind mismatches consistently with JPEG/MP3May be free again A pull request for this issue was closed without being merged. Openbug difficulty/easy triage/ready
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
heygen-com/hyperframes#4382 · 1 comment ·
Maintainers usually reply within 1 day
All issues in heygen-com/hyperframes
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
prime-radiant-inc/evener#3726 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
FuRongJun-1999/dsh-memory#56 ·
Maintainers usually reply within 1 day
-
bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pingdotgg/t3code#15682 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
openwatersio/slackwater.xyz#152 ·
Maintainers usually reply within 1 day
-
[BUG] 请修改标题为您遇到的问题Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
OpenListTeam/OpenList-Worker#103 ·
Maintainers usually reply within 1 day