Skip to content

Excalidraw sync drops legitimate updates due to fragile checksum heuristic #17

@zxch3n

Description

@zxch3n

examples/excalidraw-example/src/hooks/useLoroSync.ts:210-218

  • The hook sums element version fields and treats equal sums as “no change,” returning early. Any scene
    change that keeps the sum constant (e.g. swapping shapes with same version, many app-state changes, or
    attribute tweaks that don’t bump version) gets skipped and never written into the CRDT.
  • Collaborators then miss color/theme toggles or reordered elements, even though CRDT state actually
    changed.
  • Fix: Remove the checksum guard or replace it with a real diff keyed by element ID + version/app-state
    hash. Let Loro’s own dedup handle identical imports instead of this false-negative-prone shortcut.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions