Skip to content

Conversation

@andrinoff
Copy link
Member

@andrinoff andrinoff commented Jan 18, 2026

Mailbox filtering improvements:

  • In fetcher/fetcher.go, the code now checks if the mailbox is the sent mailbox and, if so, filters emails by matching the sender address to the account email. For all other mailboxes, it continues to filter by matching any recipient address to the account email.

Copilot AI review requested due to automatic review settings January 18, 2026 17:26
@andrinoff andrinoff merged commit 8c594a8 into floatpane:master Jan 18, 2026
3 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where sent emails were not showing up in the sent mailbox view. The root cause was that the email filtering logic was checking if the user was a recipient of the email, which doesn't apply to sent emails where the user is the sender.

Changes:

  • Added logic to differentiate between sent mailboxes and inbox/other mailboxes
  • For sent mailboxes, the filter now checks if the sender matches the configured fetch email
  • For inbox and other mailboxes, the filter continues to check if any recipient matches the configured fetch email

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +213 to +217
if isSentMailbox {
// For sent mailbox, check if the sender matches the fetchEmail
if strings.EqualFold(strings.TrimSpace(fromAddr), fetchEmail) {
matched = true
break
}
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new filtering logic for sent mailboxes lacks test coverage. Since the repository has existing tests for the FetchEmails function, consider adding test coverage for FetchSentEmails to verify that the sent mailbox filtering correctly matches emails where the sender is the configured fetch email address.

Copilot uses AI. Check for mistakes.
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