Context
The ReadThread function in internal/client/email.go searches for thread emails by subject, which may return emails with the same subject from unrelated threads. While it filters by threadId client-side, this is inefficient for common subjects and the limit of 50 could truncate large threads.
Potential improvements
- Explore
Thread/get if available in the go-jmap library
- Consider using JMAP
threadId filter if the spec/library supports it
- Document the limitation more prominently if no better approach exists
Origin
Identified during Copilot PR review of PR #1.
Context
The
ReadThreadfunction ininternal/client/email.gosearches for thread emails by subject, which may return emails with the same subject from unrelated threads. While it filters bythreadIdclient-side, this is inefficient for common subjects and the limit of 50 could truncate large threads.Potential improvements
Thread/getif available in the go-jmap librarythreadIdfilter if the spec/library supports itOrigin
Identified during Copilot PR review of PR #1.