authorgravatar for 62337003+Bil0000@users.noreply.github.comBilal Bakr <62337003+Bil0000@users.noreply.github.com> 2026-09-16 01:12:36+03:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-15 15:12:36-07:00
logf0a0ead946ca3f3f310460a91b7dabb0e3fe4834
tree1138caafe773fc0b00623e8d5a9a68fa9ab71f03
parent2c16c1d264173d86fc354e9a4c0c78cd42e514b7
signature Signed by PGP key B5690EEEBB952194

fix(web): keep PR controls readable in narrow panels (#11962)


2 files changed, 4 insertions(+), 10 deletions(-)

apps/web/src/components/pullRequest/PullRequestCodeTab.tsx+2-9
...@@ -38,7 +38,6 @@ import { orderDiffFiles } from "./pullRequestFileOrder.logic";...@@ -38,7 +38,6 @@ import { orderDiffFiles } from "./pullRequestFileOrder.logic";
38import {38import {
39 buildFileDiffRenderKey,39 buildFileDiffRenderKey,
40 fnv1a32,40 fnv1a32,
41 getDiffLineStat,
42 getRenderablePatch,41 getRenderablePatch,
43 resolveDiffThemeName,42 resolveDiffThemeName,
44 resolveFileDiffPath,43 resolveFileDiffPath,
...@@ -546,7 +545,6 @@ function PullRequestCodeTab({...@@ -546,7 +545,6 @@ function PullRequestCodeTab({
546 toggledFiles,545 toggledFiles,
547 ],546 ],
548 );547 );
549 const lineStat = useMemo(() => getDiffLineStat(files), [files]);
550 const omittedFileStats = useMemo(548 const omittedFileStats = useMemo(
551 () =>549 () =>
552 new Map(550 new Map(
...@@ -1040,7 +1038,7 @@ function PullRequestCodeTab({...@@ -1040,7 +1038,7 @@ function PullRequestCodeTab({
1040 {orderedCommits.length > 0 ? (1038 {orderedCommits.length > 0 ? (
1041 <DropdownMenu>1039 <DropdownMenu>
1042 <DropdownMenuTrigger1040 <DropdownMenuTrigger
1043 className="inline-flex h-6 max-w-64 items-center gap-1 rounded-md bg-accent px-2 text-xs font-medium text-accent-foreground outline-none transition-colors hover:bg-accent/80 focus-visible:ring-2 focus-visible:ring-ring"1041 className="inline-flex h-6 min-w-0 max-w-64 items-center gap-1 rounded-md bg-accent px-2 text-xs font-medium text-accent-foreground outline-none transition-colors hover:bg-accent/80 focus-visible:ring-2 focus-visible:ring-ring"
1044 aria-label={`Diff scope: ${scopeLabel}`}1042 aria-label={`Diff scope: ${scopeLabel}`}
1045 >1043 >
1046 <span className="truncate">{scopeLabel}</span>1044 <span className="truncate">{scopeLabel}</span>
...@@ -1089,7 +1087,7 @@ function PullRequestCodeTab({...@@ -1089,7 +1087,7 @@ function PullRequestCodeTab({
1089 ) : null}1087 ) : null}
1090 {/* One count, and the caveats as icons that carry their own words. Spelled out they1088 {/* One count, and the caveats as icons that carry their own words. Spelled out they
1091 competed for a strip this narrow and every one of them truncated to nothing. */}1089 competed for a strip this narrow and every one of them truncated to nothing. */}
1092 <PullRequestMetaLine>1090 <PullRequestMetaLine className="shrink-0">
1093 <span className="shrink-0 tabular-nums">1091 <span className="shrink-0 tabular-nums">
1094 {files.length} {files.length === 1 ? "file" : "files"}1092 {files.length} {files.length === 1 ? "file" : "files"}
1095 {nextCursor === null ? "" : "+"}1093 {nextCursor === null ? "" : "+"}
...@@ -1124,11 +1122,6 @@ function PullRequestCodeTab({...@@ -1124,11 +1122,6 @@ function PullRequestCodeTab({
1124 </PullRequestMetaLine>1122 </PullRequestMetaLine>
1125 </div>1123 </div>
1126 <div className="flex shrink-0 items-center gap-1">1124 <div className="flex shrink-0 items-center gap-1">
1127 <PullRequestDiffStat
1128 additions={lineStat.additions}
1129 deletions={lineStat.deletions}
1130 className="mr-1"
1131 />
1132 {fileKeys.length > 0 ? (1125 {fileKeys.length > 0 ? (
1133 <Tooltip>1126 <Tooltip>
1134 <TooltipTrigger1127 <TooltipTrigger
apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx+2-1
...@@ -2459,10 +2459,11 @@ export function PullRequestDetailPanel({...@@ -2459,10 +2459,11 @@ export function PullRequestDetailPanel({
24592459
2460 {detail ? (2460 {detail ? (
2461 <nav2461 <nav
2462 className="col-span-2 flex min-w-0 items-center gap-1 overflow-x-auto border-t border-border/60 px-4 py-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"2462 className="col-span-2 flex min-w-0 flex-wrap items-center gap-2 border-t border-border/60 px-4 py-2"
2463 aria-label="Pull request tabs"2463 aria-label="Pull request tabs"
2464 >2464 >
2465 <ToggleGroup2465 <ToggleGroup
2466 className="shrink-0"
2466 size="segmented"2467 size="segmented"
2467 variant="segmented"2468 variant="segmented"
2468 value={[tab]}2469 value={[tab]}