Skip to content

Commit 9492a93

Browse files
committed
fix: replace Radix ScrollArea with native overflow-y-auto for reliable scroll
Radix ScrollArea's Viewport uses h-full inside overflow-hidden Root, which fights with flex-1 in a flex column container. The list never scrolled because the Viewport expanded to fit all content. Native div with overflow-y-auto + flex-1 + min-h-0 works correctly. The browser handles scroll natively without Radix's abstraction layer.
1 parent 6e6f3bb commit 9492a93

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

frontend/src/components/DirectoryPicker.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { motion, AnimatePresence } from 'framer-motion'
1111
import { FolderGit2, X, Files, FunctionSquare, ArrowUpDown } from 'lucide-react'
1212
import { Button } from '@/components/ui/button'
1313
import { Checkbox } from '@/components/ui/checkbox'
14-
import { ScrollArea } from '@/components/ui/scroll-area'
1514
import { cn } from '@/lib/utils'
1615
import type { AnalyzeResult, DirectoryEntry } from '@/types'
1716

@@ -129,7 +128,7 @@ export function DirectoryPicker({
129128
<SortButton label="Functions" sortKey="functions" current={sortBy} asc={sortAsc} onToggle={toggleSort} className="w-24 text-right" />
130129
</div>
131130

132-
<ScrollArea className="flex-1 min-h-0">
131+
<div className="flex-1 min-h-0 overflow-y-auto">
133132
<motion.div
134133
className="divide-y divide-border"
135134
initial="hidden"
@@ -155,7 +154,7 @@ export function DirectoryPicker({
155154
</motion.div>
156155
))}
157156
</motion.div>
158-
</ScrollArea>
157+
</div>
159158

160159
{functionLimit && (
161160
<BudgetBar current={stats.functions} limit={functionLimit} />

0 commit comments

Comments
 (0)