mirror of
https://github.com/penpot/penpot.git
synced 2026-10-30 14:30:37 +00:00
generate-instantiate-component validated the new instance on its own. When the parent is inside another component, the new instance is a nested copy. The validator starts with a :not-component context, so it reported :nested-copy-not-allowed. Validate the root of the enclosing component instead, which walks the new copy with the right context. During a component swap, generate-new-shape-for-swap sets the swap slot after the instance is created. Validating at instantiation time then reported :missing-slot. Add a :skip-validation? option to generate-instantiate-component. The swap sets it and validates the enclosing root once the swap slot is in place. These false errors broke 34 common tests on JS. AI-assisted-by: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>