kolabnotes-android icon indicating copy to clipboard operation
kolabnotes-android copied to clipboard

Conflict Handling

Open grote opened this issue 9 years ago • 6 comments

When a note was changed on the server and on the client, this should be detected as a conflict and means should be provided to the user to resolve this conflict. Maybe by showing a diff and giving the option to edit the diff or take the server or the local version of the note.

grote avatar Dec 02 '15 15:12 grote

What do you think of the following: There will be a configuration field where it is possible to select one of the following:

  • Always ask if there is a conflict (conflict means: change on the server and local since the last sync)
  • Always take the object with the latest modification date
  • Always take server object
  • Always take local object

Depending on the selection, the sync will handle conflicts. What do you think should be the default?

I don't know if handling diffs on mobile devices is a good idea. I also think of non technical users, which don't know diffs, if it is a good experience for them, if this will be presented. I think the take this or take the other approach is better solution for mobile devices.

Another question is: when should the conflict dialog be shown (next app start, during sync if app ist started, after sync if app is started)?

konradrenner avatar Dec 09 '15 13:12 konradrenner

Having a conflict resolution preference with the various options you listed would of course be nice, because it gives users choice. But I would have also been happy with just asking the user what to do per conflict.

You are right that showing a diff will be difficult, but there should be at least the option to see both notes in some sort of quickview before deciding.

When to ask the user, I don't know. Might be tricky during sync since it runs in the backgound. But it might be tricking to do after the sync as well.

grote avatar Dec 09 '15 23:12 grote

I started working on this one. In the first throw, the "ask always" will not be available, but what do you think of the following idea:

For each note with a conflict, there will be a notification. The notification gives the user 3 choices: take local, take remote, compare.

Nothing will be done as long as the user doesn't select an option (except to finish the sync. The notes with conflicts will be ignored for this sync).

If the user chooses "compare" a special activity will be started, where you can switch between the remote and local note (technically there will be a second note table for conflicts, where the unmerged remote notes are stored).

Depending on the user decision, notes will get merged and synced with the next sync.

konradrenner avatar Dec 15 '15 19:12 konradrenner

Hi Konrad, this sounds good in principle. What happens if the user just dismisses the conflict notification? Is there any way to get it again and make a decision?

Once a decision is made, I would not wait for the next sync, but sync this note right away.

The second internal notes table for conflicts should not be synced to the server to prevent these notes showing up in other clients.

grote avatar Dec 16 '15 12:12 grote

The notification could be "pinned" as long as the conflict is not solved, or you could specify a "remind me later" time.

Yeah, good point that sync is done immediatly.

Of course such notes would not be synced.

konradrenner avatar Dec 16 '15 16:12 konradrenner

Done with version 1.2.0, except the "Ask always" possibility

konradrenner avatar Dec 19 '15 18:12 konradrenner