@devries-cameron20 / t3code Mirror · read-only / commits / 7b61099886
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 24, 01:30 UTC

feat(web): show the linked pull request in the compact sidebar rail (#11652)

maria committed Sep 13, 2026 at 20:09 UTC 7b61099886f3aac139ad43fb73873c73ba7baf4f
2 files changed +16 -5
apps/web/src/components/Sidebar.tsx
+8 -2
@@ -1584,10 +1584,10 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
1584 useRightPanelStore.getState().open(threadRef, "pull-requests");
1585 if (!props.isActive) onThreadActivate(threadRef);
1586 }, [onThreadActivate, props.isActive, threadRef]);
1587 - const renderPrBadge = (iconOnly: boolean) =>
1587 + const renderPrBadge = (iconOnly: boolean, variant: "underline" | "badge" = "underline") =>
1588 prBadgeShape?.kind === "stack" || pr || currentLinkedPr ? (
1589 <ThreadPullRequestBadgeControl
1590 - variant="underline"
1590 + variant={variant}
1591 badge={prBadgeShape}
1592 number={pr?.number ?? currentLinkedPr?.number}
1593 url={pr?.url ?? currentLinkedPr?.url}
@@ -1597,6 +1597,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
1597 onOpenPullRequest={handlePrClick}
1598 />
1599 ) : null;
1600 + const hasPrBadge = prBadgeShape?.kind === "stack" || pr !== null || currentLinkedPr !== null;
1601 const prBadge = renderPrBadge(false);
1602 const terminalStatusIcon = terminalStatus ? (
1603 <span
@@ -1719,6 +1720,11 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
1720 </TooltipPopup>
1721 </Tooltip>
1722 ) : null}
1723 + {hasPrBadge ? (
1724 + <span className="absolute -top-1 -right-1 inline-flex">
1725 + {renderPrBadge(true, "badge")}
1726 + </span>
1727 + ) : null}
1728 </span>
1729 {topStatus ? (
1730 <span
apps/web/src/components/ThreadStatusIndicators.tsx
+8 -3
@@ -148,7 +148,7 @@ export function ThreadPullRequestBadgeControl({
148 onOpenStack,
149 onOpenPullRequest,
150 }: {
151 - variant: "underline" | "ghost";
151 + variant: "underline" | "ghost" | "badge";
152 badge: ThreadPullRequestBadge | null;
153 number?: number | undefined;
154 url?: string | undefined;
@@ -171,7 +171,9 @@ export function ThreadPullRequestBadgeControl({
171 const className = cn(
172 variant === "ghost"
173 ? buttonVariants({ variant: "ghost", size: "xs" })
174 - : "inline-flex shrink-0 cursor-pointer items-center gap-0.5 whitespace-nowrap border-b border-transparent hover:border-current focus-visible:outline-2 focus-visible:outline-ring",
174 + : variant === "badge"
175 + ? "inline-flex size-3 shrink-0 cursor-pointer items-center justify-center rounded-full bg-sidebar ring-1 ring-sidebar outline-none focus-visible:ring-2 focus-visible:ring-ring"
176 + : "inline-flex shrink-0 cursor-pointer items-center gap-0.5 whitespace-nowrap border-b border-transparent hover:border-current focus-visible:outline-2 focus-visible:outline-ring",
177 "text-xs tabular-nums",
178 variant === "ghost" &&
179 "font-normal text-xs! active:scale-100 [--control-icon-color:currentColor]",
@@ -181,7 +183,10 @@ export function ThreadPullRequestBadgeControl({
183 );
184 const content = (
185 <>
184 - <ThreadPullRequestBadgeIcon icon={badge?.kind ?? "pull-request"} />
186 + <ThreadPullRequestBadgeIcon
187 + icon={badge?.kind ?? "pull-request"}
188 + className={variant === "badge" ? "size-2.5" : undefined}
189 + />
190 {iconOnly ? null : isStack ? badge.layers : linkedCount !== null ? `+${linkedCount}` : number}
191 </>
192 );