Skip to content

refactor: 채팅방 생성 재사용 책임 분리#605

Merged
dh2906 merged 2 commits intodevelopfrom
refactor/chat-room-creation-service-598
Apr 28, 2026
Merged

refactor: 채팅방 생성 재사용 책임 분리#605
dh2906 merged 2 commits intodevelopfrom
refactor/chat-room-creation-service-598

Conversation

@dh2906
Copy link
Copy Markdown
Contributor

@dh2906 dh2906 commented Apr 28, 2026

🔍 개요


🚀 주요 변경 내용

  • ChatRoomCreationService를 추가해 일반 direct, SYSTEM_ADMIN 문의방, group room 생성 흐름을 담당하도록 이동
  • direct room 재오픈과 SYSTEM_ADMIN 문의방 멤버십 예외 정책을 새 서비스 내부에 보존
  • ChatService의 생성 API 메서드는 새 서비스로 위임하도록 축소

💬 참고 사항

  • checkstyleTest는 기존 테스트 파일의 120자 초과 위반 12건으로 실패합니다. 이번 변경 파일에서는 신규 위반이 없습니다.

✅ Checklist (완료 조건)

  • 코드 스타일 가이드 준수
  • 테스트 코드 포함됨
  • Reviewers / Assignees / Labels 지정 완료
  • 보안 및 민감 정보 검증 (API 키, 환경 변수, 개인정보 등)

- ChatService에 남아 있던 direct 생성/재사용, SYSTEM_ADMIN 문의방 재사용, group 생성 흐름을 ChatRoomCreationService로 이동
- direct 재오픈과 SYSTEM_ADMIN 멤버십 예외 정책을 생성 서비스 안에서 보존
- ChatService는 생성 요청을 위임하도록 줄여 메시지/목록/멤버 명령 책임과의 경계를 명확히 함
@dh2906 dh2906 added the 리팩토링 리팩터링을 위한 이슈입니다. label Apr 28, 2026
@dh2906 dh2906 self-assigned this Apr 28, 2026
@dh2906 dh2906 added the 리팩토링 리팩터링을 위한 이슈입니다. label Apr 28, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Warning

Rate limit exceeded

@dh2906 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 37 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a0c59604-80ee-468d-8b68-c354bce35029

📥 Commits

Reviewing files that changed from the base of the PR and between f663bc7 and 7e29fbe.

📒 Files selected for processing (4)
  • src/main/java/gg/agit/konect/domain/chat/service/ChatRoomCreationService.java
  • src/main/java/gg/agit/konect/domain/chat/service/ChatRoomMembershipService.java
  • src/main/java/gg/agit/konect/domain/chat/service/ChatService.java
  • src/test/java/gg/agit/konect/unit/domain/chat/service/ChatServiceTest.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/chat-room-creation-service-598

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

🧪 JaCoCo Coverage Report (Changed Files)

Summary

  • Overall Coverage: 87.1% ✅
  • Covered Lines: 506 / 581
  • Changed Files: 3

Coverage by File

Class Coverage Lines Status
ChatService
gg.agit.konect.domain.chat.service
83.5% 364/436
ChatRoomMembershipService
gg.agit.konect.domain.chat.service
96.9% 94/97
ChatRoomCreationService
gg.agit.konect.domain.chat.service
100.0% 48/48

📊 View Workflow Run

@dh2906 dh2906 requested a review from Copilot April 28, 2026 01:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

ChatService에 남아 있던 direct/문의방(SYSTEM_ADMIN)/group 채팅방 생성 및 재사용 책임을 ChatRoomCreationService로 분리해 생성 흐름을 단일 서비스로 모으는 리팩터링입니다.

Changes:

  • ChatRoomCreationService 신설: direct 생성/재사용, SYSTEM_ADMIN 문의방 재사용 정책, group 생성 로직 이동
  • ChatService의 채팅방 생성 관련 API 메서드들을 새 서비스로 위임하도록 축소
  • ChatServiceTest에서 새 서비스 주입 및 생성/재사용 관련 테스트 흐름 유지

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/main/java/gg/agit/konect/domain/chat/service/ChatService.java 채팅방 생성/재사용 로직을 ChatRoomCreationService로 위임하도록 정리
src/main/java/gg/agit/konect/domain/chat/service/ChatRoomCreationService.java 채팅방 생성/재사용 책임을 담당하는 신규 서비스 추가
src/test/java/gg/agit/konect/unit/domain/chat/service/ChatServiceTest.java ChatService 구성 변경에 맞춰 ChatRoomCreationService를 생성/주입하도록 수정

Comment thread src/main/java/gg/agit/konect/domain/chat/service/ChatRoomCreationService.java Outdated
- develop의 채팅 서비스 분리 변경을 병합해 생성 서비스 브랜치 충돌을 해소
- 채팅방 생성 경로의 멤버 보장 처리를 ChatRoomMembershipService로 위임해 중복키 처리와 lastReadAt 보정 정책을 한 곳에서 관리
- direct 방 재오픈과 SYSTEM_ADMIN 문의방 admin 멤버 제외 정책도 공통 멤버십 서비스에 모아 경로별 정책 불일치를 방지
@dh2906 dh2906 merged commit dba0ed5 into develop Apr 28, 2026
5 checks passed
@dh2906 dh2906 deleted the refactor/chat-room-creation-service-598 branch April 28, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

리팩토링 리팩터링을 위한 이슈입니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

채팅 리팩토링: 채팅방 생성 재사용 책임 분리

2 participants