Skip to content

Windows support: cross-platform calendar integration #3

@mrf

Description

@mrf

Summary

Add Windows support, primarily by implementing a cross-platform calendar integration to replace the macOS-only AppleScript approach.

Current State

  • Calendar integration uses osascript to query Calendar.app (macOS only)
  • Other panels (PRs, ports, git) should mostly work cross-platform already

Proposed Implementation

Calendar Options for Windows

  1. Microsoft Graph API - Access Outlook/M365 calendars via REST API

    • Requires OAuth setup
    • Works for corporate M365 users
  2. Google Calendar API - For users with Google calendars

    • OAuth flow required
    • Good coverage for personal/workspace users
  3. ICS file parsing - Parse exported .ics files

    • No auth needed
    • User manually exports/syncs calendar
    • Could watch a file for changes
  4. CalDAV protocol - Standard calendar protocol

    • Works with many providers (Google, iCloud, Fastmail, etc.)
    • More complex to implement

Recommended Approach

Start with a pluggable calendar backend:

trait CalendarProvider {
    fn get_events(&self, hours_ahead: u32) -> Result<Vec<Event>>;
}

// Implementations
struct MacOSCalendar;      // existing osascript
struct MicrosoftGraph;     // Windows/M365
struct GoogleCalendar;     // Cross-platform
struct IcsFileCalendar;    // Cross-platform, no auth

Configuration

[meetings]
enabled = true
provider = "auto"  # auto-detect, or: "macos", "msgraph", "google", "ics"
hours_ahead = 8

# For ICS provider
ics_path = "~/calendar.ics"

# For MS Graph (tokens stored in keyring)
msgraph_client_id = "..."

Other Cross-Platform Considerations

Component macOS Windows Notes
Calendar osascript Needs impl Main blocker
Ports lsof netstat Minor changes
Git git CLI git CLI Should work
PRs gh CLI gh CLI Should work

Acceptance Criteria

  • Calendar panel works on Windows with at least one provider
  • Graceful fallback when calendar unavailable
  • Document setup steps for each provider
  • CI builds for Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions