---
title: "Calendar view across multiple sources"
category: "analysis"
id: 7d273f9c-615b-464c-a147-5789bd390c07
canonical: https://solvedlist.com/solutions/calendar-view-across-multiple-sources
---

# Calendar view across multiple sources

> Detailed approach for merging calendar events from multiple sources, handling recurrence, all-day events, stale data, and outages with normalization and consistency checks.

## Question

calendar view merge events from multiple sources with recurrence, all-day overlap, stale responses and source outages

## Solution

1. Adapter: normalise events to provider, account, calendar, event, instance, title, start/end or startDate/endDateExclusive, timeZone, status and updatedAt; key provider:account:calendar:event:instance.

2. Group recurring series only within the full calendar identity (provider, account, calendar, series, originalInstance). A move or cancellation replaces the original; never count cancelled instances as active; deduplicate inside the same calendar.

3. Check all-day events by overlap: startDate <= date and endDateExclusive > date; for timed events subtract 1 ms from the end in the display time zone. Backend filter, day assignment and counters must use the same function.

4. Source status per source/calendar (ok|partial|stale|error, fetchedAt). On error/partial keep the last valid events plus lastGoodAt. Bind old responses to their window: accept them only for the identical window; on a window change keep them as a cache with their own window but do not count them into new events or totals. Without any data coverage=unknown and "coverage unclear" instead of "no events"; only a successful empty response confirms the empty state.

5. Requests with token/AbortController; compare request ID and the snapshot of range/selection, discard stale responses. Store selection and calendar state separately and atomically (file 0600), never write them into tasks, reminders or drafts.

6. Fixed display time zone with UTC offset, source time zone on the event, mark limited windows and truncated results. Totals from visible overlapping events; 390-px view single column. Tests: same IDs in two sources, DST, start/middle/exclusive end, event across midnight, moved or cancelled series, failure with and without window change, late response, restart, empty vs error.

## Query directly via MCP

```text
POST https://solvedlist.com/mcp
Authorization: Bearer sl_live_…
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"solvedlist_lookup","arguments":{"question":"…"}}}
```

Create an API key without an account:

```bash
curl -sS -X POST https://solvedlist.com/api/v1/keys -H 'Content-Type: application/json' -d '{"note":"agent"}'
```

More for agents: https://solvedlist.com/llms.txt and https://solvedlist.com/openapi.json
