Files
manilabuiandClaude Opus 5.5 0635d32739 Calendar: desktop notifications for event alerts (#3066)
* ICS reminders: when each of an occurrence's reminders goes off

getAlarmTimes reads the instants an occurrence's reminders fire at, for the occurrence's own
VEVENT. A TRIGGER counts from the start, or the end with RELATED=END; weeks and days count on the
calendar and hours by the clock (RFC 5545 section 3.3.6), so "1 day before" keeps the clock time
across a DST change. EMAIL reminders are left out, since the provider sends those.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Notifications: play the system's own sound on request

playDefaultSound lets a notification sound with the platform's default tone, where playSound
attaches the new-mail sound on macOS. macOS Focus and the per-app sound setting still apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Calendar: open an event on a hidden calendar in the panel, with a way to show it

An event on a calendar unticked in the sidebar isn't drawn, so focusing it (View in Calendar from
Mail) went to its day with nothing selected: a drawn event selects itself as it takes focus. The
calendar now selects it directly, and the panel says "On a hidden calendar" with a Show button
that ticks the calendar again, in the answer section's tint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Calendar: desktop notifications for event alerts

The main window shows each alert as a notification when it comes due: the title, the day and
times ("Today, 2:00 – 2:30 PM") and the location, with the system's sound. Clicking it opens the
event in the panel. Every alert on an event rings; declined and cancelled events, and calendars
unticked in the sidebar, don't (as in Notion Calendar). An alert missed while the app was closed
or the Mac slept shows late only until a minute after its event starts. Alerts already shown are
kept in localStorage until their event is over, so a reload or relaunch doesn't repeat them.
"Show notifications for calendar alerts" in General > Notifications turns them off. The panel no
longer says the provider delivers alerts, since that depends on the provider's own settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Calendar alerts: ring alerts set for after the start, and match what the grid draws

- An alert due after its event starts (Google's all-day "on the day at 9 AM", or one counted from
  the end) rings at its own time; a late one still stops a minute past the later of the two, and
  the record of shown alerts keeps each until that cutoff.
- Alerts expand events with the calendar's own inputs, so a read-only copy another calendar
  already draws doesn't ring twice; eventsInRangeQuery and calendarExpansionInputs are shared
  with CalendarDataSource.
- eventRefFor builds the reference both the alert click and View in Calendar open.
- Each event's ICS is parsed once rather than once per occurrence; getAlarmTimes takes the
  parsed component.
- Focusing an event reads the database only when a calendar is hidden; dead fallbacks, a
  misplaced comment and rename leftovers are cleaned up, and the specs no longer depend on the
  machine zone for all-day times.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Calendar alerts: an alarm that can't be read skips only its own event

ical.js reads a TRIGGER when it's first asked for its value, so a malformed one (`-PT10`) throws
inside getAlarmTimes, after the ICS has parsed. The guard covers that read again; otherwise the
throw ends the alerts stream and no alert shows until the setting changes or the app restarts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Calendar alerts: one banner when two calendars' copies of a meeting ring together

The same meeting can sit on two of your calendars, as its organizer's copy and a guest's. Each
copy keeps its own alerts, so an alert is named by the meeting's UID, its occurrence and its time:
copies ringing at the same moment show once, and copies with different alerts still ring apart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Calendar alerts: a set-time alert on a series rings once

A TRIGGER at a fixed date-time lands at the same moment for every occurrence of a series, so it
rang once per occurrence in the four-week window, and again as each new occurrence came within it.
Alerts are named by the meeting and the time, so those copies show once, and a set-time alert
shows only up to a minute late rather than until some occurrence starts. getAlarmTimes reports
whether each reminder is set-time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Calendar alerts: keep occurrences apart, and set-time alerts on one-off events late

- A relative alert's name includes its occurrence again, so two occurrences' alerts landing on the
  same moment (tomorrow's "1 day before" and today's "at time of event") both show. Only a
  set-time alert, which every occurrence of a series shares, leaves the occurrence out.
- A set-time alert on a one-off event shows late until the event starts, like any alert; only a
  series' gets just the minute, since the next occurrence would otherwise take it up again.
- A series' set-time alert goes with the next occurrence to start, so the banner and its click
  name an upcoming occurrence rather than one already over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 16:24:00 -06:00
..