Internal Error when attempting to override size or color/va

Hello Team,

I am experiencing a critical internal error when attempting to modify the properties of a nested component (specifically size and color/variant) after successfully using the component swap feature.

It seems to be an issue related to how Penpot handles overrides for swapped, nested components within a complex design structure.

Steps to reproduce the behavior:

  1. I have a Parent Component (e.g., a “Card”) that contains a placeholder element (initially a simple shape or a basic component).

  2. On an instance of the Parent Component, I use the “Swap Component” function to replace the placeholder with Component B (e.g., an “Icon Button” that has different variants for colors and states).

  3. After the swap is successful, I try to perform one of the following actions on the now-nested Component B instance:

    • Change the size of the nested Component B (by dragging the handles or inputting numerical values).

    • Change the variant or color of the nested Component B via the Design panel.

Expected behavior:

The size or the color/variant of the nested component should update correctly within the parent instance without any errors.

Actual behavior (Error):

Instead of applying the change, Penpot throws an “Internal Error” and often requires a page reload, causing a loss of work. The override system seems to fail at the point of property modification. This happens for both size and color overrides.

Additional context:

  • Platform: Cloud (design.penpot.app)

  • Browser & version: Chrome 142.0.7444.176 (Build oficial) (x86_64)

I would appreciate it if you could look into this bug, as it currently blocks the use of modular design systems with interchangeable components.

Thank you,