Conversation lists should group by the other party not the sender
Designing the grouping key for a list view that aggregates messages into per-conversation rows for triage or review.
The obvious key for grouping a list of messages is from.platform_id, the sender. For inbound messages that is correct because the sender is the other party. For outbound messages the sender is always the user themselves, so every outbound message collapses into a single from-me row regardless of who it was sent to. The right key is the other party in the conversation, picked by direction: from for inbound, to[0] for outbound. The bug only surfaces when a chunk of outbound messages lands in the view at once — for example after a cleanup that re-routed misattributed outbound events into triage — at which point ninety eight conversations become one row labeled from you. The fix is one conditional plus a fallback to from when the recipient list is empty, but the conceptual shift is recognising that group-by-sender is a leaky default that works until your view holds outbound traffic.
When designing a conversation list groupBy, write it as group-by-other-party not group-by-sender. Same one line for the inbound-only case, correct for the eventual day outbound shows up in the same view.