Conversation
7655125 to
5e4e63e
Compare
|
Nothing reaches this yet. Only the single-event editor save passes The gap behind it is real, though: picking a new zone for a series does nothing today. Would you like to take that on, so the bookkeeping here has a caller? Either in this PR or one this stacks under, whichever you prefer. 🤖 Generated with Claude Code |
RFC 5545 section 3.2.19 makes a TZID meaningful only through a VTIMEZONE in the same iCalendar object. updateEventTimes replaced every VTIMEZONE with the new zone's, so an inline exception still in the old zone referenced a TZID with nothing behind it. syncVTimezones now runs at the end of createICSString and updateEventTimes: referenced zones keep the server's component, unreferenced ones go, and a referenced zone with none gets one. Nothing reached that case: only the single-event save passed the picker's zone, and a series save ignored it. The series save now passes a zone the user picked through updateRecurringEventTimes, and the master's EXDATE, RDATE, RRULE UNTIL and each inline exception's RECURRENCE-ID move with it by wall clock, so they keep naming the same instances across the weeks where only one of the two zones is on DST. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
5e4e63e to
ed5f23b
Compare
|
Taken on here, in A series save now passes the picker's zone through Rezoning the master alone leaves its EXDATE, RDATE, RRULE UNTIL and each inline exception's RECURRENCE-ID naming instants the rewritten rule no longer hits wherever the two zones' DST dates differ (Chicago from 10 March 2024, Berlin from 31 March), so Red on master source with these specs: 7 (the popover series save and the six helper cases). Mutations I ran, each red: zone passed unconditionally (2), zone never passed (1), ICS helper + popover suites 164 passing; full suite 2111 passing, 0 failing; lint, prettier and tsc clean. PR body updated to match. One thing I left as it is: the single-event save still passes the picker's zone unconditionally, so a UTC single event edited in the editor gets the machine zone's TZID. Happy to bring it in line with the series save in a follow-up if you want that. |
RFC 5545 section 3.2.19 makes a TZID meaningful only by reference to a VTIMEZONE in the same iCalendar object, so the two have to change together.
updateEventTimesreplaced every VTIMEZONE with the new zone's when an event was retimed into another zone, so a recurring event with an inline exception still in the old zone referenced a TZID with no component behind it - which a strict parser is entitled to reject and a lenient one reads as floating. OnesyncVTimezonesnow runs at the end ofcreateICSStringandupdateEventTimes: zones the calendar still references keep the server's own component, zones nothing references any more are dropped, and a referenced zone with no component gets one fromcreateVTIMEZONEString- only whenresolveIanaZoneidentifies the zone, so an Outlook display name or a private X- identifier is left as it arrived.Nothing reached that case on master: only the single-event editor save passed the picker's zone, and a series save went through
updateRecurringEventTimesand ignored it, so picking a new zone for a series did nothing. The series save now passes a zone the user picked (and only then - passing it unconditionally rewrites a UTC series into the machine zone). Rezoning the master alone would leave its EXDATE, RDATE, RRULE UNTIL and each inline exception's RECURRENCE-ID naming instants the rewritten rule no longer produces wherever the two zones' DST dates differ, sorealignOccurrenceAnchorsmoves them by the master's wall-clock difference: a Berlin 10:00 EXDATE on 15 March becomes Chicago 03:00 (08:00Z, the rezoned instance), not 04:00 (the old instant). Exception DTSTART/DTEND stay where the user put them, which is the case the VTIMEZONE bookkeeping exists for. In a live DB all 1923 EXDATEs and 3645 inline RECURRENCE-IDs are zoned in the master's zone and all 117 UNTILs are UTC; the fixtures use that shape.Verified in
app/spec/ics-event-helpers-spec.tsandapp/spec/calendar-event-popover-spec.ts: the popover's series save with the picker changed writes the master in the new zone, keeps both VTIMEZONEs and moves the EXDATE (red on master); the four anchors move by wall clock across the DST gap and ical-expander still excludes, adds and substitutes the same occurrences; an RDATE-only series and a UTC RECURRENCE-ID are handled; the untouched-picker save is unchanged. Each of fifteen mutations (zone passed unconditionally or never, realignment skipped per anchor kind, same instant instead of wall clock, TZID parameter left behind, guards dropped) goes red. ICS helper + popover suites 164 passing; full suite 2111 passing, 0 failing. Lint, prettier and tsc clean on master10b5526b7. Extracted from the calendar-scheduling branch.🤖 Generated with Claude Code