From fd58e926b0cf00b83fdb4a6df4e4fc816241fe3d Mon Sep 17 00:00:00 2001 From: Bil0000 <62337003+Bil0000@users.noreply.github.com> Date: Fri, 18 Sep 2026 06:06:10 +0200 Subject: [PATCH 1/2] fix(web): keep PR badge hover lists within mouse reach --- apps/web/src/components/ThreadStatusIndicators.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/web/src/components/ThreadStatusIndicators.tsx b/apps/web/src/components/ThreadStatusIndicators.tsx index 2f72f827e56a..0401f18b6054 100644 --- a/apps/web/src/components/ThreadStatusIndicators.tsx +++ b/apps/web/src/components/ThreadStatusIndicators.tsx @@ -271,6 +271,7 @@ export function ThreadPullRequestBadgeControl({ Date: Fri, 18 Sep 2026 06:06:44 +0200 Subject: [PATCH 2/2] fix(web): use the PR badge list style for single requests --- .../src/components/ThreadStatusIndicators.tsx | 128 +++++++++++------- 1 file changed, 76 insertions(+), 52 deletions(-) diff --git a/apps/web/src/components/ThreadStatusIndicators.tsx b/apps/web/src/components/ThreadStatusIndicators.tsx index 0401f18b6054..454f2d9e4618 100644 --- a/apps/web/src/components/ThreadStatusIndicators.tsx +++ b/apps/web/src/components/ThreadStatusIndicators.tsx @@ -26,7 +26,7 @@ import { visibleThreadPullRequests, type ThreadPullRequestBadge, } from "@t3tools/shared/threadPullRequests"; -import { type MouseEvent } from "react"; +import { type MouseEvent, type ReactNode } from "react"; import { buttonVariants, InlineButton } from "./ui/button"; import { cn } from "../lib/utils"; @@ -223,7 +223,6 @@ export function ThreadPullRequestBadgeControl({ const presentation = resolveThreadPullRequestBadgePresentation({ badge, number, url, status }); if (presentation === null) return null; const isStack = badge?.kind === "stack"; - const showList = isStack || (badge?.kind === "pull-request" && badge.others > 0); const className = cn( variant === "ghost" ? buttonVariants({ variant: "ghost", size: "xs" }) @@ -271,22 +270,26 @@ export function ThreadPullRequestBadgeControl({ - {showList ? ( + {visibleThreadPullRequests(pullRequests).length > 0 ? ( - ) : ( - presentation.label - )} + ) : number !== undefined && url !== undefined ? ( +
    + +
+ ) : null}
); @@ -317,56 +320,77 @@ export function ThreadPullRequestsMiniList({ snapshot === null ? null : resolvePullRequestState({ state: snapshot.state, isDraft: snapshot.isDraft }); - const content = ( - <> - {presentation ? ( - - ) : ( - - )} - #{line.link.number} - - {snapshot?.title ?? line.link.repository} - + return ( + {line.stack ? ( {line.stack.kind === "native" ? "stack" : "chain"} ยท {line.stack.size} ) : null} - - ); - return ( -
  • - {onOpenPullRequest ? ( - event.stopPropagation()} - onClick={(event) => onOpenPullRequest(event, line.link.url)} - > - {content} - - ) : ( -
    {content}
    - )} -
  • +
    ); })} ); } +function ThreadPullRequestMiniListItem({ + number, + url, + title, + presentation, + depth = 0, + onOpenPullRequest, + children, +}: { + number: number; + url: string; + title: string; + presentation: Pick | null; + depth?: number; + onOpenPullRequest?: ((event: MouseEvent, url: string) => void) | undefined; + children?: ReactNode; +}) { + const Icon = presentation?.Icon ?? PullRequestGlyph.pullRequest; + const content = ( + <> + + #{number} + {title} + {children} + + ); + return ( +
  • + {onOpenPullRequest ? ( + event.stopPropagation()} + onClick={(event) => onOpenPullRequest(event, url)} + > + {content} + + ) : ( +
    {content}
    + )} +
  • + ); +} + export function prStatusIndicator( pr: ThreadPr, provider: VcsStatusResult["sourceControlProvider"] | null | undefined,