Repository navigation
fix(tag): creating a tag does not return a namespaced tag of that name - #13626
Closed
yuxi-liu-wired wants to merge 1 commit into
Closed
yuxi-liu-wired wants to merge 1 commit into
yuxi-liu-wired wants to merge 1 commit into
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
create looked up an existing tag by exact title among all tags, so after "#Foo/Baz", creating "#Baz" returned Foo's Baz (db-test logseq#1345). A create without a namespace now leaves out tags extending a tag other than Root.
yuxi-liu-wired
force-pushed
the
fix/create-tag-top-level
branch
from
October 16, 2026 18:34
72fde28 to
725fdc5
Compare
Contributor
Author
|
Combined with the other PRs that change the same files into #13786. |
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 tag side; the page side is #13625).
Create the tag "#Foo/Baz", then the tag "#Baz": the second create returns Foo/Baz's "Baz" and no top-level tag "Baz" exists. In the other order, "#Baz" then "#Foo/Baz", both tags exist, and tags in different namespaces may share a name (db-test#466).
createindeps/outliner/src/logseq/outliner/page.cljslooks for an existing tag withldb/page-exists?and#{:logseq.class/Tag}, which matches the exact title among all tags, whatever they extend, and returns the first. Pages are already checked for a parent before being reused.When the title has no namespace,
createof a tag now leaves out tags that extend a tag other than Root Tag, i.e. tags inside a namespace. A top-level tag with the title is still reused, and a create of a namespaced title goes throughsplit-namespace-pagesas before.New test
create-tag-does-not-return-a-namespaced-tag-of-that-nameindeps/outliner/test/logseq/outliner/page_test.cljs: "Foo/Baz" then "Baz" as tags gives a new tag Baz extending Root Tag, and creating "Baz" again returns it. On master the second create returns Foo's Baz; with the change it passes. The outliner tests indeps/outliner(158 tests) andfrontend.handler.common.page-test,frontend.handler.page-test,frontend.worker.handler.page-test,frontend.handler.db-based.page-test,frontend.components.cmdk-test,frontend.worker.undo-redo-testpass.