Repository navigation
fix(core): prevent Figma motion property key collisions - #6800
Conversation
889772b to
c6182e4
Compare
jrusso1020
left a comment
There was a problem hiding this comment.
Reviewed at c6182e4bdb5a589c94be319d2d2eafa816c4eff5.
I checked all three key extractors. The shared keyPattern prevents y from matching opacity and keeps property timing separate without replacing the parser.
vitest run motionContextToDocs.test.ts --configLoader runner: 11 passed. Borrowed existing Vitest dependencies. No live Figma import. Prefer this implementation over overlapping #6810.
Need: yes · Size: ok · Reuse: existing implementation seam · Simpler: already minimal · Structure: fine
Risk: low - property-key parsing.
Verdict: APPROVE
Reasoning: I checked all three key extractors. The shared keyPattern prevents y from matching opacity and keeps property timing separate without replacing the parser.
Reasoning: I checked all three key extractors. The shared keyPattern prevents y from matching opacity and keeps property timing separate without replacing the parser.
…com#6605 heygen-com#6611 heygen-com#6831 heygen-com#6800 Windows debug.log lock, PowerShell UTF-16 batch JSON, long backup names, --variables-file readFile override, Figma motion key collisions. Rest deferred with per-commit evidence; 72 PRs pinned in monitored. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: SanHsien <[email protected]>
What
Prevent Figma motion property lookups from matching a key inside a longer property name. This keeps simultaneous
opacityandytracks independent regardless of their order in the motion.dev snippet.Why
On the upstream baseline (
f43bec76e7ceef13e65b930496f7e1f66779250b), I ran the issue fixture through the built@hyperframes/coreoutput. The emittedytrack incorrectly copied opacity:[0, 0, 1, 1][0, 0.0444, 0.1333, 1][120, 120, 0, 0][0, 0.0444, 0.2222, 1]The parser's array and scalar regexes had no left key boundary, and the transition-block lookup used an unanchored substring search. Therefore
y: ...could match the suffix ofopacity: ....Related work
Fixes #6756.
I searched open and recently merged PRs by issue number,
motionContextToDocs, and Figma key-collision terms before starting and again before pushing; no competing fix was present.How
$.No easing, duration, keyframe timing, repeat, loop-wrap, or property mapping behavior was changed.
Test plan
RED on untouched parser source:
bun run --cwd packages/core test src/figma/motionContextToDocs.test.tsGREEN:
same targeted command: 11 passed
focused coverage: 89.09% statements, 80.24% branches, 100% functions, 96.55% lines for
motionContextToDocs.tsfull core suite: 258 files / 5,603 tests passed
core typecheck passed
post-change core build passed
repository-wide lint passed (0 warnings/errors across 4,795 files)
repository-wide format check passed (6,842 files)
pre-commit fallow audit passed with no issues in the two changed files
exact issue fixture rerun through built
dist: correctedyvalues/times matched the expected outputUnit tests added/updated
Manual testing performed
Documentation updated (not applicable; parser behavior now matches the existing contract)
Comments follow CONTRIBUTING.md "Comments"