Skip to content

Undo of deleting a parent tag leaves its child tags under Root Tag #1312

Open
logseq/logseq
#13786

Description

@yuxi-liu-wired

Steps

  1. Create tags "Topic" and "Movie", with "Movie" extending "Topic".
  2. Delete the tag "Topic". "Movie" now extends "Root Tag".
  3. Press Ctrl+Z.

Expected

"Topic" is back, and "Movie" extends "Topic" again.

Actual

"Topic" is back, but "Movie" still extends "Root Tag".

Notes

Deleting a tag moves its child tags under "Root Tag". The undo restores the deleted tag but not its children's parent. #1305 is the reverse case: undo of deleting a tag that extends another tag adds "Root Tag" to the restored tag's own parents.

Found with a probe of undo on single operations, replayed on upstream master 16c4ed1a0.

Activity

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

    @yuxi-liu-wired
    Author

    Fixed on graphs without sync by logseq/logseq#13786. Undo of deleting a parent tag now replays the delete's recorded datoms, so Movie extends Topic again instead of staying under Root Tag. local-graph-undo-of-parent-tag-delete-restores-child-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