Grove.Tree.LogMove (Grove v0.1.1)
View SourceInternal representation of a move operation in the operation log.
Tracks both old and new parents for efficient undo/redo. Operations are stored in the log even if invalid (for potential future validity).
This is part of Kleppmann's undo-do-redo algorithm for CRDT-safe tree moves.
Summary
Functions
Creates a LogMove from a Move operation and current tree state.
Types
@type t() :: %Grove.Tree.LogMove{ child_id: String.t(), metadata: map(), new_parent: String.t() | nil, old_parent: String.t() | nil, position: Grove.Node.position() | nil, timestamp: Grove.HybridLogicalClock.t(), valid?: boolean() }