Rollback must account for unsynced collaborator edits
Aliases: restore versus pending · in-flight collaborator edits
What it is
Restoring a document to a historical snapshot can collide with words someone else still holds unsynced in their session, or with sentences already synced that are newer than that snapshot. Handling those in-flight edits means rollback cannot stop at swapping the live draft for an old snapshot. It has to say where their gap goes: merge, keep in their session, become a conflict, or discard with notice. This is rollback’s consequence on a live collaboration. Whether history can be compared, and whether restore undoes for the person who tapped it, are another group. Here the object is the words still in someone else’s hand.
Why it happens
Rollback rewrites the shared live draft. Collaborators’ unsynced buffers live on another machine; when they save, they write onto a current that has already aged. If the product last-writes, rollback is undone a few seconds later by that sync, and the restorer thinks last week is back while a newer unsynced sentence covers it. If the product drops the buffer, the other person hits a silent loss. The right treatment is to treat rollback as an event for live sessions: people present are told “live draft restored to time T,” their buffers enter conflict or a sidecar save, instead of blindly writing onto the old snapshot. People not present must see the same event on next connect, not deposit the buffer as if it were the latest draft.
Studying it
Jia rolls back to an older snapshot; Yi, offline or delayed, typed a new sentence. Compare: Yi’s sync covers the rollback, Yi’s buffer vanishes, Yi sees a conflict and chooses.
Independent variables: whether rollback notifies people present, whether Yi’s buffer conflicts or writes through, behavior when an absentee later syncs. Dependent variables: rollback undone, Yi losing the sentence, Jia knowing the rollback did not stick.
Voice coordination between the two hides the UI event. Isolate them. Jia undoing their own restore is not Yi’s pending-edit handling. How pretty the version list looks is not a dependent variable here.
Where it stops holding
A solo document has no collaborator buffer; rollback only hits one’s other devices, which should follow the same rule as “another self.” Character-level live compose that can place Yi’s new sentence on a non-colliding span of the old snapshot can skip a conflict dialog, but Yi still needs to know a rollback happened, or they will think they edited the current timeline. People without history permission should not be asked to adjudicate rollback conflicts.
Applying it
- Before rollback, list writable people present and state whether their unsaved edits will conflict or be lost.
- After rollback, emit an event to people present and to those who sync later. Do not let their buffers become the new live draft with no prompt.
- Give Yi a named path: merge the buffer into the rolled-back draft, save aside, or discard.
- Verify: Yi types a sentence under delay, Jia rolls back. On Yi’s return that sentence must neither vanish silently nor silently undo Jia’s rollback. After Jia refreshes they should still see the snapshot they picked, unless Yi explicitly chose to cover it.
Related
- Within the group: H8.11.2 Diffs must show the actual change, not a whole-block swap · H8.11.3 Autosave versions and explicit saves need distinct marks · H8.11.4 Overgrown history needs a merge policy so the list stays readable
- Adjacent: H8.06 Version History · H8.07 Collaborative Edit Conflicts · H3.12 Undo Window and Scope
- Search terms:
rollback·pending edits·restore collaboration