Page MenuHomePhabricator

Investigation: Can we detect where exactly a conflict happened and auto-resolve?
Open, Needs TriagePublic

Assigned To
None
Authored By
thiemowmde
Feb 19 2020, 12:46 PM
Referenced Files
F31705276: Comments 2.pdf
Mar 27 2020, 4:14 PM
F31705277: Comments 1.pdf
Mar 27 2020, 4:14 PM
F31705266: Comments 1.jpg
Mar 27 2020, 4:13 PM
F31705267: Comments 2.jpg
Mar 27 2020, 4:13 PM
F31705260: Comments 2.pdf
Mar 27 2020, 4:11 PM
F31705261: Comments 1.pdf
Mar 27 2020, 4:11 PM
F31705148: image.png
Mar 27 2020, 3:24 PM
F31705146: image.png
Mar 27 2020, 3:24 PM

Description

Can we detect which paragraphs are not in conflict, and possibly auto-resolve these or pre-select one side?

As of now, the TwoColConflict code just detects if a conflict happened, but not where. The resolution interface shows all paragraphs, not only the conflicting ones.

This came up while discussing T229217.

Examples

Here are two cases, treated four different ways.

  • In case "A", the "other" user has made a lot of little changes throughout the document, and "you" have changed two paragraphs.
    • A-1: Current code. Show the full diff.
    • A-2: Optimistic merge from yours into other.
    • A-3: Optimistic merge from other into yours.
    • A-4: Attempt optimistic merges in both directions.
  • In the case "B", the other user made few changes, and you made a lot of changes throughout.
    • B-1: Current code. Show the full diff.
    • B-2: Optimistic merge from yours into other.
    • B-3: Optimistic merge from other into yours.
    • B-4: Attempt optimistic merges in both directions.

A-1

image.png (670×776 px, 46 KB)

A-2

image.png (748×777 px, 50 KB)

A-3

image.png (559×760 px, 40 KB)

A-4

image.png (524×764 px, 31 KB)

B-1

image.png (654×768 px, 44 KB)

B-2

image.png (544×770 px, 36 KB)

B-3

image.png (763×777 px, 55 KB)

B-4

image.png (528×766 px, 31 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 577008 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/TwoColConflict@master] [WIP] experiment with automerging

https://gerrit.wikimedia.org/r/577008

I've included all my comments in the attachment (pdf/jpg have same content) so you can read the comment next to the corresponding UI.

Short version
I think we should choose between version 2 (merge yours into other) and 4 (merge both directions). I've included pros/cons for each. I think in order for 2 to work well, it would need a slight change to the highlighting rules though.

Overall comments

Comments 1.jpg (3×1 px, 1 MB)

Changes to version 2 to make clear

Comments 2.jpg (938×1 px, 236 KB)

@ecohen Thanks for the thoughtful feedback! I completely agree with your points, and also with your conclusion that (2) and (4) are ideal next steps, if we can make the time to do so. I would add that the status quo (1) isn't ideal, but perfectly serviceable for a first release and light-years beyond the legacy workflow.

Tiny question about your comment on B-3, when you say 'muddies the meaning of "Latest Revision"' I would have thought the same about (2) and (4) because those strategies both change the content of the "other" / latest revision. My beef with (3) is the opposite—that it changes "your" revision, which could be surprising. (4) does so as well but I forgive it because the outcome is so magical.

Lemme also problematize B-2 line 4: the highlighting only ever shows additions, so if we had deleted text in the right-hand side, it would still show up as a highlighted addition on the left-hand side. This is similar to what you pointed out in A-2, and if we implemented (2) without a new word-diff algorithm, I worry that it would translate to only a minimal improvement over (1).

If it's helpful, I'm happy to explore the word-diff algorithm and give some more examples of how it might sometimes lead to confusing experiences.

Lena_WMDE renamed this task from Investigation: Can we detect where exactly a conflict happened? to Investigation: Can we detect where exactly a conflict happened and auto-resolve?.Apr 23 2020, 8:05 AM