hyperframes icon indicating copy to clipboard operation
hyperframes copied to clipboard

gsap_non_transform_motion: lifecycle (sunset) + cross-repo enforcement follow-ups

Open vanceingalls opened this issue 5 months ago • 2 comments

Tracked follow-ups for the gsap_non_transform_motion lint rule shipped in #1779, so the deliberate deferrals there have an owner rather than living only as code comments.

1. Sunset coupling — pin the deferred refactor debt to the html-in-canvas render outcome

The rule's premise is the screenshot-capture path's integer-pixel snap. #1779's PR body states the intended lifecycle: when drawElement html-in-canvas becomes the default render path (#1295 / #1444), layout-prop animation stops stuttering everywhere — at that point downgrade the rule to a warning (or retire it).

That is the right call if html-in-canvas becomes universal. If it instead ships gated behind a flag indefinitely (cohort rollout, fallback for unsupported browsers), the rule stays load-bearing forever and the intentionally deferred refactor debt accumulates with no trigger to pay it down:

  • [ ] Two-source tween merge block duplicated between gsap_non_transform_motion and gsap_css_transform_conflict (packages/lint/src/rules/gsap.ts).
  • [ ] tagsByToken reimplements tagSimpleSelectors(); element→token index not shared between the two GSAP rules.
  • [ ] Efficiency: tagsByToken / layoutSubtreeRanges built before the gsap.timeline guard; per-script acorn parse + stripJsComments + standalone-call scan are uncached and duplicated across rules.
  • [ ] gsap_css_transform_conflict has no html-in-canvas exemption, so it can false-fire on the same <canvas layoutsubtree> elements the new rule exempts.
  • [ ] Decide severity: keep hard error, or make it config/context-driven keyed on the active render path.

Action: when #1295 / #1444 resolve (default vs flag-gated), decide retire-vs-downgrade and either delete the rule or pay down the debt above.

2. Cross-repo enforcement is implicit

@hyperframes/lint ships as a published package, but neither heygen-cli nor hyperframes-gemini-agent depend on it. Composition-generating agents (Claude / Gemini) therefore won't catch a left:/top:/letterSpacing: tween at generation time — only when the resulting HTML hits the HF runtime / capture engine where the rule runs.

Not a blocker (the rule fires where it matters), but "the rule lives in HF" is not "all HF-producing tools enforce it."

  • [ ] Import @hyperframes/lint (or run hyperframes lint) in the codegen path of heygen-cli and hyperframes-gemini-agent as a pre-publish / post-generation hook, so generated compositions are linted before they ship.

Follow-up to #1779. Related: #1295, #1444.

vanceingalls avatar Jun 29 '26 22:06 vanceingalls

I can take a small pass at the html-in-canvas false-positive part here. I think the narrow fix is to exempt canvas elements marked layoutsubtree from gsap_css_transform_conflict, with a regression test around that case.

AjTheSpidey avatar Jul 01 '26 11:07 AjTheSpidey

Closing during backlog triage as stale: the rule has shipped and the remaining items here are process follow-ups without a concrete defect. Reopen if a specific cross-repo enforcement gap surfaces.

miga-heygen avatar Sep 16 '26 02:09 miga-heygen