Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

Fixes an issue where rescheduling a calendar event that has an attached note/session would cause duplicate entries to appear in the left sidebar - one with the old time and one with the new time.

The root cause was in the calendar sync logic: events with non-empty sessions were skipping the rescheduled event detection entirely. This meant:

  1. The old event (with session attached) was preserved with its old time
  2. The new incoming event (with new time) was added as a separate event
  3. Both appeared in the sidebar

The fix moves the hasNonEmptySession check to after the rescheduled event detection, so events with sessions are also updated when rescheduled.

Review & Testing Checklist for Human

  • Test the actual user scenario end-to-end: Click on a future calendar event in the sidebar, start typing to create a note, then reschedule that event in your calendar app. Verify only one entry appears in the sidebar with the updated time.
  • Verify existing behavior is preserved: Events without sessions should still be deleted when they disappear from the calendar (not rescheduled).
  • Edge case - renamed events: If a user renames an event while rescheduling, the findRescheduledEvent function won't match it (relies on title matching). This is existing behavior but worth noting.

Notes

  • The findRescheduledEvent function matches events by: same title, same calendar, different tracking ID, and within 30 days of the original time.
  • Unit tests added to cover the specific scenario.

Link to Devin run: https://app.devin.ai/sessions/b9f505cc5b5b4f848c65ae00aec87989
Requested by: @ComputelessComputer

…sessions

When a calendar event with an attached note/session is rescheduled, the sync
logic now properly detects the rescheduled event and updates the existing
event's time instead of creating a duplicate.

Previously, events with non-empty sessions would skip the rescheduled event
detection, causing:
1. The old event to remain with the old time
2. A new event to be created with the new time
3. Both appearing in the sidebar as duplicates

The fix moves the rescheduled event detection before the hasNonEmptySession
check, so events with sessions are also updated when rescheduled.

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Jan 20, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit ecabefc
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/696f879421118a0008a57311

@netlify
Copy link

netlify bot commented Jan 20, 2026

Deploy Preview for howto-fix-macos-audio-selection canceled.

Name Link
🔨 Latest commit ecabefc
🔍 Latest deploy log https://app.netlify.com/projects/howto-fix-macos-audio-selection/deploys/696f8794aae66300088ead32

@netlify
Copy link

netlify bot commented Jan 20, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit ecabefc
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/696f8794e081820008fc164f

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