From bdfd8448b1b110a0472488850f405d3c05e4250f Mon Sep 17 00:00:00 2001 From: Kyle Pope Date: Sun, 15 Mar 2026 01:59:11 +0800 Subject: [PATCH] Remove upper date bound on starred events so future events always show Starred events should appear in the countdown widget regardless of how far in the future they are. The _not_parent_template filter still excludes recurring parent templates while allowing starred children. Co-Authored-By: Claude Opus 4.6 --- backend/app/routers/dashboard.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/app/routers/dashboard.py b/backend/app/routers/dashboard.py index 881e88e..816ee0d 100644 --- a/backend/app/routers/dashboard.py +++ b/backend/app/routers/dashboard.py @@ -92,13 +92,12 @@ async def get_dashboard( total_todos = todo_row.total total_incomplete_todos = todo_row.incomplete - # Starred events (within upcoming_days window, ordered by date, scoped to user's calendars) - upcoming_cutoff_dt = datetime.combine(upcoming_cutoff, datetime.max.time()) + # Starred events — no upper date bound so future events always appear in countdown. + # _not_parent_template excludes recurring parent templates (children still show). starred_query = select(CalendarEvent).where( CalendarEvent.calendar_id.in_(user_calendar_ids), CalendarEvent.is_starred == True, CalendarEvent.start_datetime > today_start, - CalendarEvent.start_datetime <= upcoming_cutoff_dt, _not_parent_template, ).order_by(CalendarEvent.start_datetime.asc()).limit(5) starred_result = await db.execute(starred_query)