Skip to content

fix(property): leave recycled values out of a block's displayed properties - #13728

Closed
yuxi-liu-wired wants to merge 1 commit into
logseq:masterfrom
yuxi-liu-wired:fix/recycled-display-values
Closed

yuxi-liu-wired wants to merge 1 commit into
logseq:masterfrom
yuxi-liu-wired:fix/recycled-display-values

Conversation

@yuxi-liu-wired

Copy link
Copy Markdown
Contributor

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-block reads each ref value as a summary map from plain-value/ref-value->summary. That map carries no :logseq.property/deleted-at and no parent. sanitize-property-values-for-display calls ldb/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, in contains-recycled-entity-value? and filter-recycled-entity-values. A value without a :db/id is still checked as given.

Test

frontend.worker.handler.property-test/display-properties-of-a-stored-block-leaves-out-recycled-values recycles 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.

@yuxi-liu-wired

Copy link
Copy Markdown
Contributor Author

Combined with the other PRs that change the same files into #13786.

@yuxi-liu-wired
yuxi-liu-wired deleted the fix/recycled-display-values branch October 21, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant