From 447125339e3b0502b3b75d528a4a07ec2abfddf0 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Sat, 14 Nov 2026 12:43:09 +0100 Subject: [PATCH] :bug: Let the WASM engine lay out a moved shape a layout places With WASM on, a pure move took a shortcut: the translation was applied to the moved shapes and their subtrees without asking the engine to lay them out. A shape in a layout's flow then stayed where it was moved, where the CLJS engine's layout put it back, and a copy shape kept the move as a geometry override. A move of a shape that a layout places now goes through the engine like any other transform. Found by replaying generated programs in the browser with WASM on. The JVM benchmark does not run the WASM path; it is not run. AI-assisted-by: claude-opus-5-5 --- frontend/src/app/main/data/workspace/modifiers.cljs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/workspace/modifiers.cljs b/frontend/src/app/main/data/workspace/modifiers.cljs index 971e83d9b3..b0588ba25b 100644 --- a/frontend/src/app/main/data/workspace/modifiers.cljs +++ b/frontend/src/app/main/data/workspace/modifiers.cljs @@ -644,9 +644,18 @@ 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 + laid-out? + (some (fn [id] + (let [shape (get objects id)] + (and (ctl/any-layout-immediate-child? objects shape) + (not (ctl/position-absolute? shape))))) + (keys modif-tree)) + transforms (cond - (and translation? (not snap-pixel?)) + (and translation? (not snap-pixel?) (not laid-out?)) ;; Mirror WASM `propagate_modifiers` in CLJS: splat the ;; translation matrix onto every descendant. Without ;; this step the commit would only touch the dragged