Skip to content

linter: flag missing tl.set() hard-kill on scene-boundary exits #473

@ibrews

Description

@ibrews

Background

PR #364 added Rule 5 to step-6-build.md:

Every element whose visibility changes at a beat boundary needs a deterministic tl.set() kill after its exit tween — not just captions. Without it, non-linear seeking can land between the fade end and the next scene start, leaving the element partially visible or causing a black-frame gap.

Problem

In a/b testing of PR #364 (see review #4167523103), the sub-agent produced 0 tl.set() hard-kills even with the rule present in the prompt — in both runs. The rule is documented but documentation alone isn't a reliable enforcement mechanism for sub-agents.

Meanwhile, scans of existing Stripe compositions found 86 exit animations with only 1 tl.set() hard-kill, and black-frame gaps at every beat boundary in rendered snapshots. The bug is real and widespread.

Proposed linter rule

Flag any element that has an exit tween ending at or near a data-start boundary without a corresponding tl.set() clearing its opacity/visibility at that same position.

Heuristic:

  • Find tl.to(el, { opacity: 0, ... }, t) where t + duration ≈ a scene boundary
  • Check whether a tl.set(el, { opacity: 0 }) (or equivalent) exists at the same position
  • If not → warn: missing hard-kill after exit tween on <selector> at t=<time>

Notes

  • The existing caption hard-kill check is already a narrower version of this. This would generalize it to all scene-boundary exits.
  • False positive risk: elements that are hidden by other means (e.g., parent clip, display: none on the scene root). May need to be scoped to elements inside .clip containers only.
  • Related: linter heuristic inconsistency on overlapping_gsap_tweens (separate issue) may be masking some of these cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions