From f66cdbfeb2e8b68e70e1f8595c38cacf58210ddf Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Sat, 2 May 2026 01:28:19 +0200 Subject: fix: address review findings in masks substrate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove dead ternary in getPreferredEdges (always returned undefined; the all-false object was never reached by Object.values().some(Boolean)) - Document why drawWithFeather descriptors zero the feather field in the compositor (analytical renderer handles softness itself; zeroing prevents a second JFA feather pass) - Remove legacyType from V30→V31 migration (not consumed anywhere; a down-migration can map type:"freeform" back to "custom" directly) - Add V30→V31 test coverage: skip-guard branches, freeform passthrough, elements without a masks array - Add snap tests for vertical-edge (bottom) and uniform-scale handle paths Co-authored-by: Cursor --- apps/web/src/services/storage/migrations/transformers/v30-to-v31.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/web/src/services/storage/migrations/transformers') diff --git a/apps/web/src/services/storage/migrations/transformers/v30-to-v31.ts b/apps/web/src/services/storage/migrations/transformers/v30-to-v31.ts index acdf4061..512fc921 100644 --- a/apps/web/src/services/storage/migrations/transformers/v30-to-v31.ts +++ b/apps/web/src/services/storage/migrations/transformers/v30-to-v31.ts @@ -91,9 +91,10 @@ function migrateMask({ mask }: { mask: unknown }): unknown { return mask; } + // "custom" is the only freeform-path mask type; a down-migration can map + // type === "freeform" back to "custom" without any additional marker. return { ...mask, type: "freeform", - legacyType: "custom", }; } -- cgit v1.3.1