Skip to content

fix(chat): render system messages in the transcript - #1769

Merged
bmc08gt merged 4 commits into
code/cashfrom
fix/chat-system-messages
Oct 14, 2026
Merged

bmc08gt merged 4 commits into
code/cashfrom
fix/chat-system-messages

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Private group chats now carry server system messages (SystemContent, e.g. "A new member joined the group"). They were stored but drawn as an empty row: is MessageContent.System -> Unit still took the row's spacing, leaving an unexplained gap in the transcript.

They now render as SystemMessageRow: an info glyph and the text, centred, in caption and textSecondary, wrapping at 250dp. There's no bubble, sender, timestamp, long-press, reactions, reply or swipe. Design is option D in the private groups iteration section, node 11721:879.

How a system row behaves in the transcript:

  • It's its own ChatListItem.SystemMessage, keyed sys-<id>.
  • It breaks a same-sender run and never takes the unread divider. firstNotSentByAfter now requires a sender, matching countInboundAfter.
  • It doesn't trigger the receive haptic, since the haptic effect only looks at ContentBubble items.
  • The read pointer can still advance onto it.

Blank text: ProtobufToLocal drops whitespace-only SystemContent but keeps the message, so read state and divider ids stay intact, and no row is drawn.

Chat list: a system message previews as its text with no sender prefix. The latest-message queries in ChatMessageDao now skip messages whose content is empty (content_json null or []). This applies to any empty-content message, not only system ones, so a chat no longer previews as blank.

iOS counterpart: code-payments/code-ios-app#1054.

@bmc08gt bmc08gt self-assigned this Oct 14, 2026
@github-actions github-actions Bot added type: fix Bug fix area: network gRPC, connectivity, API, exchange rates and removed type: fix Bug fix labels Oct 14, 2026
@bmc08gt
bmc08gt merged commit 055de89 into code/cash Oct 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: network gRPC, connectivity, API, exchange rates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant