📎 Give pasted shapes fill and stroke lists in the harness paste

The clipboard's paste maps over the fills and strokes of every shape it
adds, so a shape without them, such as a group, gets empty lists. The
harness paste left them out, and the frontend replay of a generated
paste differed from the JVM run by them.

Harness only; the benchmark is not run.

AI-assisted-by: claude-opus-5-5
This commit is contained in:
alonso.torres 2026-11-14 03:22:17 +01:00
parent 0cce919e48
commit 29a1b18f08

View File

@ -1384,7 +1384,14 @@
(gpt/point 0 0)
libs
(:data the-file)
(:id the-file)))
(:id the-file))
;; as the clipboard's paste, each added shape has fill and stroke lists
(pcb/amend-changes (fn [change]
(cond-> change
(= :add-obj (:type change))
(update :obj #(-> %
(update :fills (fnil vec []))
(update :strokes (fnil vec []))))))))
file' (thf/apply-changes the-file changes :validate? false)]
(-> situation
(tm/with-file file')