Is your feature request related to a problem?
There is no way to search emails in matcha. Users with large mailboxes have no option other than scrolling to find specific emails. Search is a fundamental email client feature.
Describe the solution you'd like
- Add a
Search(ctx context.Context, query string, folder string) ([]Email, error) method to the backend.Provider interface
- Implement using IMAP
SEARCH command for the IMAP backend
- Implement using JMAP
Email/query filters for the JMAP backend
- Add a search TUI overlay (e.g. triggered by
/ key) with a text input and results list
- Support searching by sender, subject, body text, and date range
Describe alternatives you've considered
Client-side filtering of already-fetched emails. This would be simpler but only works for cached emails and doesn't scale to large mailboxes.
Additional context
Both IMAP and JMAP protocols have native server-side search capabilities that are already available in the protocol libraries used by matcha (go-imap/v2 and go-jmap) but are not currently exposed.
Is your feature request related to a problem?
There is no way to search emails in matcha. Users with large mailboxes have no option other than scrolling to find specific emails. Search is a fundamental email client feature.
Describe the solution you'd like
Search(ctx context.Context, query string, folder string) ([]Email, error)method to thebackend.ProviderinterfaceSEARCHcommand for the IMAP backendEmail/queryfilters for the JMAP backend/key) with a text input and results listDescribe alternatives you've considered
Client-side filtering of already-fetched emails. This would be simpler but only works for cached emails and doesn't scale to large mailboxes.
Additional context
Both IMAP and JMAP protocols have native server-side search capabilities that are already available in the protocol libraries used by matcha (
go-imap/v2andgo-jmap) but are not currently exposed.