-
Notifications
You must be signed in to change notification settings - Fork 2
feat(messaging): Add comprehensive messaging system with conversations and UI #264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…s and UI - Implement full messaging page with conversation list and view components - Add new hooks for managing conversations and messages - Create services for handling messaging-related API interactions - Develop UI components for conversation list, message bubbles, and input - Implement search and filtering for conversations - Add new message dialog for initiating conversations - Update user profile types to support messaging functionality - Enhance user interaction with follow button and profile settings This implementation provides a complete messaging experience with real-time conversation management and intuitive user interface.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. WalkthroughThis PR introduces a comprehensive messaging system with a two-pane UI layout, comprising new components for conversations and messages, supporting services and hooks for data fetching and real-time updates, follow functionality, and privacy settings for messaging permissions. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MessagesPage
participant ConversationList
participant ConversationView
participant useConversations
participant useMessages
participant messageService
User->>MessagesPage: Visit /messages
MessagesPage->>useConversations: fetch conversations
useConversations->>messageService: getConversations()
messageService-->>useConversations: conversations[]
useConversations-->>MessagesPage: conversations, loading
MessagesPage->>ConversationList: render list
User->>ConversationList: select conversation
ConversationList->>MessagesPage: onSelect(conversationId)
MessagesPage->>ConversationView: pass conversationId
ConversationView->>useMessages: fetch messages
useMessages->>messageService: getMessages(id)
messageService-->>useMessages: messages[]
useMessages-->>ConversationView: messages, loading
ConversationView->>ConversationView: render MessageBubbles
User->>MessageInput: type message
User->>MessageInput: press Enter
MessageInput->>useMessages: sendMessage(content)
useMessages->>messageService: sendMessage()
messageService-->>useMessages: Message (optimistic update)
useMessages-->>ConversationView: messages[] updated
ConversationView->>ConversationView: auto-scroll to bottom
sequenceDiagram
participant User
participant NewMessageDialog
participant conversationService
participant connectionService
participant MessagesPage
User->>NewMessageDialog: click "New Message"
User->>NewMessageDialog: search & select user
NewMessageDialog->>conversationService: canMessageUser(userId)
conversationService-->>NewMessageDialog: { canMessage, reason? }
alt Can Message
NewMessageDialog->>conversationService: getOrCreateConversation(userId)
conversationService-->>NewMessageDialog: Conversation
NewMessageDialog->>MessagesPage: navigate to /messages?conversation=id
MessagesPage->>useConversations: refresh conversations
else Cannot Message
NewMessageDialog->>User: show error alert
end
User->>NewMessageDialog: follow/unfollow user
NewMessageDialog->>connectionService: followUser(userId)
connectionService-->>NewMessageDialog: success
NewMessageDialog->>NewMessageDialog: refresh search results
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (16)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Authored by: @akshay0611
Summary by CodeRabbit