Skip to content

[Bug]: check: a negative data-start hides the composition's derived duration and blocks the render #8031

Closed

Description

@zhengqiuyang

Describe the bug

A clip authored with a negative data-start renders normally — readClipTiming clamps the start to zero — but the lint rule that derives a composition's length from its clips drops the clip, so a valid composition is reported as having no duration source at all.

<div data-composition-id="main" data-width="1920" data-height="1080">
  <div class="clip" data-start="-2" data-duration="1"></div>
</div>

Expected Behavior

root_composition_duration_derived warning: the root length is taken from its clips, at least 1s. That is what the renderer does: start clamps to 0, duration 1, end 1.

Actual Behavior

root_composition_missing_duration_source (error, blocks strict renders): "Root composition has no data-duration, no GSAP timeline... will fail with Composition has zero duration."

The cause is in deriveDurationFromClips (packages/lint/src/rules/composition.ts): data-start is read with a raw Number(), so -2 produces an end of -1; resolveCompositionDuration only counts positive ends, so the clip disappears and the composition looks duration-less.

A similar mismatch shows up at data-start="-0.5", where lint reports "at least 1.5s" while the parser renders 2s.

Environment

  • main at 00d03a4
  • Reproduction: lintHyperframeHtml on the HTML above, or the new test in the PR

Activity

  1. added
    bug
    triage/ready
    difficulty/easy
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdifficulty/easytriage/ready

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions