From 54b1eb5d5f933388ebafcbee6fcc92774371efe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?andr=C3=A9s=20gonz=C3=A1lez?= Date: Wed, 11 Nov 2026 14:43:11 +0100 Subject: [PATCH] :sparkles: Add shape count to the apply-tokens audit event (#12970) The apply-tokens event fires once per apply call, so a plugin or MCP script that loops over shapes sends one event per shape while the UI sends one per selection. Add a shape-count prop with the number of shapes the token was applied to, so analytics can compare origins in the same unit. Closes #12900 AI-assisted-by: claude-opus-5-5 --- frontend/src/app/main/data/workspace/tokens/application.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/workspace/tokens/application.cljs b/frontend/src/app/main/data/workspace/tokens/application.cljs index 3ab4427ce6..2f68e08a85 100644 --- a/frontend/src/app/main/data/workspace/tokens/application.cljs +++ b/frontend/src/app/main/data/workspace/tokens/application.cljs @@ -743,7 +743,8 @@ (-> {::ev/name "apply-tokens" :type type :applied-to attributes - :applied-to-variant any-variant?} + :applied-to-variant any-variant? + :shape-count (count shape-ids)} (merge (meta it))))) (dwu/start-undo-transaction undo-id) (dwsh/update-shapes shape-ids (fn [shape]