feat(gmail): serve search and thread from the local store - #82
Open
MaximeGaudin wants to merge 1 commit into
Open
feat(gmail): serve search and thread from the local store#82MaximeGaudin wants to merge 1 commit into
MaximeGaudin wants to merge 1 commit into
Conversation
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>
This was referenced Sep 13, 2026
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.
Summary
void gmail searchstill uses Gmail query language (list_messages) but hydrates each id from the local INBOX store when a usable body is already synced, skippingget_message.void gmail threadserves the stored conversation when every message has a usable body; incomplete threads still hit the API.--liveskips 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 Gmailmessages.getcalls--livestill hits the APIvoid gmail search --help/void gmail thread --helpshow--livevoid gmail thread <id>uses the store for a fully synced thread, and the API when a body is missing/shortin:sent/ drafts still fetch from the API (not in the INBOX mirror)