Page MenuHomePhabricator

Enable performing conflict resolution in VisualEditor
Open, Needs TriagePublicFeature

Description

Proposed by @jsn.sherman

Feature summary: Suppose, while an editor has a page open in VE, a new revision is saved by someone else. Provide a way to merge that revision into the current edit session, using the rich diff information available to resolve conflicts better than can be done on the server side.

Use case(s): Server-side automatic merges fail in many cases, for instance when there are adjacent (but non-overlapping) changes not separated by enough unchanged context.

Benefits: Better automatic merge handling. Better experience for the editor who has invested in authoring a revision. Less chance of inadvertent content loss/corruption during manual merge.

Event Timeline

This could be implemented by:

  • importing the remote revision and displaying it as a ve.dm.VisualDiff;
  • then, if the user chooses to proceed, converting the remote revision into a single ve.dm.Change that applies to the common base document (=the document at the start of the edit session);
  • then rebasing that change against the current document's completeHistory (=the transactions that correspond to the changes during the edit session), before applying it;
  • then applying the rebased change.