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)