Steps to reproduce
- Create an empty node, and sync.
- Go to a second computer, sync.
- Disconnect from the network. With that same computer, edit that node, say typing:
- paste a TON of stuff here.
Back to the first computer, delete that empty node.
Back to the second computer, reconnect to the net, and sync.
The entire tree vanishes.
I expect those edits to be retained. Especially because it was such a trivial deletion, it shouldn’t override the edit, but even if it’s not a trivial thing that is deleted, the stuff created on the other computer should not be deleted by a delete taking place elsewhere. They don’t know what all was deleted.
If both nodes are edited, the sync process should know both nodes are edited, and create an extra conflict node so we can see both versions. A tag gets attached to each version saying we have a sync issue, and the users can review both and integrate. (Searching for #syncissue could be very helpful for a user trying to resolve the confusion.)
If one node is deleted and the other edited, the edited one should remain, and (optional) mark as a #syncissue.
Tested with Windows, Chrome, and iOS app as my two devices. I had wifi not connected for the computer. (was at Starbucks, connection not opened yet).
No, the item that got deleted never made it into the History.
A very important point here: I might not know the other computer didn’t sync yet. From the current screen it says synced, but if they other was turned off, then I turn it on and it syncs, accidental deletion may occur.
Points 3 and 4 above can (probably) happen in reverse. That is, everything is synced and I delete a node. Later I go to a computer which I thought was synced, do a whole bunch of work, and then SURPRISE it all gets erased.
Implementing is a bit tricky of course. In detail, what you should have is timestamping or version stamping of nodes. When syncing a change, you need to detect not the just exact same node, but any children of that node in the case of deletion.
I am all but certain this bug has caused me to lose a non-trivial amount of data in the past. Trouble is it can be subtle - something disappears that you aren’t looking at now. And afterwards you wonder if you really typed it where you thought you did.