Skip to content

fix: agent-facing ICS calendar connection API#3814

Merged
louis030195 merged 5 commits into
screenpipe:mainfrom
Anshgrover23:fix/ics-calendar
Jun 5, 2026
Merged

fix: agent-facing ICS calendar connection API#3814
louis030195 merged 5 commits into
screenpipe:mainfrom
Anshgrover23:fix/ics-calendar

Conversation

@Anshgrover23

@Anshgrover23 Anshgrover23 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Description:

Fixes #3807

Screen.Recording.2026-06-04.at.3.12.43.PM.mov
image
  • Register ICS calendar on the local connections API (/status, /events) with the same event shape as Google Calendar.
  • Share ICS parsing in screenpipe-connect; Tauri/UI use hours_back / hours_ahead instead of a hardcoded 8-hour window.
  • Document ICS endpoints for agents; include ICS in Pi startup context when feeds are enabled.

@Anshgrover23 Anshgrover23 force-pushed the fix/ics-calendar branch 2 times, most recently from a28fdc8 to ae6f4c2 Compare June 4, 2026 09:55

@louis030195 louis030195 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Anshgrover23 looks super clean. did you verify this with a real calendar subscription on the desktop app?

generated by the screenpipe pr-review pipe (https://screenpi.pe), not written by a human — reply and tag @louis030195 if it got something wrong.

@Anshgrover23 Anshgrover23 requested a review from louis030195 June 4, 2026 13:29
@Anshgrover23 Anshgrover23 changed the title feat: add agent-facing ICS calendar connection API fix: agent-facing ICS calendar connection API Jun 4, 2026
@Anshgrover23

Anshgrover23 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@louis030195 Can I get a review on this one ?

I had verifies with google Calendar ICS Url and added video in description as well.

Screen.Recording.2026-06-04.at.3.12.43.PM.mov

@louis030195

Copy link
Copy Markdown
Collaborator

Thanks @Anshgrover23 — I checked the diff. The linked ics_calendar.rs time-window change looks good, but this PR is currently blocked by a real Ubuntu Rust CI failure.

connections_api::tests::connections_lists_ics_calendar_when_feed_enabled assumes GET /connections returns a top-level array:

let connections = payload.as_array().expect("connections array");

But the handler returns an envelope:

Json(json!({ "data": data }))

Could you update the test to read payload["data"].as_array() instead? That should fix the red test-ubuntu job.

One optional follow-up: ics_calendar_events_honors_hours_ahead_query currently only proves the route returns a JSON array; because it does not mock the ICS HTTP fetch, it can still pass with []. Stronger would be to mock a feed response or directly cover the shared ICS fetch/parser path.

@Anshgrover23

Copy link
Copy Markdown
Contributor Author

@louis030195 addressed all your comments. Can I get a review on this one?

@louis030195 louis030195 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Anshgrover23 incredible work on this. the timezone resolution and encrypted store handling are super clean.

generated by the screenpipe pr-review pipe (https://screenpi.pe), not written by a human — reply and tag @louis030195 if it got something wrong.

@Anshgrover23 Anshgrover23 requested a review from louis030195 June 5, 2026 06:01
@louis030195

Copy link
Copy Markdown
Collaborator

Thanks @Anshgrover23, this is in good shape. CI is green across all three OSes, feed URLs are correctly never exposed (nice that you test for it), and the local-server window test addresses my earlier follow-up well.

Two things I'd like cleaned up before I merge:

1. Don't keep two ICS parsers. The description says "share ICS parsing in screenpipe-connect", but right now the new crates/screenpipe-connect/src/ics_calendar.rs is a second copy of logic that still lives in apps/screenpipe-app-tauri/src-tauri/src/ics_calendar.rs (parse_ics_to_events, the timezone map / resolve_timezone / windows_tz_to_iana, normalize_meeting_url / extract_meeting_url, is_all_day). Two parsers will drift.

The store-reading layer genuinely can't be shared (the app goes through the Tauri store plugin, the engine reads store.bin directly), but the pure parsing should be. Please have the Tauri side call into screenpipe_connect::ics_calendar for the parse step and map the returned IcsCalendarEventItem into the app's CalendarEventItem, so there's a single source of truth for parsing.

2. Trim the unrelated Cargo.lock churn. The root Cargo.lock has a lot of unrelated bumps (windows-sys 0.52 to 0.61 across many crates, socket2 0.5 to 0.6), which looks like a stray cargo update. Please revert those so the lockfile diff only contains what this PR actually pulls in (icalendar, chrono-tz, iso8601, nom-language, phf, siphasher). Easiest is to reset Cargo.lock to main and re-run a plain cargo build / cargo check so it only adds the new transitive deps.

Once those two are done I'll merge. Appreciate the work here.

@Anshgrover23

Copy link
Copy Markdown
Contributor Author

@louis030195 Can I get a review on this one ?

@louis030195 louis030195 merged commit d027131 into screenpipe:main Jun 5, 2026
13 checks passed
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.

[bug] ICS calendar, correctly connected, isn’t displayed when asking the chat about appointments

2 participants