Skip to content

Ajout du undo#3

Open
gingerwatcho wants to merge 8 commits intoopenflexo-team:1.6.1from
TeodoreAutuly:ginger
Open

Ajout du undo#3
gingerwatcho wants to merge 8 commits intoopenflexo-team:1.6.1from
TeodoreAutuly:ginger

Conversation

@gingerwatcho
Copy link
Copy Markdown

No description provided.

TeodoreAutuly and others added 8 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>
@GabrieleLS GabrieleLS deleted the ginger 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