Skip to content

Conversation

@kualta
Copy link
Collaborator

@kualta kualta commented Jan 9, 2026

Summary

Integrates XMTP v3 (MLS-based encryption) for direct messaging, enabling users to:

  • View and manage a list of DM conversations with consent state (Inbox/Requests/Blocked)
  • Create new chats by Ethereum address or ENS name
  • Send and receive encrypted messages in real-time with streaming updates
  • Accept or block message requests before responding

Implementation Details

  • Added 16 new files: components, hooks, atoms, and routes for messaging
  • XMTP client lazy-initializes only when user accesses /messages
  • Integrated with existing ENS resolution and Wagmi wallet utilities
  • Uses React Query for server state and Jotai for UI state management
  • Messages dock item shows unread count badge with real-time updates

Testing Checklist

  • Navigate to /messages and verify onboarding modal appears
  • Create new conversation and send/receive messages
  • Accept and block message requests
  • Verify unread badge updates in real-time
  • Test ENS name resolution in new conversation dialog

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74cf610013

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 25 to 29
const handleEnable = async () => {
await initialize();
if (!error) {
onOpenChange(false);
}

Choose a reason for hiding this comment

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

P2 Badge Don’t close onboarding dialog on failed init

The dialog closes based on the error value captured before initialize() runs. Because error is updated asynchronously in XmtpContext, a failed initialization (e.g., user rejects the signature or the SDK throws) can still hit if (!error) and close the dialog, hiding the failure and leaving XMTP uninitialized. Consider making initialize() return a success boolean/throw on failure or checking the post-call state before closing.

Useful? React with 👍 / 👎.

Comment on lines 69 to 73
// Cleanup on unmount or wallet disconnect
useEffect(() => {
if (!isConnected && client) {
disconnect();
}

Choose a reason for hiding this comment

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

P1 Badge Reset XMTP client on account change

The provider only disconnects when isConnected becomes false, so switching wallets while staying connected leaves the previous XMTP client active. In that scenario, the UI continues to show/send messages for the old inbox even though address has changed. This can confuse users and leak the wrong account’s inbox. Include the address in the disconnect logic (or recreate the client) when it changes.

Useful? React with 👍 / 👎.

@vercel
Copy link

vercel bot commented Jan 9, 2026

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

Project Deployment Review Updated (UTC)
talk Ready Ready Preview, Comment Jan 10, 2026 3:25am

@kualta kualta merged commit d324375 into main Jan 10, 2026
2 checks passed
@kualta kualta deleted the kualta/xmtp-dms branch January 10, 2026 22:03
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