From 18479c023e958dccbe49a973559be51970f41d23 Mon Sep 17 00:00:00 2001 From: Mika Kuns Date: Fri, 19 Jun 2026 10:43:35 +0200 Subject: [PATCH] feat(merge): add accept-both control to the 3-pane conflict gutter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The between-pane gutter only offered single-side replace (accept ours / accept theirs). Add an 'accept both' (⊕) control under the ours chevron that drops ours-then-theirs into the result region, so a conflict can be combined in one click instead of picking one side and hand-adding the other. en/de keys added. --- src/ClaudeDo.Localization/locales/de.json | 1 + src/ClaudeDo.Localization/locales/en.json | 1 + .../Views/Conflicts/ConflictResolverView.axaml.cs | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/src/ClaudeDo.Localization/locales/de.json b/src/ClaudeDo.Localization/locales/de.json index 36d1339..0b198bf 100644 --- a/src/ClaudeDo.Localization/locales/de.json +++ b/src/ClaudeDo.Localization/locales/de.json @@ -408,6 +408,7 @@ "nextConflict": "Nächster Konflikt (F8)", "acceptOurs": "Ours ins Ergebnis übernehmen", "acceptTheirs": "Theirs ins Ergebnis übernehmen", + "acceptBoth": "Beide übernehmen (ours, dann theirs)", "continue": "Lösen & fortfahren", "abort": "Merge abbrechen" }, diff --git a/src/ClaudeDo.Localization/locales/en.json b/src/ClaudeDo.Localization/locales/en.json index 0317a6b..1077fb7 100644 --- a/src/ClaudeDo.Localization/locales/en.json +++ b/src/ClaudeDo.Localization/locales/en.json @@ -408,6 +408,7 @@ "nextConflict": "Next conflict (F8)", "acceptOurs": "Accept ours into result", "acceptTheirs": "Accept theirs into result", + "acceptBoth": "Accept both (ours, then theirs)", "continue": "Resolve & continue", "abort": "Abort merge" }, diff --git a/src/ClaudeDo.Ui/Views/Conflicts/ConflictResolverView.axaml.cs b/src/ClaudeDo.Ui/Views/Conflicts/ConflictResolverView.axaml.cs index b7a19e7..0664196 100644 --- a/src/ClaudeDo.Ui/Views/Conflicts/ConflictResolverView.axaml.cs +++ b/src/ClaudeDo.Ui/Views/Conflicts/ConflictResolverView.axaml.cs @@ -216,6 +216,7 @@ public partial class ConflictResolverView : Window private void AcceptOurs(MergeConflictBlock block) => AcceptInto(block, block.Ours); private void AcceptTheirs(MergeConflictBlock block) => AcceptInto(block, block.Theirs); + private void AcceptBoth(MergeConflictBlock block) => AcceptInto(block, block.Ours + block.Theirs); private void AcceptInto(MergeConflictBlock block, string text) { @@ -274,8 +275,13 @@ public partial class ConflictResolverView : Window var capturedBlock = block; if (tv.TranslatePoint(new Point(0, y), LeftGutter) is { } pl && pl.Y > -24 && pl.Y < LeftGutter.Bounds.Height + 24) + { AddAcceptButton(LeftGutter, pl.Y, "›", () => AcceptOurs(capturedBlock), Tr("conflictResolver.acceptOurs")); + // "Accept both" sits just under the ours chevron: ours text then theirs text. + AddAcceptButton(LeftGutter, pl.Y + 21, "⊕", () => AcceptBoth(capturedBlock), + Tr("conflictResolver.acceptBoth")); + } if (tv.TranslatePoint(new Point(0, y), RightGutter) is { } pr && pr.Y > -24 && pr.Y < RightGutter.Bounds.Height + 24)