Skip to content

fix: exclude Root Tag from Extends choices - #13287

Merged
tiensonqin merged 6 commits into
masterfrom
fix/db-test-1179-root-tag-extends
Nov 5, 2026
Merged

tiensonqin merged 6 commits into
masterfrom
fix/db-test-1179-root-tag-extends

Conversation

@tiensonqin

@tiensonqin tiensonqin commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Root Tag is an implicit default parent and is no longer offered as an Extends choice. Selecting another tag still retracts Root; clicking Root in the picker no longer adds it.

Fixes logseq/db-test#1179

Demo

On a child tag, Extends may start as Root Tag. The Extends picker does not offer Root Tag; selecting another tag updates Extends to that tag.

extends_picker_select_parent_tag.mp4

Extends starts as Root Tag

Extends picker without Root Tag

Extends after selecting ParentTag


Devin Review

Copilot AI lite review requested due to automatic review settings September 17, 2026 16:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cursor

cursor Bot commented Sep 18, 2026

Copy link
Copy Markdown

Demo

On #ChildTag, Extends starts as Root Tag. The Extends picker does not offer Root Tag. Selecting ParentTag updates Extends to ParentTag only.

extends_picker_select_parent_tag.mp4

Extends starts as Root Tag
Extends picker without Root Tag
Extends after selecting ParentTag

cursor Bot pushed a commit that referenced this pull request Sep 18, 2026
devin-ai-integration Bot pushed a commit that referenced this pull request Sep 23, 2026
@devin-ai-integration
devin-ai-integration Bot force-pushed the fix/db-test-1179-root-tag-extends branch from 2d7be96 to bfbec80 Compare September 23, 2026 16:34

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Verified the Extends-picker UX on the web app (built from this branch with pnpm watch, DB graph in Chrome):

  • Converted a page to a tag → Extends shows Root Tag as the implicit parent (unchanged display).
  • The picker no longer offers "Root Tag" — options were Card, ChildTag, Comment, Comments, ParentTag, Task:

Extends picker without Root Tag

  • Selecting another tag retracts Root instead of co-listing it:
Before After
Extends starts as Root Tag Extends after selecting ParentTag
  • Deselecting the parent restores "Root Tag" as the Extends value. No Extends-related console errors (only pre-existing React hydration/key warnings).

Full flow:

Extends picker flow

Repro pathCreate page via Ctrl+K → right-click title → Convert to Tag → click the empty space in the Extends value cell (the "Root Tag" text itself is a link). A `#`-created class page hides the property area behind the collapsed title block — expand ▸ left of the title to see it.

tiensonqin added a commit that referenced this pull request Sep 24, 2026
@tiensonqin
tiensonqin force-pushed the fix/db-test-1179-root-tag-extends branch from 60e6cf0 to f5f1dda Compare September 24, 2026 17:49
tiensonqin added a commit that referenced this pull request Sep 24, 2026
@tiensonqin
tiensonqin force-pushed the fix/db-test-1179-root-tag-extends branch from f5f1dda to bb36c73 Compare September 24, 2026 19:25
megayu pushed a commit that referenced this pull request Oct 29, 2026
@megayu
megayu force-pushed the fix/db-test-1179-root-tag-extends branch from bb36c73 to 079f53a Compare October 29, 2026 03:52
tiensonqin and others added 6 commits November 5, 2026 08:50
Root Tag is an implicit default parent, not a selectable Extends value.
Filter it from picker candidates and ignore adding it alongside another
parent so deselecting Root in the popup cannot add it.

Fixes logseq/db-test#1179
:logseq.class/Root is already excluded via extends-hidden-tags; hoist
root-class-eid lookup out of the remove predicate.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@tiensonqin
tiensonqin force-pushed the fix/db-test-1179-root-tag-extends branch from 079f53a to 52e00d8 Compare November 5, 2026 08:50
@tiensonqin
tiensonqin merged commit 2117d37 into master Nov 5, 2026
@tiensonqin
tiensonqin deleted the fix/db-test-1179-root-tag-extends branch November 5, 2026 08:51
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 11, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 11, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 12, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 12, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 13, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 14, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 15, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 16, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 16, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 17, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 17, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 18, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 18, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 18, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 18, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 18, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 18, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 18, 2026
Since master's logseq#13449 the undo of a page create recycles the page and its new namespace parents and tags, and redo restores them with their uuids; master pins this with tests on a local graph. This branch's local-graph undo replayed the create's tx datoms instead, which retracts the page, so those tests failed after the rebase. A page create on a local graph now keeps its client-op row and semantic ops, and its undo and redo take the semantic path as on a synced graph (replays-tx-datoms?); every other local transaction still replays its datoms. The redo-create-page test no longer marks its graph synced, and the pipeline replay test expects the page recycled after the undo.

That pipeline replay test also changed Movie's parent tag to Root with set-block-property; since master's logseq#13287 adding Root next to another parent is ignored, so the change recorded no undo entry. It now removes the parent tag, which gives Movie the Root tag as parent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Root Tag is added to Extends when deselecting the Root Tag option

4 participants