fix: keep PR file tree scrolling bounded (#4467)

This commit is contained in:
Jinjing
2026-06-02 01:39:31 -07:00
committed by GitHub
parent 990b4cf28d
commit 82f134ccad
3 changed files with 7 additions and 5 deletions
@@ -1971,7 +1971,7 @@ function PRFilesCombinedDiffViewer({
)
return (
<div className="flex min-h-[520px] flex-1 flex-col">
<div className="flex h-full min-h-0 flex-1 flex-col overflow-hidden">
<div className="flex shrink-0 items-center justify-between gap-3 border-b border-border bg-background/50 px-3 py-1.5">
<div className="flex min-w-0 items-center gap-2">
{fileTreeCollapsed && (
@@ -6067,7 +6067,7 @@ export default function GitHubItemDialog({
/>
</TabsContent>
<TabsContent value="files" className="mt-0">
<TabsContent value="files" className="mt-0 h-full min-h-0 overflow-hidden">
{loading && files.length === 0 ? (
<div className="flex items-center justify-center py-10">
<LoaderCircle className="size-5 animate-spin text-muted-foreground" />
@@ -2157,7 +2157,7 @@ function PRFilesCombinedDiffViewer({
)
return (
<div className="flex min-h-[520px] flex-1 flex-col">
<div className="flex h-full min-h-0 flex-1 flex-col overflow-hidden">
<div className="sticky top-0 z-20 flex shrink-0 items-center justify-between gap-3 border-b border-border bg-background px-3 py-1.5">
<div className="flex min-w-0 items-center gap-2">
{fileTreeCollapsed && (
@@ -5885,7 +5885,7 @@ export default function PullRequestPage({
/>
</TabsContent>
<TabsContent value="files" className="mt-0">
<TabsContent value="files" className="mt-0 h-full min-h-0 overflow-hidden">
{loading && files.length === 0 ? (
<div className="flex items-center justify-center py-10">
<LoaderCircle className="size-5 animate-spin text-muted-foreground" />
@@ -193,7 +193,9 @@ export function CombinedDiffFileTree({
}
return (
<aside className="sticky top-0 flex h-full max-h-full w-64 shrink-0 self-start flex-col border-r border-border bg-background">
// Why: this column must be height-bounded so the file list, not the page,
// owns overflow when review diffs have more files than fit on screen.
<aside className="flex min-h-0 w-64 shrink-0 flex-col overflow-hidden border-r border-border bg-background">
<div className="sticky top-0 z-20 shrink-0 bg-background">
<div className="flex items-center justify-between gap-2 border-b border-border px-3 py-1.5">
<div className="text-[11px] font-semibold uppercase tracking-[0.05em] text-muted-foreground">