Skip to content

render read receipts as inline status messages#1740

Draft
bennycode wants to merge 5 commits intomainfrom
feat/read-receipt-status-messages
Draft

render read receipts as inline status messages#1740
bennycode wants to merge 5 commits intomainfrom
feat/read-receipt-status-messages

Conversation

@bennycode
Copy link
Copy Markdown
Contributor

@bennycode bennycode commented Mar 5, 2026

Summary

  • Display read receipts as visible centered status messages in the conversation list (following the IntentContent/GroupUpdatedContent pattern), showing sender identity and timestamp
  • Send a read receipt when opening a conversation
  • Designed for xmtp.chat as a debugging tool — read receipts are shown as events rather than decorating messages with checkmarks

Test plan

  • Open a conversation and verify a read receipt is sent
  • Receive a read receipt from another participant and verify it appears as an inline status message with sender identity and timestamp

Note

Render read receipts as inline status messages in xmtp.chat conversations

  • Adds a new ReadReceiptContent component that displays a date label and a centered "received read receipt" indicator for read receipt messages.
  • MessageContentWithWrapper now routes messages with contentType.typeId === "readReceipt" to this new component instead of the default renderer.
  • Conversation calls conversation.sendReadReceipt() after the initial sync completes when a conversation is opened.

Macroscope summarized 62c0042.

Display read receipts as visible centered status messages in the
conversation list, showing sender identity and timestamp. Also sends
a read receipt when opening a conversation.
@bennycode bennycode requested a review from a team as a code owner March 5, 2026 21:12
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
xmtp-js-xmtp-chat Ready Ready Preview, Comment Mar 5, 2026 9:39pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
xmtp-chat-api-service Skipped Skipped Mar 5, 2026 9:39pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 5, 2026

⚠️ No Changeset found

Latest commit: 62c0042

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

macroscopeapp[bot]
macroscopeapp bot previously approved these changes Mar 5, 2026
@macroscopeapp
Copy link
Copy Markdown

macroscopeapp bot commented Mar 5, 2026

Approvability

Verdict: Approved

This PR adds simple UI rendering for read receipts in the xmtp.chat app. The changes are small and self-contained, and you own all three files being modified. This is suitable for approval.

You can customize Macroscope's approvability policy. Learn more.

@vercel vercel bot temporarily deployed to Preview – xmtp-chat-api-service March 5, 2026 21:16 Inactive
@macroscopeapp macroscopeapp bot dismissed their stale review March 5, 2026 21:16

Dismissing prior approval to re-evaluate 92fb7a3

const { members } = useConversation(conversationId);
const senderMember = members.get(senderInboxId);
return (
<Popover opened={opened} position="bottom" withArrow>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High Messages/ReadReceiptContent.tsx:25

Popover in controlled mode requires onChange={toggle} to handle dismissal events. Without it, clicking outside or pressing Escape leaves opened stuck as true, so the popover won't close until the user clicks the trigger again.

-    <Popover opened={opened} position="bottom" withArrow>
+    <Popover opened={opened} onChange={toggle} position="bottom" withArrow>
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file apps/xmtp.chat/src/components/Messages/ReadReceiptContent.tsx around line 25:

`Popover` in controlled mode requires `onChange={toggle}` to handle dismissal events. Without it, clicking outside or pressing Escape leaves `opened` stuck as `true`, so the popover won't close until the user clicks the trigger again.

Evidence trail:
1. apps/xmtp.chat/src/components/Messages/ReadReceiptContent.tsx line 25 at REVIEWED_COMMIT shows `<Popover opened={opened} position="bottom" withArrow>` with no `onChange` or `onDismiss` prop
2. Mantine official documentation at https://mantine.dev/core/popover/ - 'Controlled' section shows `onChange={setOpened}` usage pattern
3. Mantine documentation 'onDismiss' section explicitly states: "If you need to control opened state, but still want to close popover on outside clicks and escape key presses, use `onDismiss` prop"

macroscopeapp[bot]
macroscopeapp bot previously approved these changes Mar 5, 2026
@vercel vercel bot temporarily deployed to Preview – xmtp-chat-api-service March 5, 2026 21:38 Inactive
@macroscopeapp macroscopeapp bot dismissed their stale review March 5, 2026 21:38

Dismissing prior approval to re-evaluate 62c0042

@bennycode bennycode changed the title feat(xmtp.chat): render read receipts as inline status messages render read receipts as inline status messages Mar 5, 2026
senderInboxId={senderInboxId}
/>
);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't recommend putting anything into the message feed. in the past, it has become so noisy that it's hard to read the messages. not sure how best to incorporate them for developers, but in the UI, it's best to use the lastReadTimes() method and attach an addendum to the last message read as is common in other messengers.

);
}

if (message.contentType.typeId === "readReceipt") {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read receipts are filtered out of the messages list by default

@bennycode bennycode marked this pull request as draft March 14, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants