Fix Upcoming card height — use natural height with scroll cap

The flex-col h-full layout caused the card to stretch to match the
grid row, pushing content beyond the ScrollArea max-height. Switched
to natural card height with max-h-[400px] on ScrollArea so the card
stays compact and scrolls internally without mismatching the right
column cards.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kyle 2026-03-11 22:07:59 +08:00
parent 076b2fc3c9
commit 27a5002c74

View File

@ -174,7 +174,7 @@ export default function UpcomingWidget({ items }: UpcomingWidgetProps) {
const dayEntries = Array.from(grouped.entries());
return (
<Card className="flex flex-col h-full">
<Card className="h-full">
<CardHeader>
<div className="flex items-center justify-between">
<CardTitle className="flex items-center gap-2">
@ -210,13 +210,13 @@ export default function UpcomingWidget({ items }: UpcomingWidgetProps) {
</div>
</div>
</CardHeader>
<CardContent className="flex-1 min-h-0 flex flex-col" style={{ minHeight: 200 }}>
<CardContent>
{filteredCount === 0 ? (
<p className="text-sm text-muted-foreground text-center py-8">
{focusMode ? 'Nothing for today or tomorrow' : 'Nothing upcoming'}
</p>
) : (
<ScrollArea className="flex-1 max-h-[400px]">
<ScrollArea className="max-h-[400px] -mr-2 pr-2">
<div>
{dayEntries.map(([dateKey, dayItems], groupIdx) => {
const isCollapsed = collapsedDays.has(dateKey);