diff --git a/frontend/src/components/repo/RepoCard.tsx b/frontend/src/components/repo/RepoCard.tsx
index c52d033a..55147062 100644
--- a/frontend/src/components/repo/RepoCard.tsx
+++ b/frontend/src/components/repo/RepoCard.tsx
@@ -2,7 +2,7 @@ import { useState } from "react";
import { Button } from "@/components/ui/button";
import { Badge } from "@/components/ui/badge";
import { Checkbox } from "@/components/ui/checkbox";
-import { Loader2, Trash2, ExternalLink, Download } from "lucide-react";
+import { Loader2, Trash2, Download, GitBranch, FolderOpen } from "lucide-react";
import { useNavigate } from "react-router-dom";
import { downloadRepo } from "@/api/repos";
import { showToast } from "@/lib/toast";
@@ -41,85 +41,81 @@ export function RepoCard({
: repo.localPath || "Local Repo";
const branchToDisplay = repo.currentBranch || repo.branch;
const isReady = repo.cloneStatus === "ready";
+ const isCloning = repo.cloneStatus === "cloning";
+
+ const handleCardClick = () => {
+ if (isReady) {
+ navigate(`/repos/${repo.id}`);
+ }
+ };
+
+ const handleActionClick = (e: React.MouseEvent, action: () => void) => {
+ e.stopPropagation();
+ action();
+ };
return (
-
-
-
-{onSelect && (
- {
- onSelect(repo.id, checked === true);
- }}
- onClick={(e) => {
- e.stopPropagation();
- }}
- className="w-5 h-5"
- />
- )}
- {
- e.stopPropagation();
- if (onSelect) {
- onSelect(repo.id, !isSelected);
- }
- }}
- className={`font-semibold text-lg text-foreground truncate group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors ${
- onSelect ? "cursor-pointer" : "cursor-not-allowed opacity-60"
- }`}
- >
- {repoName}
-
- {repo.isWorktree && (
-
- {branchToDisplay || "main"}
-
- )}
- {repo.cloneStatus === "cloning" && (
-
- cloning
-
- )}
-
-
-
-
-
-
-
- {repo.cloneStatus === "cloning" && (
-
-
-
Cloning repository...
+
+
+ {onSelect && (
+
handleActionClick(e, () => onSelect(repo.id, !isSelected))}
+ >
+ onSelect(repo.id, checked === true)}
+ className="w-5 h-5"
+ />
)}
-
-
+
+
+
+
+ {repoName}
+
+ {repo.isWorktree && (
+
+ worktree
+
+ )}
+
+
+
+ {isCloning ? (
+
+
+ Cloning...
+
+ ) : (
+ <>
+
+
+ {branchToDisplay || "main"}
+
+ {repo.isLocal && (
+
+
+ Local
+
+ )}
+ >
+ )}
+
+
+
e.stopPropagation()}>
-
-
);
}