Skip to content

Undo of deleting a tag leaves its blocks untagged and adds Root to its parents #1305

Open
logseq/logseq
#13786

Description

@yuxi-liu-wired

Steps

  1. Create a tag "Movie" that extends the tag "Topic", and tag a block with #Movie.
  2. Delete the tag "Movie".
  3. Press Ctrl+Z.

Expected

"Movie" is back, still extends only "Topic", and the block is tagged #Movie again.

Actual

"Movie" is back, but it now extends both "Root" and "Topic", and the block has no tag.

Notes

The block losing its tag looks like the same family as #1302: undo of a delete does not restore the references other nodes held to the deleted entity. The added "Root" parent is a separate symptom; its cause is not established.

Found with a property-based test of random outliner operation sequences with undo and redo, replayed on upstream master d9d625847.

Activity

  1. yuxi-liu-wired commented on Oct 27, 2026

    @yuxi-liu-wired
    Author

    Fixed on graphs without sync by logseq/logseq#13786. Undo now replays the delete's recorded datoms, so the block is tagged #Movie again and Movie still extends only Topic, with no Root Tag added. local-graph-undo-of-tag-delete-restores-tags-and-parent-test pins it. A synced graph still undoes through the old inverse op, which this PR does not change.

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