734b0bd2d2
- Removed `IMAPMessageLocator` service which relied on `Message-ID` header lookups. We now fetch messages directly by UID, which should eliminate most of the issues we were hitting. This had a challenge, `messageIdsToFetch` were flattened and UIDs are only unique within their own folder. To preserve context without modifying the core message module, I landed on using composite keys for IMAP message IDs. Each UID is now prefixed with its folder name, and we parse it back when needed to recover the folder. This feels like a reasonable trade-off since it resolves a lot of the failures we saw with `Message-ID` lookups. And Syncs are faster now since there's no double scanning. - Added `QRESYNC` support for servers that provide it, giving us faster incremental sync. - Refactored code to better split concerns. ### Compatibility Test | Server | Status | |---------------------|------------| | Gmail | ✅ Tested | | Dovecot | ✅ Tested | | Stalwart | ✅ Tested | | Titan Email | ✅ Tested | | FastMail | ✅ Tested | <img width="804" height="418" alt="image" src="https://github.com/user-attachments/assets/b414a484-2798-4839-b395-9dd5c153effe" />