Skip to content

feat(gmail): serve search and thread from the local store - #82

Open
MaximeGaudin wants to merge 1 commit into
mainfrom
feat/gmail-store-first
Open

feat(gmail): serve search and thread from the local store#82
MaximeGaudin wants to merge 1 commit into
mainfrom
feat/gmail-store-first

Conversation

@MaximeGaudin

Copy link
Copy Markdown
Owner

Summary

  • void gmail search still uses Gmail query language (list_messages) but hydrates each id from the local INBOX store when a usable body is already synced, skipping get_message.
  • void gmail thread serves the stored conversation when every message has a usable body; incomplete threads still hit the API.
  • --live skips the store. Store coverage is INBOX-only (in:sent, drafts, extra labels, unsynced mail still go to the network).

Tracks the store-first leftover from #79 (retry already landed in #80).

Test plan

  • void gmail search "newer_than:7d" on a synced INBOX account returns the same JSON as before, with fewer Gmail messages.get calls
  • Same search with --live still hits the API
  • void gmail search --help / void gmail thread --help show --live
  • void gmail thread <id> uses the store for a fully synced thread, and the API when a body is missing/short
  • in:sent / drafts still fetch from the API (not in the INBOX mirror)

Skip get_message/get_thread when the INBOX mirror already has a usable body.
`--live` forces the API. Cuts 1+N reads on a warm store.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant