Repository navigation
Conversation
|
Size Change: +11 B (0%) Total Size: 8.6 MB 📦 View Changed
|
|
Flaky tests detected in 0e7badd. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/27600293968
|
Mamaduka
force-pushed
the
fix/rtc-fully-undo-dirty-state
branch
from
June 18, 2026 08:13
0e7badd to
1bea129
Compare
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?
Fixes the same bug as in #77100, but when RTC is enabled.
Current problem
editEntityRecord({ blocks, content: serializeBlocksFn }).contentis a lazy function.applyPostChangesToCRDTDocskips function values, so CRDT'sblocksupdates butcontentstays as the original, pre-move HTML.getChangesFromCRDTDocemitscontent = <stale original HTML>(sincegetRawValue(fn)isundefined, diff sees a change).contentmatchespersistedRecord.content.raw→ clears the edit.blocksremains, which is transient → post not dirty → "Save draft" hidden.Pre-fix this was masked: the stale value still got stored in edits, keeping the post dirty.
Suggested fixes (by Claude)
contentfunction inapplyPostChangesToCRDTDocso CRDT stores fresh content.contentwhenblocksis synced — let each peer serialize locally.Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast
Use of AI Tools
Assisted by Claude.