Repository navigation
Conversation
Creating blocks via outliner ops derives :logseq.property/created-by-ref from the user's id token. Redo replaying semantic ops contains only the user ops, so skipping the hook on :redo? lost the attribute. Verbatim replay of recorded tx-data already contains it. Guard on :db-sync/replayed-tx-data? (the verbatim replay marker) instead of :redo?. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
1 of 2 tasks
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
Redo of a transaction that creates blocks via semantic outliner-ops lost the derived
:logseq.property/created-by-refattribute.apply-history-action!replays history two ways: verbatim recorded tx-data (:db-sync/replayed-tx-data?), which already contains the derived attribute, and semantic outliner-ops replay, which contains only the submitted ops and needscompute-extra-tx-datato re-derive effects.add-created-by-ref-hookskipped on:redo?, covering both paths, so ops replay redid the block creation but notcreated-by-ref.Guard on
:db-sync/replayed-tx-data?instead — skip only on verbatim replay.Test
redo-ops-replay-keeps-created-by-ref-test: inserting a block viainsert-blocksderivescreated-by-reffrom the id token; after undo+redo the attribute exists again (fails on master —nilafter redo).Same defect class as logseq/db-test#1387 (
commands-tx, fixed in #13562).Link to Devin session: https://app.devin.ai/sessions/a7c1b1acb1a647d5b05c319063b5aa7a
Open in Devin Desktop: https://app.devin.ai/desktop/session/a7c1b1acb1a647d5b05c319063b5aa7a?variant=devin
Requested by: @megayu