feat(chatroom): ChatRoom 페이지 배포설정 변경#51
Conversation
- Chatroom.jsx 코드 수정
feat(chatroom): ChatRoom 페이지 배포설정 코드 변경
|
Caution Review failedThe pull request is closed. WalkthroughReplaces the Chatroom page with an authenticated, real-time SockJS/STOMP chat architecture, adds axios with auth interceptors, implements data loading (user, scoreboard, roster, read-state, history, search), introduces formation and alerts UI, infinite scroll, read-receipt updates, IME-aware input handling, and cleans up connections on unmount. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant Chat as Chatroom.jsx
participant API as REST API
participant STOMP as SockJS/STOMP Broker
U->>Chat: Navigate to /chat/:roomId
Chat->>API: GET /me
Chat->>API: GET /scoreboard
Chat->>API: GET /chat-rooms/:roomId/messages?latest
Chat->>STOMP: Connect (SockJS, STOMP)
STOMP-->>Chat: onConnect
par User selects participant
Chat->>API: GET /roster?participant=...
and Read-state init
Chat->>API: GET /chat-rooms/:roomId/read-state
end
STOMP-->>Chat: MESSAGE /topic/chat/:roomId
Chat->>Chat: formatMessage, append
Chat->>API: PUT /read-state (debounced) [if near bottom]
U->>Chat: Scroll up (load more)
Chat->>API: GET /chat-rooms/:roomId/messages?before=...
Chat->>Chat: Prepend, preserve scroll
sequenceDiagram
autonumber
participant U as User
participant Chat as Chatroom.jsx
participant API as REST API
participant STOMP as SockJS/STOMP Broker
U->>Chat: Type message (IME aware)
alt Enter & not composing
Chat->>API: POST /chat-rooms/:roomId/messages
API-->>Chat: 200 Created
else Shift+Enter or composing
Chat->>Chat: Insert newline / continue composing
end
Note right of STOMP: Alerts/System
STOMP-->>Chat: ALERT/SYSTEM
Chat->>API: GET /scoreboard (refresh)
Chat->>Chat: Push to recentAlerts (max 3)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit
New Features
Refactor