Repository navigation
fix(property): leave recycled values out of a block's displayed properties - #13728
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
force-pushed
the
fix/recycled-display-values
branch
from
October 16, 2026 18:36
563686b to
63890e5
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.
What goes wrong
Move a page to the Recycle bin while another page or block uses it as a node property value. The property area still shows that property with the recycled page as its value. When the recycled page is one of several values, it still appears among them. Recycled values are supposed to be left out of the property area, and a property whose only values are recycled is supposed to be hidden.
Cause
src/main/frontend/worker/handler/property.cljs,display-properties: for a stored block,display-properties-for-blockreads each ref value as a summary map fromplain-value/ref-value->summary. That map carries no:logseq.property/deleted-atand no parent.sanitize-property-values-for-displaycallsldb/recycled?on the summary, so it never finds a recycled value.Fix
Check whether a value is recycled on its entity, looked up by
:db/id, incontains-recycled-entity-value?andfilter-recycled-entity-values. A value without a:db/idis still checked as given.Test
frontend.worker.handler.property-test/display-properties-of-a-stored-block-leaves-out-recycled-valuesrecycles a page used as a single-value node property and as one of two values of a many-value node property. It expects the first property to be left out and the second to keep only the live value. Both assertions fail on master and pass with the fix.