Conversation
- Chatroom.jsx 파일의 채팅방이 제대로 구현되어 있는가?
This reverts commit 02fc53d.
[Feat] ChatRoom 페이지 채팅방을 구현 및 환경세팅
- Chatroom.jsx 파일의 채팅방이 제대로 구현되어 있는가?
|
Caution Review failedThe pull request is closed. WalkthroughAdds environment variables to deployment, new dependencies, routing for dynamic chat rooms, a configured Axios client, a major Chatroom feature rewrite with WebSocket/STOMP, search, read receipts, infinite scroll, formation/participants tabs, a Main page chat entry flow, CSS overhaul, and a Vite define change to use globalThis. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant Main as Main.jsx
participant API as axiosInstance (REST)
participant Router as Router
participant Chat as Chatroom.jsx
participant WS as STOMP/SockJS
U->>Main: Click "채팅방 입장"
Main->>API: GET /api/user/current-room (Authorization)
alt roomId exists
Main->>Router: navigate /chatroom/{roomId}
Router->>Chat: mount with roomId
else not in room
Main-->>U: Alert: no chatroom joined
end
Chat->>API: GET current user, scoreboard, initial messages, read state
Chat->>WS: STOMP connect to VITE_API_WS_URL
WS-->>Chat: connected
Chat->>WS: SUBSCRIBE /topic/chat/{roomId}
WS-->>Chat: MESSAGE (new chat/alert)
Chat->>Chat: format + append, update unread/read (debounced)
U->>Chat: Scroll up hits sentinel
Chat->>API: GET older messages (page)
API-->>Chat: Older messages
Chat->>Chat: Prepend, preserve scroll
sequenceDiagram
autonumber
participant U as User
participant Chat as Chatroom.jsx
participant WS as STOMP/SockJS
participant API as axiosInstance (REST)
U->>Chat: Type and press Enter
Chat->>WS: SEND /app/chat/{roomId}/send {text}
WS-->>Chat: (Echo via topic) MESSAGE
Chat->>Chat: Append, mark read if at bottom (debounced)
U->>Chat: Search query
Chat->>API: GET /api/chat/{roomId}/search?q=...
API-->>Chat: Results
Chat-->>U: Show filtered results
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
✨ 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
UI
Chores