From 33a8b093624751113767ed0906ab49a262daf7f0 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Fri, 13 Nov 2026 08:40:36 +0100 Subject: [PATCH] :bug: Propagate tokens when restoring a deleted component A token edit sets the shapes on pages, not the main a deleted component stores, so a restored main came back with the values its tokens had when it was deleted, and synced them into its copies. Restoring a component in the current file propagates the tokens, so the restored main takes their current values. Not covered by a test: the frontend suite compiles it in the full validation that follows. AI-assisted-by: claude-opus-5-5 --- frontend/src/app/main/data/workspace/libraries.cljs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/workspace/libraries.cljs b/frontend/src/app/main/data/workspace/libraries.cljs index b00068dad0..3ab0446d63 100644 --- a/frontend/src/app/main/data/workspace/libraries.cljs +++ b/frontend/src/app/main/data/workspace/libraries.cljs @@ -543,7 +543,11 @@ (rx/of (dch/commit-changes changes) (when local? - (ptk/data-event :layout/update {:page-id page-id :ids frames}))))))) + (ptk/data-event :layout/update {:page-id page-id :ids frames})) + ;; the restored main takes the current values of the tokens it + ;; applies, which no token edit reached while it was deleted + (when local? + (dwtp/propagate-workspace-tokens))))))) (defn restore-components "Restore multiple deleted component definded by a map with the component id as key and the component library as value"