Skip to content

feat: filter Gmail threads by selected labels - #55

Open
massimoalbarello wants to merge 1 commit into
mainfrom
codex/gmail-label-filtering
Open

massimoalbarello wants to merge 1 commit into
mainfrom
codex/gmail-label-filtering

Conversation

@massimoalbarello

Copy link
Copy Markdown
Owner

Why

Gmail sync already backfills complete conversations and follows mailbox history. Users also need to select conversations by Gmail label while continuing to receive replies that do not inherit those labels, without restarting historical discovery during normal polling.

How

Add an optional labels configuration with OR semantics; omitted or empty labels retain the existing history-range behavior. Resolve names to Gmail IDs and page through each selected label during backfill, preserving native cursors across restarts. Overlapping results retain the same thread IDs and use existing record deduplication.

Continue consuming mailbox-wide history and check affected threads' labels before fetching full content and attachments. Qualifying records include the whole conversation, including unlabelled replies and their attachments. When the final selected label is removed, preserve the archived copy and stop updates until the thread qualifies again.

This branch has not been deployed

No deployments
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