From 9af3b49e7b14f5ea30ecaa9c67fbfb48a4d236be Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Wed, 6 May 2026 01:31:23 +0300 Subject: [PATCH] fix: remove duplicate clean-state sync action Keep sync available only in the Git header Simplify the clean working tree empty state --- packages/ui/src/components/views/GitView.tsx | 13 +------- .../components/views/git/GitEmptyState.tsx | 33 ++----------------- 2 files changed, 3 insertions(+), 43 deletions(-) diff --git a/packages/ui/src/components/views/GitView.tsx b/packages/ui/src/components/views/GitView.tsx index 8cabfdc4..b651ceb3 100644 --- a/packages/ui/src/components/views/GitView.tsx +++ b/packages/ui/src/components/views/GitView.tsx @@ -2241,18 +2241,7 @@ export const GitView: React.FC = () => { /> ) : ( - 0 ? (status?.ahead ?? 0) : 0} - behind={effectiveRemotes.length > 0 ? (status?.behind ?? 0) : 0} - isSyncing={syncAction === 'sync'} - onSync={() => { - const remote = effectiveRemotes[0]; - if (!remote) { - return; - } - void handleSyncAction('sync', remote); - }} - /> + )} ) : null} diff --git a/packages/ui/src/components/views/git/GitEmptyState.tsx b/packages/ui/src/components/views/git/GitEmptyState.tsx index ba039ced..d7d1389f 100644 --- a/packages/ui/src/components/views/git/GitEmptyState.tsx +++ b/packages/ui/src/components/views/git/GitEmptyState.tsx @@ -1,23 +1,9 @@ import React from 'react'; -import { RiGitCommitLine, RiRefreshLine, RiLoader4Line } from '@remixicon/react'; -import { Button } from '@/components/ui/button'; +import { RiGitCommitLine } from '@remixicon/react'; import { useI18n } from '@/lib/i18n'; -interface GitEmptyStateProps { - ahead: number; - behind: number; - onSync: () => void; - isSyncing: boolean; -} - -export const GitEmptyState: React.FC = ({ - ahead, - behind, - onSync, - isSyncing, -}) => { +export const GitEmptyState: React.FC = () => { const { t } = useI18n(); - const hasSyncChanges = ahead > 0 || behind > 0; return (
@@ -27,21 +13,6 @@ export const GitEmptyState: React.FC = ({

{t('gitView.empty.cleanDescription')}

- - {hasSyncChanges && ( - - )}
); };