Skip to content

Commit ca0964d

Browse files
t3dotggclaude
andcommitted
fix(web): sidebar cards show the PR in place of the branch name
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent e57c093 commit ca0964d

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

‎apps/web/src/components/sidebar/SidebarThreadRow.tsx‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import {
3636
CircleDashedIcon,
3737
CircleDotDashedIcon,
3838
ClockIcon,
39+
FolderGit2Icon,
3940
GitBranchIcon,
4041
MessageCircleQuestionIcon,
4142
PinIcon,
@@ -89,7 +90,6 @@ import { resolveLocalCheckoutBranchMismatch } from "../BranchToolbar.logic";
8990
import {
9091
ThreadPullRequestBadgeControl,
9192
ThreadPullRequestsMiniList,
92-
ThreadWorktreeIndicator,
9393
prStatusIndicator,
9494
resolveThreadPullRequestBadge,
9595
terminalStatusFromRunningIds,
@@ -290,7 +290,11 @@ function SidebarThreadTooltip({
290290
) : null}
291291
{thread.branch ? (
292292
<div className="flex min-w-0 items-center gap-2">
293-
<GitBranchIcon className="size-3 shrink-0 stroke-muted-foreground" />
293+
{thread.worktreePath ? (
294+
<FolderGit2Icon className="size-3 shrink-0 stroke-muted-foreground" />
295+
) : (
296+
<GitBranchIcon className="size-3 shrink-0 stroke-muted-foreground" />
297+
)}
294298
<MiddleTruncate value={thread.branch} className="flex" />
295299
</div>
296300
) : null}
@@ -1438,13 +1442,13 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
14381442
) : null}
14391443
</div>
14401444
<div className="mt-0.5 flex min-w-0 items-center gap-1.5 text-secondary-label text-xs">
1441-
{thread.branch ? (
1442-
<>
1443-
<ThreadWorktreeIndicator thread={thread} />
1444-
<span className="flex min-w-0 flex-1 text-muted-foreground/40">
1445-
<MiddleTruncate value={thread.branch} showTitle={false} />
1446-
</span>
1447-
</>
1445+
{/* The PR takes the branch's slot; the hover card still shows the branch. */}
1446+
{prBadge ? (
1447+
prBadge
1448+
) : thread.branch ? (
1449+
<span className="flex min-w-0 flex-1 text-muted-foreground/40">
1450+
<MiddleTruncate value={thread.branch} showTitle={false} />
1451+
</span>
14481452
) : showsScratchMachine ? (
14491453
<>
14501454
<EnvironmentMachineIcon
@@ -1460,7 +1464,6 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
14601464
<span className="flex-1" />
14611465
)}
14621466
{terminalStatusIcon}
1463-
{prBadge}
14641467
{diff ? (
14651468
<span className="shrink-0 font-mono">
14661469
<span className="text-diff-addition-foreground">

0 commit comments

Comments
 (0)