Skip to content

Correction tests sync#4

Open
samuelyao107 wants to merge 10 commits intoopenflexo-team:1.6.1from
TeodoreAutuly:samuel
Open

Correction tests sync#4
samuelyao107 wants to merge 10 commits intoopenflexo-team:1.6.1from
TeodoreAutuly:samuel

Conversation

@samuelyao107
Copy link
Copy Markdown

No description provided.

TeodoreAutuly and others added 10 commits January 13, 2026 10:22
When applying remote operations, AtomicEdits were incorrectly tagged
with the local replicaId instead of the remote replica's ID. This
caused the UndoManager to not filter out remote edits properly.

Changes:
- Added ThreadLocal<String> currentRemoteReplicaId in SyncEditingContext
- Added getCurrentOperationReplicaId() method that returns the remote
  replicaId when applying a remote operation, otherwise the local one
- Modified onOperationReceived() to set currentRemoteReplicaId before
  applying remote operations
- Modified onStateReceived() to set currentRemoteReplicaId before
  restoring from snapshot
- Updated ProxyMethodHandler.getCurrentReplicaId() to use the new
  getCurrentOperationReplicaId() method

Now each replica can only undo its own AtomicEdits, not those from
other replicas.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Modification Undo manager (Ginger part)
@GabrieleLS GabrieleLS deleted the samuel branch January 22, 2026 17:48
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.

5 participants