{{ message }}
Update linking page mirrors when a page is renamed - #13147
Open
tiensonqin wants to merge 2 commits into
Open
Conversation
Page renames only remirrored the renamed page. Linking pages still stored [[uuid]] titles, so their Markdown mirrors kept stale [[Old Name]] wiki links until a manual regenerate. Queue referring pages when a page title or name changes. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
tiensonqin
marked this pull request as ready for review
August 31, 2026 16:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
When a page is renamed, Markdown mirrors of pages that link to it kept stale
[[Old Name]]wiki links until a manual regenerate or an edit of the linking page.affected-page-idsonly queued the pages of entities intx-data.:rename-pageonly updates the renamed page's:block/title/:block/name. Linking blocks store[[uuid]]and do not change, so their pages were never remirrored. Export already resolves those UUIDs to the current title, so remirroring the linking page is enough.This change also queues pages of blocks that reference the renamed page via
:block/_refswhen a page entity's title or name is added. Regular block title edits are unchanged.Fixes logseq/db-test#1132
Test plan
affected-page-idsincludes both the renamed page and the linking page<handle-tx-report!, Source.md contains[[TargetNew]]and not[[TargetOld]]Test evidence
LOGSEQ_STABLE_IDENTS=1 node static/tests.js -n frontend.worker.markdown-mirror-testFocused rename cases:
Includes
affected-page-ids-includes-linking-pages-on-page-rename-test,rename-updates-linking-page-mirror-test,rename-removes-old-mirror-path-test, andrename-with-unchanged-content-removes-old-mirror-path-test.