feat(core): add GSAP keyframe + motion-path source mutations#1554
feat(core): add GSAP keyframe + motion-path source mutations#1554miguel-heygen wants to merge 1 commit into
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Array-form keyframe removal in both the recast and acorn writers, plus update/add/remove-motion-path-point and add-motion-path. Exclude _auto and data from tween property-group classification.
99da598 to
e5e8d40
Compare
085862a to
c8aee05
Compare
jrusso1020
left a comment
There was a problem hiding this comment.
Approved at c8aee055 per Rames D Jusso "stamp-ready with 1 nit + 1 question." Deferring his specific items (posted in his review) to Miguel for resolution inline — non-blocking from my side.
PR body is the unfilled template; please fill in even a one-paragraph description before merge so the change history names what landed (Rames D Jusso + Via both flagged this as a stack-wide process concern across all 9 PRs).
terencecho
left a comment
There was a problem hiding this comment.
Test-coverage + backwards-compat axis (complementary to @rames-jusso's structural pass)
Reviewed with a narrower lens: do the new mutation APIs ship with tests, and is anything signature-broken on the existing parser/writer surface?
Verified
- Test coverage strong on the new surface:
gsapParser.test.tsadds units forupdateMotionPathPointInScript(4 cases),addMotionPathPointInScript(2 cases),removeMotionPathPointInScript(2 cases),addMotionPathToScript(1 case),syncPositionHoldsBeforeKeyframes(6 cases),addKeyframeToScriptbackfill on/off (2 cases),_autoexclusion (1 case).gsapWriter.parity.test.tsaddsremoveKeyframeFromScriptarray-form parity (3 cases: implicit-% removal, collapse-on-fewer-than-2, no-op on mismatched %).
- Writer parity scope is correct. Motion-path mutations are intentionally recast-only (live in
gsapParser.ts, no acorn counterpart) because #1555 routes them throughstudio-api(server-side). The browser/SDK acorn writer doesn't need them — the studio calls them via HTTP. So the parity test absence for motion-path is by design, not a gap. - No export signature breaks: every export touched in
gsapParser.tsandgsapWriterAcorn.tsis an ADDITION (verified bygit difffilter on^[-+]\s*export function— no-lines).
Note
- The commit message describes the surface well, but the PR body is the unfilled template — see consolidated note on #1561. For the most critical PR in the stack (+651/-4 core mutations), the empty body makes the change harder to justify to a future archaeologist.
— Review by tai (pr-review)

Stack: GSAP keyframe + motion-path editing — core read/write layer (#1553 → #1561).
What
Add core parser + writer support for keyframe and motion-path source mutations on GSAP tweens: add / remove / update keyframes, convert a flat tween to keyframes, edit motion-path waypoints, and classify tween properties into groups (position / scale / rotation / visual).
Why
The Studio keyframe/motion-path editor needs deterministic, AST-level read and write of GSAP timelines so that edits round-trip through the composition source without reformatting unrelated code.
How
gsapWriterAcorn.ts) with keyframe/motion-path ops.gsapParser.ts,gsapConstants.ts).Test plan
bun run test(core) green