diff --git a/frontend/src/components/repo/BranchSwitcher.tsx b/frontend/src/components/repo/BranchSwitcher.tsx
index 804b0ade..12bb2544 100644
--- a/frontend/src/components/repo/BranchSwitcher.tsx
+++ b/frontend/src/components/repo/BranchSwitcher.tsx
@@ -21,9 +21,10 @@ interface BranchSwitcherProps {
repoUrl?: string | null;
repoLocalPath?: string;
className?: string;
+ iconOnly?: boolean;
}
-export function BranchSwitcher({ repoId, currentBranch, isWorktree, repoUrl, repoLocalPath, className }: BranchSwitcherProps) {
+export function BranchSwitcher({ repoId, currentBranch, isWorktree, repoUrl, repoLocalPath, className, iconOnly }: BranchSwitcherProps) {
const [addBranchOpen, setAddBranchOpen] = useState(false);
const [gitChangesOpen, setGitChangesOpen] = useState(false);
const queryClient = useQueryClient();
@@ -63,14 +64,14 @@ export function BranchSwitcher({ repoId, currentBranch, isWorktree, repoUrl, rep
variant="ghost"
size="sm"
disabled={switchBranchMutation.isPending}
- className={`h-6 px-1 sm:px-2 text-[10px] sm:text-xs text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:bg-accent gap-1 border border-blue-500/20 ${className || ""}`}
+ className={`h-6 px-1 sm:px-2 text-[10px] sm:text-xs text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:bg-accent gap-1 border border-blue-500/20 ${iconOnly ? 'w-6' : ''} ${className || ""}`}
>
{switchBranchMutation.isPending ? (
) : (
)}
- {currentBranch}
+ {!iconOnly && {currentBranch}}
diff --git a/frontend/src/components/session/SessionDetailHeader.tsx b/frontend/src/components/session/SessionDetailHeader.tsx
index 2aad2d7b..6adacfb9 100644
--- a/frontend/src/components/session/SessionDetailHeader.tsx
+++ b/frontend/src/components/session/SessionDetailHeader.tsx
@@ -159,6 +159,7 @@ export function SessionDetailHeader({
repoUrl={repo.repoUrl}
repoLocalPath={repo.localPath}
className="max-w-[80px] sm:w-[140px] sm:max-w-[140px]"
+ iconOnly
/>