mirror of
https://github.com/penpot/penpot.git
synced 2026-10-30 14:30:37 +00:00
A remote commit undoes the pending local commits, applies the remote changes and replays the local ones, so the local file ends like the server will: remote first, local last. Only queued commits took part; the ones still waiting in the persistence buffer (up to ~3s of edits) stayed under the remote change. When both touched the same attribute, the remote value won locally but lost on the server. The buffer now lives in the store ([:persistence :buffer]) instead of an rx buffer, so the rebase can reach it. A flush merges it per file into queue entries that keep the list of commits they carry, and the leave-page guard reads buffer and queue from the store. A buffer left by a previous session is queued when persistence starts.