From dc6211b61676fcea24aabd3300648cec699175fb Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 13 Oct 2026 10:40:51 +0200 Subject: fix(calendar): review findings in calctl and the editor An edit now rewrites only the fields that changed. A save with nothing changed used to rebuild the alarm, turning ACTION:AUDIO into DISPLAY and dropping ACKNOWLEDGED, re-anchor the start to the local zone, and strip SUMMARY's parameters; the test edits a foreign event unchanged and checks every one survives. get, edit and delete name the calendar the event is in. The same invite synced into two calendars has one UID, and the panel acted on whichever file came first, so editing one copy could overwrite or delete the other. A custom rule's date cannot be moved from the panel: BYDAY=MO stayed on Monday while the start moved, and the series lost the day shown. UNTIL is read back in local time, so a 22:30 series keeps its last occurrence. Files are written 0644 like vdirsyncer's. Enter in the title no longer bypasses the busy guard, which could create an event twice, and a throwing callback no longer leaks its Process. Co-Authored-By: Claude Opus 5.5 --- desktop/island/calendar/Cal.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'desktop/island/calendar/Cal.js') diff --git a/desktop/island/calendar/Cal.js b/desktop/island/calendar/Cal.js index dc50b04..d8dcf80 100644 --- a/desktop/island/calendar/Cal.js +++ b/desktop/island/calendar/Cal.js @@ -107,14 +107,15 @@ function stepTime(s, minutes) { // on the same day. function newDraft(day, now, calendar) { const h = Math.min(22, now.getHours() + 1); - return { uid: "", calendar: calendar, title: "", allDay: false, + return { uid: "", source: "", calendar: calendar, title: "", allDay: false, startDay: day, endDay: day, startTime: pad(h) + ":00", endTime: pad(h + 1) + ":00", repeat: "none", until: "", alarm: "1h", location: "", notes: "", override: false }; } -// calctl's event JSON as an editor draft. +// calctl's event JSON as an editor draft. `source` is the calendar the event +// lives in now; `calendar` is where the form wants it. function fromEvent(ev) { - return { uid: ev.uid, calendar: ev.calendar, title: ev.title, allDay: ev.allDay, + return { uid: ev.uid, source: ev.calendar, calendar: ev.calendar, title: ev.title, allDay: ev.allDay, startDay: ev.start.slice(0, 10), endDay: ev.end.slice(0, 10), startTime: ev.allDay ? "09:00" : ev.start.slice(11, 16), endTime: ev.allDay ? "10:00" : ev.end.slice(11, 16), -- cgit v1.2.3