Fix property value blocks in visible results#12767
Open
megayu wants to merge 3 commits into
Open
Conversation
Collaborator
megayu
commented
Jun 4, 2026
- Normalize generated property value blocks to their owner in user-visible flows.
- Deduplicate linked references by visible block.
- Hide internal property value blocks from Search/CmdK results.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts how “generated property value blocks” (internal storage blocks created for property values) are handled across user-visible surfaces, so they don’t appear as standalone nodes and are instead attributed to their owning (visible) block where appropriate.
Changes:
- Hide generated property value blocks from search indexing and Search/CmdK results.
- Deduplicate linked references by the visible (owning) outline block, including updating the linked-refs count API.
- Add/extend tests to cover hiding, indexing exclusion, and linked-reference normalization/deduping.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/test/frontend/worker/search_test.cljs |
Adds tests ensuring property value blocks are hidden and excluded from indexing/search results. |
src/test/frontend/worker/db_core_test.cljs |
Adds tests for deduped refs-count behavior and “count ignores filters” semantics. |
src/test/frontend/db/reference_test.cljs |
Adds tests asserting linked refs are shown on the owning block and deduped. |
src/main/frontend/worker/search.cljs |
Hides property value blocks from indexing/results and pulls :logseq.property/created-from-property for filtering. |
src/main/frontend/worker/db_core.cljs |
Switches refs-count thread API to use the new linked-references count implementation. |
src/main/frontend/components/cmdk/core.cljs |
Normalizes “open block” behavior to the nearest visible outline block (handling property value blocks). |
deps/db/src/logseq/db/common/reference.cljs |
Normalizes linked refs to visible outline blocks; adds get-linked-references-count and includes property value ids in matched-children context. |
deps/db/src/logseq/db.cljs |
Introduces property-value-block? and visible-outline-block helpers used by search/references/CmdK. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
966
to
+971
| (or (ldb/page-in-library? @conn block) | ||
| (not (ldb/internal-page? block)))) | ||
| ;; remove non-page blocks when asking for pages only | ||
| (and page-only? (not (ldb/page? block))))) | ||
| (and page-only? (not (ldb/page? block))) | ||
| ;; generated property value blocks are storage nodes, not standalone search results | ||
| (ldb/property-value-block? block))) |
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.