Serve the home-page unread digest from the index, never from IMAP

FeatureEmailService
Shipped
August 22, 2026 at 2:11 AM UTC
Author
Kamo
Commit
5f115d5

A widget on the home page is on screen for everyone all day, whether or not anybody is reading mail — and a member's IMAP connections are a shared budget of ten per user and IP for the whole pod. So the unread digest reads email_metadata.search_index and does NOT fall through to the mail server the way the mail client rightly does; one widget that spent a connection per home-page load would starve the client it summarises. The consequence is that the LIST is as fresh as the last sync, and the widget is built around that: the count beside it comes from the live unread snapshot the websocket already pushes, so the number people act on is never stale even when the envelopes are a few minutes behind. It also reports whether the inbox has ever been indexed, because 'no unread mail' and 'nobody has opened this mailbox' are the same picture and very different facts. Envelopes only. body_text is in the index and is deliberately not sent: a home page is the most over-the-shoulder surface in the product.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing