You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Undo of deleting today's journal or a tag page fails and clears the history when a block's node property points at a later block #1379
On today's journal, type 2 blocks, "first" and "second" below it.
On "first", add a property of type node (for example "related") and set it to the block "second".
Delete the page (page menu, Delete).
Press Ctrl+Z.
The same happens with a tag page: create a tag, type the 2 blocks on its page, set the property as in step 2, delete the tag, undo.
Expected
Both blocks are back, and "first" has "related" set to "second". For a tag page, the tag is back too.
Actual
Nothing comes back, and the undo history is gone: another Ctrl+Z does nothing. For a tag page, the tag itself stays deleted.
I reproduced this with the outliner ops that deleting a page sends ([:delete-page [page-uuid {}]], then the worker's undo) in frontend.worker.undo-redo-test on master e2ca31b90. I did not click through it in the app.
Cause
This is #1331 again, on another path. The undo inverse of a page delete (build-inverse-delete-page in deps/outliner/src/logseq/outliner/op/construct.cljc) restores the top-level blocks of today's journal, or of a tag or property page, with 1 :insert-blocks op each. A block's payload holds its ref values as [:block/uuid ...] lookups, so the op that restores "first" looks up "second" before the next op has inserted it, and throws "Nothing found for entity id". The failed history action then clears the history (apply-history-action in src/main/frontend/worker/undo_redo.cljs). logseq/logseq#13458 fixed the block-delete inverse (build-inverse-delete-blocks) by setting such refs after all inserts; the 2 page-delete branches do not go through that step. The review of logseq/logseq#13458 pointed this out.
Activity
tiensonqin commentedon Sep 30, 2026
Fixed by logseq/logseq#13528, which has been merged into master. Closing as completed.