From 1041eadeb215c1ebbf0615c7b88e97381a628ec2 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Tue, 16 Jun 2026 19:10:18 -0700 Subject: [PATCH] Use outline variant for merge abort buttons (#5558) Restore the quieter abort-merge styling that was accidentally reverted during the host-context merge repair in #5071. Abort merge and abort rebase now match the Review conflicts outline button treatment. --- .../components/right-sidebar/CommitArea.test.tsx | 8 ++++---- .../components/right-sidebar/SourceControl.tsx | 16 ++++++---------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/renderer/src/components/right-sidebar/CommitArea.test.tsx b/src/renderer/src/components/right-sidebar/CommitArea.test.tsx index 2d291048b3a..816543f5603 100644 --- a/src/renderer/src/components/right-sidebar/CommitArea.test.tsx +++ b/src/renderer/src/components/right-sidebar/CommitArea.test.tsx @@ -497,7 +497,7 @@ describe('ConflictSummaryCard', () => { expect(cherryPickMarkup).not.toContain('Abort rebase') }) - it('renders abort actions with operation-specific button treatment', () => { + it('renders abort actions with the quiet outline review-conflicts button treatment', () => { const mergeMarkup = renderToStaticMarkup( { ) expect(buttonContaining(mergeMarkup, 'Review conflicts')).toContain('data-variant="outline"') - expect(buttonContaining(mergeMarkup, 'Abort merge')).toContain('data-variant="destructive"') + expect(buttonContaining(mergeMarkup, 'Abort merge')).toContain('data-variant="outline"') expect(buttonContaining(rebaseMarkup, 'Review conflicts')).toContain('data-variant="outline"') expect(buttonContaining(rebaseMarkup, 'Abort rebase')).toContain('data-variant="outline"') }) @@ -560,7 +560,7 @@ describe('OperationBanner', () => { expect(cherryPickMarkup).not.toContain('Abort rebase') }) - it('renders abort actions with operation-specific button treatment', () => { + it('renders abort actions with the quiet outline button treatment', () => { const mergeMarkup = renderToStaticMarkup( ) @@ -568,7 +568,7 @@ describe('OperationBanner', () => { ) - expect(buttonContaining(mergeMarkup, 'Abort merge')).toContain('data-variant="destructive"') + expect(buttonContaining(mergeMarkup, 'Abort merge')).toContain('data-variant="outline"') expect(buttonContaining(rebaseMarkup, 'Abort rebase')).toContain('data-variant="outline"') }) }) diff --git a/src/renderer/src/components/right-sidebar/SourceControl.tsx b/src/renderer/src/components/right-sidebar/SourceControl.tsx index 2c47be56de9..f66f3df6ea4 100644 --- a/src/renderer/src/components/right-sidebar/SourceControl.tsx +++ b/src/renderer/src/components/right-sidebar/SourceControl.tsx @@ -6856,14 +6856,6 @@ function DiffCommentsInlineList({ ) } -function conflictAbortButtonVariant( - conflictOperation: GitConflictOperation -): 'outline' | 'destructive' { - // Why: aborting a rebase is the escape hatch for this state, so it should - // match the quiet outline conflict-review action instead of reading as red. - return conflictOperation === 'rebase' ? 'outline' : 'destructive' -} - export function ConflictSummaryCard({ conflictOperation, unresolvedCount, @@ -6939,7 +6931,9 @@ export function ConflictSummaryCard({ {(conflictOperation === 'merge' || conflictOperation === 'rebase') && onAbortOperation ? (