Clone scroll transform pin and time tracks - #56
Conversation
hongnoul
left a comment
There was a problem hiding this comment.
Review verdict: changes requested (comment-only self-review).
P1 – tracks are marked replayed while changed properties are dropped. direct_style_supported returns true when any supported field changes, but does not reject other changed fields. The included timed fixture changes color; the capture key records it and the generated transition names it, yet writeStyle never writes color. The report still says replayed, and the behavioral test checks only state/opacity/transform. Implement color/background/text-shadow replay or classify tracks with any unhandled changed field as report-only, then assert computed color in the fixture.
P1 – the matrix support gate accepts shapes the runtime cannot preserve. supported_matrix accepts every matrix(...)/matrix3d(...), while matrix() retains only sx/sy/tx/ty, discarding rotation, skew, and most 3D terms. It also uses p[i] || 1, turning a legitimate zero scale into 1. Restrict the gate to axis-aligned scale/translate matrices or interpolate all coefficients, and add rotation/skew/scale-zero tests.
Validation: CI is green; both new focused Rust tests passed independently. Those tests currently encode only the happy-path subset above.
hongnoul
left a comment
There was a problem hiding this comment.
Follow-up findings from an independent pass:
P1 – new tracks can suppress the existing text-effect capture. The text-group loop still stops on if (effects.length >= 3), but effects is now pre-seeded by pin/visual/time tracks. Three of those cause the loop to capture zero scroll-coupled-text-style effects, a regression from the old cap of three text groups. Count text-style effects separately.
P1 – retagging can invalidate an earlier replay selector. The time-track loop assigns c.el.dataset.hwatuScrollEffect = effectIndex without excluding an element already tagged as a visual/pin track. The old serialized selector then matches nothing while the report still marks it replayed. Skip already-tagged elements or use independent per-kind attributes.
P2 – worst-case capture latency jumps by ~42 seconds. Up to 80 text candidates each incur a 520 ms sequential dwell, even when no time effect exists. Gate probes on evidence from the coarse sweep or substantially reduce/batch the candidate set.
Summary
Closes #46
Validation