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 a tag leaves references to it as plain text #1310
Delete the tag "Movie". The block now reads "watch Movie" as plain text.
Press Ctrl+Z.
Expected
"Movie" is back, and the block reads "watch [[Movie]]" with its link to "Movie" again.
Actual
"Movie" is back, but the block still reads "watch Movie" as plain text, with no reference to "Movie".
Notes
Deleting a tag also rewrites the references to it in other blocks' titles into plain text. The undo restores the tag page but not those rewrites. Same family as #1304 and #1305: the undo of a delete does not restore what the delete changed on other nodes.
Found with a probe of undo on single operations, replayed on upstream master 16c4ed1a0: before the delete the block's raw title is watch [[<Movie's uuid>]] with Movie in its refs; after the undo it is watch Movie with no refs.
The same happens when the deleted node is a property or a plain page, not only a tag. Replayed on master 16c4ed1a0 with the undo property test of logseq/logseq#13461:
Deleted node
Block before the delete
Block after Ctrl+Z
tag "beta"
edit [[beta]], ref to beta
edit beta, no ref
property "note"
edit [[note]], ref to note
edit note, no ref
page "page 2"
edit [[page 2]], ref to page 2
edit page 2, no ref
All 3 go through :delete-page: build-page-retract-tx (deps/outliner/src/logseq/outliner/page.cljs) calls db-refs->page for any page, tag or property, which rewrites each linking block's title to plain text and retracts its ref, and the undo does not restore either.
Fixed on graphs without sync by logseq/logseq#13786. Undo of deleting a tag now replays the delete's recorded datoms, so a block that read watch [[Movie]] gets its link back instead of plain text. local-graph-undo-of-tag-delete-restores-inline-references-test pins it (the raw title and the ref to Movie are both restored). A synced graph still undoes through the old inverse op, which this PR does not change.
Activity
yuxi-liu-wired commentedon Sep 26, 2026
The same happens when the deleted node is a property or a plain page, not only a tag. Replayed on master
16c4ed1a0with the undo property test of logseq/logseq#13461:edit [[beta]], ref to betaedit beta, no refedit [[note]], ref to noteedit note, no refedit [[page 2]], ref to page 2edit page 2, no refAll 3 go through
:delete-page:build-page-retract-tx(deps/outliner/src/logseq/outliner/page.cljs) callsdb-refs->pagefor any page, tag or property, which rewrites each linking block's title to plain text and retracts its ref, and the undo does not restore either.yuxi-liu-wired commentedon Oct 27, 2026
Fixed on graphs without sync by logseq/logseq#13786. Undo of deleting a tag now replays the delete's recorded datoms, so a block that read
watch [[Movie]]gets its link back instead of plain text.local-graph-undo-of-tag-delete-restores-inline-references-testpins it (the raw title and the ref to Movie are both restored). A synced graph still undoes through the old inverse op, which this PR does not change.