feat(gmail): add history types filter to watch serve#170
Open
salmonumbrella wants to merge 6 commits intosteipete:mainfrom
Open
feat(gmail): add history types filter to watch serve#170salmonumbrella wants to merge 6 commits intosteipete:mainfrom
salmonumbrella wants to merge 6 commits intosteipete:mainfrom
Conversation
The commit 5137fcb added --history-types flag but changed the default behavior: when not specified, it now fetched ALL history types instead of just messageAdded (the previous hardcoded behavior). This fix ensures backward compatibility by defaulting to messageAdded when --history-types is not provided. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When messageDeleted history type is requested, deleted messages cannot be fetched from Gmail API (returns 404). Now collectHistoryMessageIDs returns a struct with separate FetchIDs and DeletedIDs lists, and the hook payload includes deletedMessageIds field for consumers. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add canonical forms to history type alias map for robustness - Add length assertion for FetchIDs in TestCollectHistoryMessageIDs - Clarify documentation that default is messageAdded - Add test for empty input edge case in parseHistoryTypes - Extract duplicate state update logic into updateStateAfterHistory helper Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rename inner `err` to `updateErr` to avoid shadowing the outer variable, satisfying golangci-lint's govet shadow checker. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rename inner `err` to `updateErr` in two additional store.Update() calls to avoid shadowing outer variables, completing the fix from commit 71714ae. Both locations now match the established pattern. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
--history-typesflag togmail watch serveto filter which history events trigger notifications (messageAdded, messageDeleted, labelAdded, labelRemoved)messageAddedfor backward compatibility when the flag is specifiedTest Plan
🤖 Generated with Claude Code