fix: treat cleared deadline/scheduled as absent when repeating - #13506
Open
tiensonqin wants to merge 3 commits into
Open
tiensonqin wants to merge 3 commits into
tiensonqin wants to merge 3 commits into
Conversation
Date-picker delete keeps the property and writes empty-placeholder. Repeat advance coerced that keyword with to-date-time and aborted the status transaction. Treat the placeholder as no date. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Replace some->/cond-> in reschedule with an explicit if so the empty-placeholder skip is one clear path. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
devin-ai-integration
Bot
force-pushed
the
logseq/fix-repeat-empty-placeholder-fa5a
branch
from
October 2, 2026 08:54
192f3b2 to
e479a1d
Compare
A datascript Entity is ILookup/IAssociative but not IMap, so the map? guard never matched a real placeholder entity — only the plain-map stubs in tests. Compare :db/ident directly (nil-safe on scalars) and cover the entity path with d/entity in the test. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔍 Devin Review: 2 flags
Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
This branch has not been deployed
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.
Summary
Fixes logseq/db-test#1353
Date-picker delete keeps Deadline/Scheduled on the block and writes
:logseq.property/empty-placeholder. Checking a repeating task then ran the worker repeat command, which coerced that keyword withtc/to-date-timeand aborted the wholeset-block-propertytransaction. The task stayed Todo with today's date.Treat empty-placeholder as an absent date in
frontend.worker.commands:present-date-valueunwraps a real date/datetime or nil for unset/cleared values;empty-placeholder-value?matches both the keyword (scalar:datetime) and the placeholder entity (ref-typed values) —:db/identreads through a datascript Entity, whichmap?would miss.reschedule-property-identsandexisting-repeat-temporal-property-identsskip cleared companion dates;get-next-time/compute-reschedule-property-txskip cleared values beforetc/to-date-time.Checking the task then succeeds. A remaining real date advances; a cleared date is left empty. Same result as removing the companion property entirely.
Tests
frontend.worker.commands-testcovers the issue cases in UTC and Asia/Tokyo:set-block-propertypath through the worker pipelineget-next-timeon the keyword and on a real placeholderEntityLOGSEQ_STABLE_IDENTS=1 node static/tests.js -n frontend.worker.commands-test: 20 tests, 114 assertions, 0 failures.Link to Devin session: https://app.devin.ai/sessions/5f41fc5e552b4b3a8aad9a055b935141
Open in Devin Desktop: https://app.devin.ai/desktop/session/5f41fc5e552b4b3a8aad9a055b935141?variant=devin
Requested by: @megayu