- Add EmailThread model and observeThreads() grouping emails by RFC 2822 References/In-Reply-To headers (IMAP) or native threadId (JMAP) - Store threadId/messageId/inReplyTo/references in DB (schema v14) - Switch EmailListScreen to thread-grouped view; flag icon preserved - Guard _reconcileDeletedImap against wiping local cache when server returns 0 UIDs (network glitch / buggy IMAP server) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>