From 56876841c7150e2a087b7622bf81b5d4749ce4a2 Mon Sep 17 00:00:00 2001 From: Kyle Pope Date: Sun, 22 Feb 2026 02:13:16 +0800 Subject: [PATCH] Fix scope dialog button alignment and night briefing showing wrong day - Replace DialogFooter with plain div for vertical button layout in scope dialog - Add today's remaining items to night briefing (before 5 AM) before tomorrow preview Co-Authored-By: Claude Opus 4.6 --- frontend/src/components/calendar/CalendarPage.tsx | 11 +++++------ frontend/src/components/dashboard/DayBriefing.tsx | 12 +++++++++++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/calendar/CalendarPage.tsx b/frontend/src/components/calendar/CalendarPage.tsx index 68401e5..20b4e3f 100644 --- a/frontend/src/components/calendar/CalendarPage.tsx +++ b/frontend/src/components/calendar/CalendarPage.tsx @@ -17,7 +17,6 @@ import { DialogContent, DialogHeader, DialogTitle, - DialogFooter, } from '@/components/ui/dialog'; import CalendarSidebar from './CalendarSidebar'; import EventForm from './EventForm'; @@ -369,24 +368,24 @@ export default function CalendarPage() {

This is a recurring event. How would you like to proceed?

- +
- +
diff --git a/frontend/src/components/dashboard/DayBriefing.tsx b/frontend/src/components/dashboard/DayBriefing.tsx index 91c70b7..9bf0aa2 100644 --- a/frontend/src/components/dashboard/DayBriefing.tsx +++ b/frontend/src/components/dashboard/DayBriefing.tsx @@ -41,8 +41,18 @@ export default function DayBriefing({ upcomingItems, dashboardData, weatherData const parts: string[] = []; - // Night (9PM–5AM): Focus on tomorrow + // Night (9PM–5AM): Show today if items remain, then preview tomorrow if (hour >= 21 || hour < 5) { + // Before 5 AM, "today" still matters — mention remaining items + if (todayItems.length > 0 && hour < 5) { + const remainingToday = todayEvents.filter((e) => isAfter(new Date(e.end_datetime), now)); + if (remainingToday.length > 0) { + parts.push(`${remainingToday.length} event${remainingToday.length > 1 ? 's' : ''} still on today.`); + } else if (todayTodos.length > 0) { + parts.push(`${todayTodos.length} task${todayTodos.length > 1 ? 's' : ''} due today.`); + } + } + if (tomorrowItems.length === 0) { parts.push('Tomorrow is clear — nothing scheduled.'); } else {