Repository navigation
fix(page): creating a page does not open a namespace child, tag or property of that name - #13625
Merged
tiensonqin merged 2 commits intoOct 19, 2026
Conversation
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 6, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 8, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 11, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 13, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 16, 2026
yuxi-liu-wired
force-pushed
the
fix/create-page-not-child-or-tag
branch
from
October 16, 2026 18:34
0a7917a to
294b6eb
Compare
yuxi-liu-wired
force-pushed
the
fix/create-page-not-child-or-tag
branch
from
October 18, 2026 11:01
294b6eb to
45368b7
Compare
…operty of that name <create!'s name lookup returns the oldest page of that name of any kind anywhere, and it returned that page instead of creating one: "Bar" with "Foo/Bar" opened Foo/Bar's Bar, "foo" with a tag "Foo" opened the tag (db-test logseq#1345). It now reuses only a journal or an ordinary top-level page, as the worker's create does, and creates otherwise.
tiensonqin
force-pushed
the
fix/create-page-not-child-or-tag
branch
from
October 19, 2026 09:59
8171ae3 to
fe7dcf9
Compare
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.
Part of logseq/db-test#1345 (the page side; creating a tag whose name a namespaced tag has is not covered).
Create "Foo/Bar" (the Library holds Foo, with Bar under it), then type
[[Barin a block and pick "New page Bar". No page is created and the link goes to Foo/Bar's Bar. In the other order both pages exist, as db-test#429 asked for. The same lookup opens a tag or a property: after the tag "#Foo", creating the page "foo" returns the tag.<create!insrc/main/frontend/handler/common/page.cljspulls[:block/name ...]first and returns what it finds instead of creating. That lookup resolves to the oldest page of that name of any kind anywhere (ldb/get-page), a namespace child, a tag or a property included. The worker's own create,outliner-page/create, looks only for an ordinary page and creates a new one when the page it finds has a parent.<create!now reuses the found page only when it is what the worker would reuse: a journal, or an ordinary page (tagged Page, not a tag or a property) with no parent or the Library as parent. Otherwise the create goes to the worker, which creates the page.:logseq.property/built-in?is added to the pulled fields so the Library is told by the same test aslogseq.db.frontend.dbuses.New test
create-page-does-not-open-a-namespace-child-or-a-tag-testinsrc/test/frontend/handler/common/page_test.cljs, against a real graph: "Bar" with "Foo2/Bar" there gives a new top-level Bar, "foo" with a tag "Foo" there gives a new page, and creating "Bar" again opens that Bar. On master the first 2 open the child and the tag; with the change it passes.create-existing-page-uses-worker-page-lookup-test's page now carries its Page tag and the new selector field.frontend.handler.common.page-test,frontend.handler.page-test,frontend.handler.db-based.page-test,frontend.components.editor-test,frontend.handler.editor-testandfrontend.components.cmdk-testpass.