Problem
The file list already surfaces a "Conflicted" section, but conflicted files
render in the regular two-pane diff view, which doesn't show all three
sides (ours / theirs / base) that conflict resolution needs. Users have to
drop to another tool to actually resolve.
Proposal
For files in conflicted state, switch the diff pane to a three-pane (or
three-track) layout:
- Base — the merge base blob
- Ours — current branch's version (
HEAD)
- Theirs — the incoming branch's version (
MERGE_HEAD)
- Result — the working-tree version with conflict markers, editable
Provide per-hunk accept ours / accept theirs / accept both
buttons that write back to the working tree (the same write surface as the
existing stage / unstage / revert actions).
Open questions
- Whether to surface all three source blobs simultaneously or stack them as
two diffs (base→ours and base→theirs). Stacked is less screen real
estate but loses the at-a-glance "where do ours and theirs disagree"
signal.
- How to handle conflicts in non-text files (binary, image,
deleted-on-one-side, both-added with different content).
- Whether the "Result" pane is editable in DiffViewer or whether the user
edits in their own editor and DiffViewer just shows the current state.
Editable is much more ambitious; read-only-with-accept-buttons is the
smaller MVP.
Acceptance
- Conflicted files open in the three-way view (whatever layout is chosen).
- "Accept ours / theirs / both" produce the correct working-tree content
and clear the conflict markers from the result.
- (If editable) saving from the result pane writes back to disk.
- Tests cover the merge-resolution path in
GitWriteService (or a new
sibling service).
Notes
Tier 2 from the feature brainstorm. Scope: large — the most ambitious item
in this batch. Strongly recommend splitting into sub-issues: view-only
three-way first, accept-buttons second, editable result third.
Problem
The file list already surfaces a "Conflicted" section, but conflicted files
render in the regular two-pane diff view, which doesn't show all three
sides (ours / theirs / base) that conflict resolution needs. Users have to
drop to another tool to actually resolve.
Proposal
For files in conflicted state, switch the diff pane to a three-pane (or
three-track) layout:
HEAD)MERGE_HEAD)Provide per-hunk accept ours / accept theirs / accept both
buttons that write back to the working tree (the same write surface as the
existing stage / unstage / revert actions).
Open questions
two diffs (base→ours and base→theirs). Stacked is less screen real
estate but loses the at-a-glance "where do ours and theirs disagree"
signal.
deleted-on-one-side, both-added with different content).
edits in their own editor and DiffViewer just shows the current state.
Editable is much more ambitious; read-only-with-accept-buttons is the
smaller MVP.
Acceptance
and clear the conflict markers from the result.
GitWriteService(or a newsibling service).
Notes
Tier 2 from the feature brainstorm. Scope: large — the most ambitious item
in this batch. Strongly recommend splitting into sub-issues: view-only
three-way first, accept-buttons second, editable result third.