Skip to content

Fix session lifecycle, RSVP notify, and sync clobber bugs - #2

Merged
ianswope merged 1 commit into
masterfrom
cursor/fix-alert-sync-lifecycle-2671
Aug 30, 2026
Merged

ianswope merged 1 commit into
masterfrom
cursor/fix-alert-sync-lifecycle-2671

Conversation

@ianswope

Copy link
Copy Markdown
Owner

Nine review follow-ups from Ian’s assigned list, against 0.6.0 (1192785). No 15-vs-30 drag-snap change. No undo/redo.

  1. One Ui per process. open() reuses LIVE_UI instead of replacing it and calling build() again. Close hides the window while autostart/hold() keeps the process alive; destroy cancels the clock/alert/sync sources. Logind PrepareForSleep is subscribed once. --background no longer keys off active_window(), so a hidden session is not presented or rebuilt. Tests cover reuse vs build, hide-on-close, one logind subscribe, and background vs present. Full hide/present timer identity still needs a display.

  2. Persist last alert check. last_alert_check is stored in settings. Startup/resume look back at most 36 hours. next_checkpoint keeps the previous value when events_between fails, so that window is retried.

  3. Google RSVP sendUpdates=all. RSVP PATCHes go through event_url_notifying. CalDAV still PUTs PARTSTAT on the attendee’s copy; it does not POST an iTIP METHOD:REPLY (documented on respond_to_event and in the README). Many servers, including iCloud, treat that as a local status change only.

  4. Dirty flag on unpushed local edits. events.local_edit skips sync upserts (ON CONFLICT … WHERE local_edit = 0) and prunes. Drag marks the row until the remote write succeeds or the optimistic move is undone.

  5. Filter CalDAV STATUS:CANCELLED. Cancelled VEVENTs are dropped and count as a successful parse, so they do not protect the resource from prune. Fixture covers uppercase and lowercase STATUS.

  6. Calendar visibility switch. state-set returns Stop when set_calendar_visible fails, so GTK does not flip the switch off the stored value.

  7. Reminders on expanded instances. CalDAV href#instance rows inherit reminder_minutes from the bare href. Google expanded instances inherit from recurringEventId. Tests cover both after the master is pruned.

  8. README OAuth scopes match src/google/oauth.rs: calendar.events and calendar.calendarlist.readonly, not calendar.

  9. Tests for event_occurs_on_day (timed start day, all-day exclusive end, multi-day inclusive range) and the extracted single-alert-loop invariant (session_action: reuse live Ui, do not build a second loop).

Open in Web Open in Cursor 

Close-and-reopen while autostart holds the process no longer
starts a second alert/sync/logind loop. Persist the alert
checkpoint without advancing it on query failure. Notify Google
invitees on RSVP, skip cancelled CalDAV events, protect unpushed
local edits, revert visibility on store error, copy reminders
onto expanded instances, and align README OAuth scopes.

Co-authored-by: Ian Swope <ian@promoeqp.com>
@ianswope
ianswope marked this pull request as ready for review August 25, 2026 19:46
@ianswope
ianswope merged commit 5f93a17 into master Aug 30, 2026
1 check passed
@ianswope
ianswope deleted the cursor/fix-alert-sync-lifecycle-2671 branch August 30, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants