mirror of
https://github.com/penpot/penpot.git
synced 2026-10-03 09:16:15 +00:00
Individual stroke widths shipped with a `:stroke-per-side` boolean on every stroke, telling the renderer and the CSS generator whether the four per-side widths were meaningful. Comparing the sides answers that on its own, so the attribute was later dropped from the closed stroke schema and the toggle became ephemeral editor state. Files written between those two changes still carry the attribute, and the closed schema rejects the unknown key, so loading such a file fails `check-file-data` with a `:malli.core/extra-key` error and surfaces as an internal error in the editor. Add migration `0030-remove-stroke-per-side-attr`, which drops the attribute from every stroke of every page and component shape. The per-side widths are the saved design data and are kept untouched, so a file whose boolean was `true` renders exactly as before. The migration is naturally idempotent and a no-op for files that never carried the attribute, since `dissoc` on a map without the key returns an equal map. Cover it with tests for the schema rejection, the per-side and global widths surviving, component shapes, idempotency, and the run through `migrate-file`. Closes #11943 AI-assisted-by: space-bunny-free