Skip to content

Drafts tab always empty — AI-generated drafts not shown #45

@gpechenik

Description

@gpechenik

Summary

The Drafts tab in the inbox view always shows empty ("No drafts"), even when AI-generated drafts exist and are visible in Gmail and other email clients. This appears to affect all users since the Drafts tab only queries localDrafts (compose sessions started in-app), not AI-generated drafts from the agent pipeline.

Root Cause

There are two separate draft systems:

  1. localDrafts — drafts created via the compose UI. The Drafts tab queries this table.
  2. email.draft — AI-generated reply drafts from the prefetch/agent pipeline. These are stored in the drafts table linked to emails, synced to Gmail, and visible in the email detail view — but never surfaced in the Drafts tab.

The list-gmail-drafts IPC handler exists but the Drafts tab UI never calls it. gmail-draft-sync.ts only syncs local→Gmail, not the reverse (Gmail→local drafts list).

Expected Behavior

The Drafts tab should show AI-generated drafts (which are the majority of drafts for most users), not just manually composed ones.

Steps to Reproduce

  1. Let the app run long enough for the agent pipeline to generate drafts
  2. Verify drafts exist in Gmail (they do — properly threaded)
  3. Click the Drafts tab in Exo — shows "No drafts"

Environment

Found while working on #31. Tested on macOS with a single Gmail account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions