✨ 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
This commit is contained in:
andrés gonzález 2026-11-11 14:43:11 +01:00 committed by GitHub
parent bcac14a4a8
commit 54b1eb5d5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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]