Mail list: name everyone who wrote in the thread, and call the user "me"

The sender column showed participants[0], and participants are rebuilt
newest message first — so replying to a thread put the user in that slot
and the list named them instead of the person who wrote in.

Thread summaries (list and search) now carry `senders`: the distinct From
addresses of the thread's visible messages, oldest first, with the same
Trash/Spam visibility as the message count. The list joins them and shows
the user's own account addresses as "me" ("me, Alice" for a thread the
user started), and the avatar prefers the other side of the conversation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 20:17:37 +02:00
co-authored by Claude Opus 5.5
parent 901156526c
commit 08d428de8a
7 changed files with 125 additions and 30 deletions
+3
View File
@@ -18,6 +18,9 @@ class ThreadSummary(BaseModel):
subject: str
snippet: str
participants: list[Address]
# Distinct From addresses of the thread's visible messages, oldest first —
# what the list's sender column shows (recipients excluded).
senders: list[Address] = []
account_ids: list[uuid.UUID]
message_count: int
unread_count: int