Conversation
Add the typed drawer protocol and infrastructure to create a Calendar event from a Mail message via drag & drop: - New drawer events CALENDAR_MAIL_DRAG_STATE, CALENDAR_MAIL_DROP and CALENDAR_CREATE_EVENT_FROM_MAIL in packages/shared/lib/drawer/interfaces. - Extend Mail layout state with a single-message drag count and dragged ID. - Calendar day/week grid becomes a Mail drop target and reports the computed slot timestamp back; Mail resolves the dragged message and initialises the existing event editor (title/subject + start, never auto-saved, no body). Includes unit tests for slot/time mapping, message-to-payload resolution and drawer message recognition.
User-facing entry points on top of the create-event drawer messaging: - 'Add to Calendar' action in the message More menu: opens the Calendar drawer and prefills the event editor with the email subject and sender. - Highlight the Calendar drawer icon as a valid target while a single message is dragged, and open the drawer on hover. - Month view drop target: dropping on a day cell creates an event at the default time on that date. - Interaction telemetry (mail_calendar_create_event) with a drag_drop / menu_action entry-point dimension and no message content.
mmso
force-pushed
the
main
branch
10 times, most recently
from
September 11, 2026 16:16
5eb5e79 to
28d81d1
Compare
mmso
force-pushed
the
main
branch
5 times, most recently
from
September 16, 2026 16:17
40a6c9b to
079f4b5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add a "create Calendar event from email" capability to Mail, with drag-and-drop as the primary desktop interaction and an "Add to Calendar" menu action as the accessible alternative.
Dropping a single Mail message onto the Calendar drawer's grid opens the standard event editor with:
From: <sender>description referenceIt reuses the existing Mail drag system, Calendar drawer iframe, drawer messaging protocol and Calendar event editor - no parallel drag or persistence path is introduced.
Implementation notes
packages/shared/lib/drawer/interfaces.ts:CALENDAR_MAIL_DRAG_STATE,CALENDAR_MAIL_DROPandCALENDAR_CREATE_EVENT_FROM_MAIL.useCalendarMailDrop; the slot date/time is computed with the existinggetTargetMinutes/getNewTimehelpers, then reported back to Mail viaCALENDAR_MAIL_DROP.messageID,subjectandsendermetadata (never the body) viaCALENDAR_CREATE_EVENT_FROM_MAIL.interactiveRef.createEventFromMail.READYhandshake on a cold open) and prefills subject/sender with default date/time.mail_calendar_create_eventwith adrag_drop/menu_actionentry-point dimension (no message content).Testing
New unit tests (which I verified pass via a local
node --testharness, since I could not run the monorepo install):dateHelpers.spec.ts- drop-to-timestamp mapping for day, week and month grids (snapping, clamping, guards).createEventFromMessage.test.ts- onlymessageID/subject/senderforwarded (asserts no body), sender fallback, missing-subject normalisation.layoutSlice.spec.ts- drag count / dragged-ID transitions.drawer.spec.ts- the three new event types are recognised as drawer messages.Note: I was unable to run
yarn installin my environment (the@proton/*scope registry andvendor/*workspaces are only reachable from Proton's internal network), so the CIprettier/eslint/check-typesgates have not been executed on my side. The changed files parse cleanly under TypeScript, but please run CI. Also, the new measurement groupmail.web.calendar_create_eventrequires backend whitelisting or it will be silently dropped.Out of scope
Month view maps a drop to the start of the dropped day (default-time event) rather than an exact time. Stable email backlinks, conversation-level events and date/time extraction are left for follow-ups.