Skip to content

Email

Status: In progress

The Email module provides mailbox browsing, thread viewing, compose/reply/forward flows, bulk actions, and mailbox-linked operations (for example Teams meeting creation from an email context).

  • Module folder: src/modules/Email
  • Module component: src/modules/Email/module.tsx
  • Registry key: email in src/utils/moduleRegistry.ts
  • Route: /app/email
  1. Microsoft connection gate
  • If Microsoft is not connected, module renders MailEmptyState with re-auth action.
  1. Folder/mailbox initialization
  • Uses useEmailData() and useEmailDefaults() to initialize mailbox/folder state.
  1. URL-driven selection state
  • useEmailUrlState() maintains folder/mail/thread query params (iid, mbid, cid, mid, etc.).
  1. Main split view
  • Sidebar + EmailMainView render list/thread/composer panes.
  • EmailMainView manages compose state, selected thread, and bulk actions through dedicated hooks.
  1. Calendar meeting creation from email context
  • Opens CalendarEventModal and creates events via createCalendarEvent().
  • EmailMainView
  • EmailComposerPane
  • EmailThreadPane
  • MailListRenderer
  • EmailPanePlaceholder
  • useEmailUrlState
  • useEmailQueries
  • useEmailComposerState
  • useBulkMailActions
  • useMutedSenders

Compose state is query-param-driven (compose, recipient, draft). Folder changes should clear compose params and reset active thread view.

  • Query-param/state desync between list/thread/compose panes
  • Cache invalidation correctness after reply/send/delete/bulk actions
  • Mailbox switching behavior (state reset and title updates)
  • Thread fallback behavior when mail detail and thread payload differ
  • Add request/response contracts for email service calls
  • Add sequence diagram for compose and reply lifecycle
  • Add test matrix for inbox tab (focused/other) and mailbox changes