From f6dc218ae7f34ac6c8e3f6755a0a26f157c8d2d6 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 21 Sep 2025 21:59:24 -0500 Subject: [PATCH] Remove "Repository Information" from GitDialog --- src/components/GitDialog.test.tsx | 8 ++-- src/components/GitDialog.tsx | 77 +------------------------------ 2 files changed, 4 insertions(+), 81 deletions(-) diff --git a/src/components/GitDialog.test.tsx b/src/components/GitDialog.test.tsx index faf4e17b..fa03051d 100644 --- a/src/components/GitDialog.test.tsx +++ b/src/components/GitDialog.test.tsx @@ -64,7 +64,7 @@ describe('GitDialog', () => { }); }); - it('renders git repository information', () => { + it('renders git dialog without repository information section', () => { render( {}}> @@ -74,10 +74,8 @@ describe('GitDialog', () => { ); expect(screen.getByText('Git Repository Status')).toBeInTheDocument(); - expect(screen.getByText('Repository Information')).toBeInTheDocument(); - expect(screen.getByText('main')).toBeInTheDocument(); - expect(screen.getByText('5')).toBeInTheDocument(); - expect(screen.getAllByText('origin')).toHaveLength(2); // Appears in remotes and credentials sections + expect(screen.queryByText('Repository Information')).not.toBeInTheDocument(); + expect(screen.getByText('origin')).toBeInTheDocument(); // Appears in credentials section }); it('shows sync status', () => { diff --git a/src/components/GitDialog.tsx b/src/components/GitDialog.tsx index 56ef8f13..8c444aff 100644 --- a/src/components/GitDialog.tsx +++ b/src/components/GitDialog.tsx @@ -31,7 +31,6 @@ import { Plus, Minus, Edit, - RefreshCw, Settings, AlertTriangle, Zap, @@ -399,11 +398,7 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog } }; - const handleRefresh = async () => { - await refetchGitStatus(); - setPushResult(null); - setPullResult(null); - }; + const getFileStatusIcon = (status: string) => { switch (status) { @@ -486,76 +481,6 @@ export function GitDialog({ projectId, children, open, onOpenChange }: GitDialog
- {/* Repository Info */} - - - - Repository Information - - - - - {gitStatus?.isGitRepo ? ( - <> -
- Current Branch: - - {gitStatus.currentBranch || 'unknown'} - -
- -
- Total Commits: - {gitStatus.totalCommits} -
- - {gitStatus.latestCommit && ( -
- Latest Commit: -
-
- {gitStatus.latestCommit.oid.substring(0, 7)} -
-
{gitStatus.latestCommit.message}
-
- - {new Date(gitStatus.latestCommit.author.timestamp * 1000).toLocaleString()} -
-
-
- )} - - {gitStatus.remotes.length > 0 && ( -
- Remotes: - {gitStatus.remotes.map((remote) => ( -
-
- {remote.name} - - {remote.url} - -
-
- ))} -
- )} - - ) : ( -
- -

Not a Git repository

-
- )} -
-
{/* Credentials Status */} {gitStatus?.isGitRepo && gitStatus.remotes.length > 0 && (