Skip to content

Undo of creating a page with a new tag leaves the tag #1300

Closed
logseq/logseq
#13449

Description

@yuxi-liu-wired

Steps

  1. Create page "alpha" with a tag "Movie" that does not exist yet (for example "alpha #Movie" in search).
  2. Undo.

Expected

Both "alpha" and the tag "Movie" are removed.

Actual

"alpha" goes to the Recycle bin, and the tag "Movie" stays.

Cause

The tag is created in the same transaction as the page, as a nested map in :block/tags (build-page-tx, deps/outliner/src/logseq/outliner/page.cljs), but the inverse of :create-page in deps/outliner/src/logseq/outliner/op/construct.cljc deletes only the created page named by :uuid.

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

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