From a4540f3ba5c70a20a6b631227ccaa4f8cd9c456a Mon Sep 17 00:00:00 2001 From: Akash Tom Date: Wed, 29 Jul 2026 19:02:48 +0530 Subject: [PATCH 1/6] feat(mail): name a thread row after everyone who wrote in it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An inbox thread you had replied to was filed under your own name: the row named the latest message's sender, which is you the moment you answer. The row now names the thread's participants in the order they first wrote, with your own addresses collapsed to "me" — "Sarfaraz, me", "Brittany … Neha, me" — so it still leads with whoever started the conversation. Sent and Drafts keep naming recipients; search results are single messages and fall back to the sender. `is_self` is resolved server-side against the owning account's identities, so rows merged in from another account (All Inboxes, cross-account search) are still resolved against the right one. Stacking follows: it keyed on the latest sender too, so threads whose only common feature was your own reply piled up under your name. It now keys on the whole cast, and the stack row names itself the way its members do. Its count badge picks up a layers glyph to tell it apart from the per-thread message count now shown beside the participants. Co-Authored-By: Claude Opus 5 (1M context) --- .../src/apps/mail/components/MailListItem.vue | 29 +++++- .../apps/mail/components/StackListItem.vue | 34 ++++++- frontend/src/apps/mail/types/index.ts | 10 ++ .../src/apps/mail/utils/participants.test.ts | 99 +++++++++++++++++++ frontend/src/apps/mail/utils/participants.ts | 57 +++++++++++ .../src/apps/mail/utils/threadStacks.test.ts | 83 +++++++++++++--- frontend/src/apps/mail/utils/threadStacks.ts | 39 +++++--- suite/mail/api/mail.py | 42 +++++++- 8 files changed, 360 insertions(+), 33 deletions(-) create mode 100644 frontend/src/apps/mail/utils/participants.test.ts create mode 100644 frontend/src/apps/mail/utils/participants.ts diff --git a/frontend/src/apps/mail/components/MailListItem.vue b/frontend/src/apps/mail/components/MailListItem.vue index 3848420ce5..0227e323bc 100644 --- a/frontend/src/apps/mail/components/MailListItem.vue +++ b/frontend/src/apps/mail/components/MailListItem.vue @@ -6,7 +6,7 @@ :selection-mode :unread="!mail.seen" :hide-sender - :avatar-label="getSenderInitial(mail)" + :avatar-label="avatarLabel" :avatar-image="mail.user_image" :datetime="mail.received_at" :subject-italic="!mail.subject" @@ -16,6 +16,14 @@