Compare commits

...
Author SHA1 Message Date
Andrew BeveridgeandClaude Fable 5 0c6b471e59 fix: clamp AI suggestions list to panel with native scroll
The repo's ScrollArea root has no overflow-hidden, so max-h-64 on it
never clipped the Radix viewport and long suggestion lists spilled
over the panel border onto the content below. Use a plain
overflow-y-auto div instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 13:30:19 -04:00
@@ -5,7 +5,6 @@ import { useTranslations } from 'next-intl'
import { Card } from '@/components/ui/card'
import { Button } from '@/components/ui/button'
import { Badge } from '@/components/ui/badge'
import { ScrollArea } from '@/components/ui/scroll-area'
import {
Tooltip,
TooltipContent,
@@ -122,7 +121,10 @@ export default function AutoCorrectPanel({
</div>
{!collapsed && suggestions.length > 0 && (
<ScrollArea className="max-h-64 border-t">
// Plain overflow div, NOT the ScrollArea component: its Radix root
// has no overflow-hidden, so a max-height there doesn't clip and
// long suggestion lists spill over the panel border.
<div className="max-h-64 overflow-y-auto border-t">
<ul className="divide-y">
{suggestions.map((s) => {
const decision = decisions[s.id]
@@ -285,7 +287,7 @@ export default function AutoCorrectPanel({
)
})}
</ul>
</ScrollArea>
</div>
)}
</Card>
)