Commit graph

3 commits

Author SHA1 Message Date
Danila Poyarkov f8f5f0fc4e fix(instances): preserve ambiguous imported extras 2026-09-11 10:57:18 +03:00
Danila Poyarkov ff1c157a86 refactor(fig): clarify imported instance reconciliation 2026-09-11 10:30:03 +03:00
Joseph Cumines a4350396a8 fix: prevent unbounded duplication of Figma-imported instance children
Imported instance children arrive with componentId null, so every component edit re-cloned them and compounded per keystroke into runaway memory. Also fixes sibling inversion, extras jumping to front on sync, and stack overflow on self-referential components.

Sync: match unmatched children by name+type forward instead of cloning, guard self/cyclic sync via isDescendant, and keep unmapped extras at the end.

Import and paste: link children positionally at import time so renamed children stay linked. Clipboard paste is scoped to new instances only so existing instances are untouched.
2026-09-11 17:17:10 +10:00