From 415206fa9fcc4570f3cdc35c50c1b7d616f5df13 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Mon, 16 Nov 2026 02:47:51 +0100 Subject: [PATCH] :bug: Let the WASM engine lay out a move inside a group a layout places With WASM on, a pure move skips the engine unless a moved shape is in a layout's flow. A shape moved inside a group or bool that a layout places took that shortcut: the group grew to it and stayed where the move left it, where the CLJS engine's layout puts the group back in its place. The check now walks up through the groups and bools around a moved shape, and a move whose group a layout places goes through the engine. Found by the WASM replay of the pinned generated programs (program 169, `{:world [1 0 {:layout :flex :layout-children true}] :ops [[:structure 0 0 19] [:transform 10 0 0 12]]}`), which passes now; the WASM path does not run in the node tests. ClojureScript only; the benchmark covers JVM code and is not run. AI-assisted-by: claude-opus-5-5 --- .../app/main/data/workspace/modifiers.cljs | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main/data/workspace/modifiers.cljs b/frontend/src/app/main/data/workspace/modifiers.cljs index b0588ba25b..46edafdfa6 100644 --- a/frontend/src/app/main/data/workspace/modifiers.cljs +++ b/frontend/src/app/main/data/workspace/modifiers.cljs @@ -644,13 +644,26 @@ snap-pixel? (and (not ignore-snap-pixel) (contains? (:workspace-layout state) :snap-pixel-grid)) - ;; a layout places the shapes in its flow, so moving one is - ;; for the engine to lay out, not a translation to splat + ;; a layout places the shapes in its flow, and the groups + ;; and bools it places take their bounds from their shapes, + ;; so moving one is for the engine to lay out, not a + ;; translation to splat laid-out? (some (fn [id] - (let [shape (get objects id)] - (and (ctl/any-layout-immediate-child? objects shape) - (not (ctl/position-absolute? shape))))) + (loop [shape (get objects id)] + (cond + (nil? shape) + false + + (and (ctl/any-layout-immediate-child? objects shape) + (not (ctl/position-absolute? shape))) + true + + (cfh/group-like-shape? (get objects (:parent-id shape))) + (recur (get objects (:parent-id shape))) + + :else + false))) (keys modif-tree)) transforms