Outlook Calendar read strategies

Cockpit consumer: outlook-calendar-dual-architecture.md. Day closure: OUTLOOK-CALENDAR-DAY-CLOSURE.md.

Updated

Month-first collect (v2)

  1. Monthgoto_month + probe_month_surface (grid OK, filter state, loaded-events hint).
  2. Collectcollect_month_events scans all aria-label chips for the target month; each event includes scan_date parsed from label (June / Jun).
  3. Per dayexpand_day_overflow when +N remains on the cell; Cockpit merges with month partition.
  4. Deep harvest — aria-first open (flyout before month grid) → detail wire (scoped to ReadingPane) → Tracking CSV → dismiss.

collect_day_events supplements discover merge only; open never re-collects by index (avoids event_index_out_of_range on busy +N days).

Deep harvest open path (+N agenda on cloud.microsoft)

  1. expand_day_overflow opens the day flyout (+N chip).
  2. open_event_expand searches flyout roots first ([role="dialog"], [data-tabster], [role="listbox"]), then month grid [aria-label].
  3. Match order: exact normalized aria_label → stable prefix through year → title needle + scan date.
  4. Post-click: Open / Expand event menu; follow /calendar/item/ or itemid= deep link when still on month view.
  5. read_detail_wire succeeds when title non-empty or body_text length > 20.

Wire field open_surface: flyout | grid | title_needle for operator diagnostics.

Legacy collect_day_events is not used for open index fallback.

Surface

Surface URL pattern v1
Month view /calendar/view/month Yes (only)
Week / day view /calendar/view/week, /day No (future)

DOM navigation atoms

  1. Month — chevron buttons or date picker until header shows target month/year.
  2. Day cellrole=gridcell / aria-label match scan_date; keyboard Arrow keys as fallback.
  3. Overflow — button/link text +N opens day flyout; scroll [role=list] until stable.
  4. Event — click list item → reading pane → Expand (pop-out) for full body + Tracking.
  5. DismissEscape stack via outlook_calendar_dismiss_flyouts.

Item ID

Priority: URL /calendar/item/{id} or itemid= query → DOM data-itemid → composite fallback (Cockpit flags unstable).

Helper: outlook_extract_calendar_item_id() in connectors/outlook_urls.py.

Tracking CSV

Path: expanded event → Tracking pane → ... menu → Download as CSV.

LCDL clicks menu only; Cockpit adopts from ~/Downloads (COCKPIT_CALENDAR_CSV_WAIT_SEC).

Tasks (read_only)

Task Typical latency
outlook_probe_calendar_health 2–5 s
outlook_calendar_goto_month 3–10 s
outlook_calendar_probe_month_surface 1–3 s
outlook_calendar_collect_month_events 5–20 s
outlook_calendar_expand_day_overflow 2–10 s
outlook_calendar_collect_day_events 5–30 s (legacy / open_event)
outlook_calendar_open_event_expand 3–8 s
outlook_calendar_download_tracking_csv 2–5 s (+ Cockpit adopt)

Forbidden UI

Save, Edit, Cancel meeting, RSVP, Edit series, Send.