Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthrough채팅 realtime 구독이 callback 변경만으로 재생성되지 않도록 수정했다. 최신 callback은 ref로 전달한다. 채팅·사용자 구독 lifecycle을 분리하고 room, token, 사용자, 활성화 상태 및 unmount별 정리 동작을 테스트했다. Changes채팅 구독 안정화
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant useRoomChatRealtime
participant STOMPBroker
participant ChatCallback
participant UserEventCallback
useRoomChatRealtime->>STOMPBroker: 채팅 destination 구독
STOMPBroker->>ChatCallback: 메시지·삭제 이벤트 전달
ChatCallback->>useRoomChatRealtime: 최신 callback ref 호출
useRoomChatRealtime->>STOMPBroker: 사용자 destination 구독
STOMPBroker->>UserEventCallback: 사용자 room 이벤트 전달
UserEventCallback->>useRoomChatRealtime: 최신 handler ref 호출
useRoomChatRealtime->>STOMPBroker: 구독 식별자 변경 시 unsubscribe·resubscribe
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
aryu1217
marked this pull request as ready for review
August 23, 2026 00:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경 사항
원인
useRoomChat이 렌더마다 새 삭제 callback을 만들었고, 이 함수 identity가 message handler와 subscription effect dependency까지 전파됐습니다. 채팅 수신으로 상태가 갱신될 때 React effect cleanup이 같은 topic을 먼저UNSUBSCRIBE한 뒤 다시SUBSCRIBE하여 짧은 미구독 구간을 만들 수 있었습니다.사용자 영향
검증
npm run test -- src/features/room/chat/hooks/useRoomChatRealtime.test.tsx src/features/room/chat/hooks/useRoomChatHistory.test.tsx src/features/room/page/ui/RoomPlaybackScreen.test.tsx— 3 files / 23 tests passednpm run lint— passednpm run test— 149 files / 589 tests passednpm run build— passedgit diff --check— passed잔여 확인
운영 broker에서
UNSUBSCRIBE → SUBSCRIBE반복이 사라졌는지와 누락 메시지 시각의 상관관계는 실제 세션 frame 관찰이 필요합니다. 실제 WebSocket transport close는 이번 동일 연결 내 subscription churn과 별도 경로입니다.Summary by CodeRabbit
개선 사항
테스트 및 문서