Skip to content

Commit 720490a

Browse files
fix(web): cut linked PR repository labels in the middle
A tail cut on a long owner hides the repository name, so two linked PRs from the same owner read identically. Cut in the middle like the branch names beside it, keeping the name after the slash. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 1163550 commit 720490a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎apps/web/src/components/pullRequest/ThreadPullRequestsPanel.tsx‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { useAtomCommand } from "~/state/use-atom-command";
1616
import { formatRelativeTimeLabel } from "~/timestampFormat";
1717
import { Button } from "../ui/button";
1818
import { Menu, MenuItem, MenuPopup, MenuTrigger } from "../ui/menu";
19+
import { MiddleTruncate } from "../ui/middle-truncate";
1920
import { ScrollArea } from "../ui/scroll-area";
2021
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
2122
import { openLinkPullRequestDialog } from "./LinkPullRequestDialog";
@@ -162,11 +163,11 @@ function LinkRow({
162163
) : null}
163164
{snapshot !== null ? (
164165
<>
166+
{/* Cut in the middle: rows from one owner differ in the repository name at the
167+
end, which a tail cut would hide. */}
165168
<Tooltip>
166-
<TooltipTrigger
167-
render={<span className="min-w-0 max-w-32 truncate font-mono" />}
168-
>
169-
{link.repository}
169+
<TooltipTrigger render={<span className="flex min-w-0 max-w-32 font-mono" />}>
170+
<MiddleTruncate value={link.repository} showTitle={false} />
170171
</TooltipTrigger>
171172
<TooltipPopup>{link.repository}</TooltipPopup>
172173
</Tooltip>

0 commit comments

Comments
 (0)