[#318] implement SEQUENCE field for ICS events (#362)

- Add SEQUENCE property to ICS generation (starts at 1 for new events)
- Increment SEQUENCE on event updates (modal, drag & drop, resize)
- Handle SEQUENCE independently for recurring event instances
- Add comprehensive tests for SEQUENCE generation and incrementation
- Ensure proper event ordering for remote calendar participants

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Benoit TELLIER
2025-11-27 08:58:31 +01:00
committed by GitHub
parent d8c931e02e
commit 65c26f7627
6 changed files with 114 additions and 0 deletions
@@ -177,6 +177,7 @@ export const createEventHandlers = (props: EventHandlersProps) => {
...event,
start: computedNewStart.toISOString(),
end: computedNewEnd.toISOString(),
sequence: (event.sequence ?? 1) + 1,
} as CalendarEvent,
true
);
@@ -202,6 +203,7 @@ export const createEventHandlers = (props: EventHandlersProps) => {
...master,
start: computedNewStart.toISOString(),
end: computedNewEnd.toISOString(),
sequence: (master.sequence ?? 1) + 1,
},
})
);
@@ -254,6 +256,7 @@ export const createEventHandlers = (props: EventHandlersProps) => {
...event,
start: computedNewStart.toISOString(),
end: computedNewEnd.toISOString(),
sequence: (event.sequence ?? 1) + 1,
} as CalendarEvent,
true
);
@@ -280,6 +283,7 @@ export const createEventHandlers = (props: EventHandlersProps) => {
...master,
start: computedNewStart.toISOString(),
end: computedNewEnd.toISOString(),
sequence: (master.sequence ?? 1) + 1,
},
})
);
+1
View File
@@ -733,6 +733,7 @@ function EventPopover({
},
],
transp: busy,
sequence: 1,
color: targetCalendar?.color,
alarm: { trigger: alarm, action: "EMAIL" },
x_openpass_videoconference: meetingLink || undefined,
+2
View File
@@ -604,6 +604,7 @@ function EventUpdateModal({
organizer: organizer,
timezone,
transp: busy,
sequence: (event.sequence ?? 1) + 1,
color: targetCalendar?.color,
alarm: { trigger: alarm, action: "EMAIL" },
x_openpass_videoconference: meetingLink || undefined,
@@ -700,6 +701,7 @@ function EventUpdateModal({
...newEvent,
uid: newEventUID,
URL: `/calendars/${newCalId || calId}/${newEventUID}.ics`,
sequence: 1, // New event with new UID starts at sequence 1
};
// STEP 3: Persist new event to server
+1
View File
@@ -297,6 +297,7 @@ export function makeVevent(
formatDateToICal(new Date(event.start), event.allday ?? false, tzid),
],
["class", {}, "text", event.class ?? "PUBLIC"],
["sequence", {}, "integer", event.sequence ?? 1],
[
"x-openpaas-videoconference",
{},