Conversation
|
Caution Review failedThe pull request is closed. Walkthrough채팅 다이얼로그 닫기/방 전환 시 숫자 roomId를 전달해 소켓 스토어의 leavedRoom으로 기록하도록 변경. useLeaveChatRoom 훅으로 방 떠나기 발행과 정리 실행. 토큰 획득은 커스텀 훅 제거 후 js-cookie에서 쿠키로 대체. 관련 스토어/타입/리스트 UI 정리. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Dialog as ChatDialog
participant Trigger as useChatDialogTrigger
participant Store as ChatWebSocketStore
participant Room as useLeaveChatRoom
participant WS as STOMP Broker
User->>Dialog: 닫기 (onOpenChange=false)
Dialog->>Trigger: closeChatDialog(roomId:number)
Trigger->>Store: setLeavedRoom(roomId)
note over Store: leavedRoom = roomId
Store-->>Room: leavedRoom 변경 감지
Room->>WS: SEND /chat/rooms/{leavedRoom}/left\nbody: "{leavedRoom}"
Room->>Room: clearMessages() (finally)
sequenceDiagram
autonumber
participant Hook as useConnectChatWebSocket
participant Cookies as js-cookie
participant WS as STOMP Client
Hook->>Cookies: get('accessToken')
Cookies-->>Hook: accessToken|string|undefined
Hook->>WS: connect(headers{Authorization: Bearer <token>})
WS-->>Hook: connected / error (기존 동일 흐름)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (10)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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 |
🔎 작업 사항
❗️ 전달 사항
e.g. ) npm i 하세요 ...
➕ 관련 이슈
Summary by CodeRabbit