-
Notifications
You must be signed in to change notification settings - Fork 79
feat: Add AI calendar invite editor #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mickn
wants to merge
14
commits into
ankitvgupta:main
Choose a base branch
from
mickn:codex/calendar-invite-editor-clean-pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
20bda0f
Add AI calendar invite editor
9410661
Fix calendar invite review regressions
mickn 0533d2d
Address calendar invite review feedback
mickn 665f142
Merge branch 'main' into codex/calendar-invite-editor-clean-pr
mickn 5aeec74
Remove unrelated changes from calendar invite PR
mickn 3807fc4
Fix invite timezone handling, make invite modal, clarify Meet link
mickn d93ddc2
Document DST approximation in wallClockToInstant
mickn d8ade14
Replace calendar-specific panel-header check with manifest capability
mickn 4dd6b69
Harden invite editor edge cases and extraction safety
mickn 695263f
Add calendar invite PR screenshots
mickn 5afc41c
Release stale invite lock when navigating to another thread
mickn 48a4c3c
Preserve calendar list when post-reauth options fetch fails
mickn e9072e0
Address review feedback on calendar invite editor
claude edaa370
Merge branch 'main' into codex/calendar-invite-editor-clean-pr
mickn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
118 changes: 118 additions & 0 deletions
118
docs/superpowers/specs/2026-05-28-calendar-invite-editor-design.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| # Calendar Invite Editor Design | ||
|
mickn marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Goal | ||
|
|
||
| Add a Superhuman-style calendar invite creation flow for selected email threads. The user can trigger the flow from the keyboard or command palette, review AI-extracted event details in the Calendar tab, see the proposed event against their day view, edit fields, and create/send the Google Calendar invite. | ||
|
|
||
| ## User Flow | ||
|
|
||
| When an email thread is selected, the user can press `i` or choose `Create calendar invite` from the `Cmd+K` command palette. Exo switches the right sidebar to the Calendar tab and enters a `new invite` mode. | ||
|
|
||
| The Calendar tab first shows an extraction/loading state while AI reads the selected thread. When extraction completes, Exo shows an editable event form above the day view. The proposed event appears as a temporary block in the day view before it exists in Google Calendar. Editing the date, start time, end time, or duration updates the proposed block live so the user can see whether they are free. | ||
|
|
||
| The primary action is `Create and send`. It creates the Google Calendar event and sends invitations to guests immediately after the user has reviewed the form. `Cancel` or `Esc` exits invite mode without creating anything. | ||
|
|
||
| ## UI Design | ||
|
|
||
| The invite editor lives inside the existing Calendar sidebar tab rather than as a separate temporary panel. This keeps event creation next to the availability view. | ||
|
|
||
| The top form uses compact icon-led rows: | ||
|
|
||
| - Title | ||
| - Guests | ||
| - Date and time | ||
| - Video conferencing or meeting link | ||
| - Location | ||
| - Agenda or notes | ||
| - Calendar selector | ||
|
|
||
| Below the form, the existing day view remains visible. Existing events render normally. The proposed invite renders as a distinct temporary event block using the extracted title and time. | ||
|
|
||
| The editor should fit the right rail without feeling cramped. If needed, the form and day view can share a scrollable column, with the final action bar pinned at the bottom. | ||
|
|
||
| ## Extraction Behavior | ||
|
|
||
| AI extraction is required for all event fields. The extractor receives the selected thread subject, participants, and message bodies, then returns a strict structured draft: | ||
|
|
||
| - `title` | ||
| - `start` | ||
| - `end` | ||
| - `timezone` | ||
| - `guests` | ||
| - `conference` | ||
| - `location` | ||
| - `description` | ||
| - `calendarId` | ||
| - `confidence` | ||
| - `warnings` | ||
|
|
||
| The agent should infer guests from thread context. It should not blindly include every sender, To recipient, and CC recipient. | ||
|
|
||
| Google Meet is the default conference option unless the thread clearly contains another meeting link, video provider, or physical location. If the thread includes a Zoom link, Meet link, phone bridge, or address, the extracted draft should preserve that instead of overwriting it with Google Meet. | ||
|
|
||
| Timezone should come from the user’s selected Google calendar when available, especially the primary/default calendar. If the calendar timezone is not available, fallback to `Intl.DateTimeFormat().resolvedOptions().timeZone`. The AI may identify an explicitly mentioned timezone, but the editor should normalize and display the event in the user calendar timezone. | ||
|
|
||
| Missing or uncertain values should not prevent the panel from opening. The UI should show blanks and inline warnings so the user can complete the event manually. | ||
|
|
||
| ## Calendar Creation | ||
|
|
||
| The MVP supports Google Calendar only. | ||
|
|
||
| Creating an invite uses Google Calendar event creation with guest notifications enabled. The event creation request should include: | ||
|
|
||
| - selected calendar ID | ||
| - summary/title | ||
| - start/end with timezone | ||
| - attendees | ||
| - description | ||
| - location | ||
| - Google Meet conference creation when selected | ||
| - `sendUpdates: "all"` so guests receive invitations immediately | ||
|
|
||
| After creation succeeds, Exo should refresh calendar state and exit edit mode so the created event appears in the day view. | ||
|
|
||
| ## Permissions | ||
|
|
||
| The existing calendar integration is read-only. This feature needs Google Calendar write permissions for event creation. Existing users may need to re-authenticate Google once after the scope change. | ||
|
|
||
| The UI should handle missing write permission clearly: show an inline error with a re-authenticate action rather than failing silently. | ||
|
|
||
| ## Error Handling | ||
|
|
||
| Warnings should be inline and reviewable: | ||
|
|
||
| - missing title | ||
| - missing start/end time | ||
| - ambiguous duration | ||
| - no guests | ||
| - no write-capable Google Calendar account | ||
| - failed AI extraction | ||
| - failed Google Meet creation | ||
| - failed event creation | ||
|
|
||
| Only final creation should be blocked by missing required fields or missing write permission. Extraction failures should leave the user in an editable blank invite form when possible. | ||
|
|
||
| ## Testing | ||
|
|
||
| Implementation should include focused tests for: | ||
|
|
||
| - AI extractor schema parsing and fallback warnings | ||
| - timezone selection from Google calendar metadata with local fallback | ||
| - event creation payload generation | ||
| - `sendUpdates: "all"` behavior | ||
| - Google Meet conference payload behavior | ||
| - missing-field validation before final creation | ||
| - `i` shortcut and `Cmd+K` command availability | ||
| - Calendar tab editor rendering proposed event alongside existing events | ||
| - error states for extraction failure and calendar creation failure | ||
|
|
||
| ## Non-Goals | ||
|
|
||
| This feature does not include: | ||
|
|
||
| - non-Google calendar providers | ||
| - editing or deleting existing calendar events | ||
| - sending invites without a review screen | ||
| - automatic scheduling optimization across multiple proposed times | ||
| - RSVP management | ||
| - background invite creation from the agent without the Calendar tab editor | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.