Skip to content

Undo of deleting a block leaves node property values that pointed at it empty #1302

Open

Description

@yuxi-liu-wired

Steps

  1. On a page, set a property of type node (for example "related") to a block on that page.
  2. Delete that block.
  3. Press Ctrl+Z.

Expected

The block is back, and the property value points at it again.

Actual

The block is back, and the property is empty.

Cause

Deleting a block retracts it with :db/retractEntity (-del in deps/outliner/src/logseq/outliner/core.cljs), which also retracts every reference to the block held by other nodes. The undo inverse (build-inverse-delete-blocks in deps/outliner/src/logseq/outliner/op/construct.cljc) inserts the block again from its own attributes and does not record the references that pointed at it, so they stay retracted.

Found with a property-based test of random outliner operation sequences with undo and redo.

Activity

  1. added a commit that references this issue on Sep 26, 2026
    3fc4726
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions