🐛 Skip shape validation in the page index worker

The page index worker applies the same changes to its own copy of the
pages, which has no file id and no components. :validate-shapes changes
then always failed there, so the worker logged "error updating page
index" and stopped updating the snap and selection indexes of that page
after any validated change. Drop :validate-shapes changes before
applying them in the worker.

AI-assisted-by: claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Eva Marco 2026-09-30 08:56:19 +02:00
parent ff58d8c121
commit 387f0cb5dc

View File

@ -40,6 +40,9 @@
(let [tpoint (ct/tpoint-ms)]
(try
(let [old-page (dm/get-in @state [:pages-index page-id])
;; The index only holds pages, without the file id nor its
;; components, so shape validation can't run here
changes (remove #(= :validate-shapes (:type %)) changes)
new-page (-> state
(swap! ch/process-changes changes false)
(dm/get-in [:pages-index page-id]))