Fix lock overlay z-index and duplicate recurring event notifications

- Lock overlay: z-50 -> z-[100] so it renders above Sheet/Dialog (both z-50)
- Event notifications: skip recurring parent template rows (recurrence_rule
  set + parent_event_id NULL) which duplicate the child instance rows,
  causing double notifications for recurring events

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kyle 2026-02-25 18:12:23 +08:00
parent f5265a589e
commit aa2d011700
2 changed files with 7 additions and 1 deletions

View File

@ -103,6 +103,12 @@ async def _dispatch_events(db: AsyncSession, settings: Settings, now: datetime)
and_( and_(
CalendarEvent.start_datetime >= now, CalendarEvent.start_datetime >= now,
CalendarEvent.start_datetime <= window_end, CalendarEvent.start_datetime <= window_end,
# Exclude recurring parent templates — they duplicate the child instance rows.
# Parent templates have recurrence_rule set but no parent_event_id.
~and_(
CalendarEvent.recurrence_rule != None, # noqa: E711
CalendarEvent.parent_event_id == None, # noqa: E711
),
) )
).options(selectinload(CalendarEvent.location)) ).options(selectinload(CalendarEvent.location))
) )

View File

@ -56,7 +56,7 @@ export default function LockOverlay() {
}; };
return ( return (
<div className="fixed inset-0 z-50 flex flex-col items-center justify-center bg-background animate-fade-in"> <div className="fixed inset-0 z-[100] flex flex-col items-center justify-center bg-background animate-fade-in">
<AmbientBackground /> <AmbientBackground />
<div className="relative z-10 flex flex-col items-center gap-6 w-full max-w-sm px-4 animate-slide-up"> <div className="relative z-10 flex flex-col items-center gap-6 w-full max-w-sm px-4 animate-slide-up">