mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 01:22:01 +00:00
📎 Log shape counts and only text content in the replay debug
The WASM replay's debug log read every shape's content as text, which a path's content is not; it reads only texts now and logs how many shapes the page ends with. Harness only; the benchmark is not run. AI-assisted-by: claude-opus-5-5
This commit is contained in:
parent
d5cd89adc2
commit
62257194c6
@ -150,6 +150,7 @@
|
||||
[]
|
||||
(when (query-param "debug")
|
||||
(let [objects (dsh/lookup-page-objects @st/state)]
|
||||
(js/console.log "WASM-REPLAY shapes" (count objects))
|
||||
(doseq [shape (sort-by :name (vals objects))]
|
||||
(js/console.log "WASM-REPLAY shape"
|
||||
(pr-str [(:name shape) (:type shape) (:id shape)
|
||||
@ -157,8 +158,10 @@
|
||||
(some-> (:selrect shape) (select-keys [:x :y :width :height]))
|
||||
(:transform shape) (:touched shape)
|
||||
(:shape-ref shape) (:layout shape)
|
||||
(some-> (:content shape) txt/content->text)
|
||||
(some->> (:content shape) txt/node-seq (keep :font-weight) distinct)]))))))
|
||||
(when (= :text (:type shape))
|
||||
(some-> (:content shape) txt/content->text))
|
||||
(when (= :text (:type shape))
|
||||
(some->> (:content shape) txt/node-seq (keep :font-weight) distinct))]))))))
|
||||
|
||||
(defn- ^:async replay
|
||||
"Replay `program` with the backend and timers mocked, as the frontend
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user