Skip to content

feat(sync): add markEventsAsPrivate option to source calendars#408

Open
lucky-lusa wants to merge 1 commit into
ridafkih:mainfrom
lucky-lusa:feat/mark-events-as-private
Open

feat(sync): add markEventsAsPrivate option to source calendars#408
lucky-lusa wants to merge 1 commit into
ridafkih:mainfrom
lucky-lusa:feat/mark-events-as-private

Conversation

@lucky-lusa

@lucky-lusa lucky-lusa commented Jun 11, 2026

Copy link
Copy Markdown

Summary

  • Adds a new Pro-only toggle "Mark Events as Private" to the Sync Settings of a source calendar
  • When enabled, all events synced to destination calendars are marked as private — colleagues see only busy/free, not event details
  • Useful for syncing personal calendars (iCloud, CalDAV) into work calendars (Outlook/Google)

Implementation

  • DB: New markEventsAsPrivate boolean column on calendars table (migration 0071)
  • Sync core: SyncableEvent gets an isPrivate flag, set in fetchEventsForCalendars
  • Google: visibility: "private"
  • Outlook: sensitivity: "private" (also adds sensitivity field to outlookEventSchema)
  • CalDAV / iCloud / Fastmail: CLASS:PRIVATE (RFC 5545)
  • API: Field is gated behind canUseEventFilters (Pro plan), same as other event filter fields
  • UI: Toggle added to Sync Settings section in calendar detail view

Test plan

  • All existing tests pass (bun run test)
  • New tests cover: Google/Outlook/CalDAV serializers set private flag, API returns 403 for free users, request body schema accepts the field
  • Manually verified: enabling toggle on a source calendar causes synced events to appear as private in destination calendar

Adds a new Pro-only toggle that marks all synced events as private
in destination calendars. Useful for syncing personal calendars to
work calendars while showing only busy/free status to colleagues.

- Adds markEventsAsPrivate boolean column to calendars table (migration 0071)
- Propagates isPrivate flag through SyncableEvent to all provider serializers
- Google: sets visibility: "private"
- Outlook: sets sensitivity: "private"
- CalDAV/iCloud/Fastmail: sets CLASS:PRIVATE (RFC 5545)
- Adds Pro gate in API handler (same as other event filter fields)
- Adds toggle to Sync Settings section in calendar detail UI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ridafkih

Copy link
Copy Markdown
Owner

Hey, will review this once I’m back home in a few days. Thank you for the contribution!

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