Skip to content

feat: 팀원 모집 채팅방 목록 조회 API 구현 - #2408

Merged
taejinn merged 1 commit into
developfrom
feat/2407-team-recruitment-chat-room-list
Sep 3, 2026
Merged

feat: 팀원 모집 채팅방 목록 조회 API 구현#2408
taejinn merged 1 commit into
developfrom
feat/2407-team-recruitment-chat-room-list

Conversation

@taejinn

@taejinn taejinn commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🔍 개요


🚀 주요 변경 내용

  • GET /chatroom/team-recruitment 엔드포인트와 Swagger 계약을 추가했습니다.
  • 현재 사용자가 멤버인 TEAM/DIRECT 방만 최근 메시지순으로 반환합니다.
  • 방 정보, DIRECT 상대방, 최근 메시지, 이미지 여부, 미읽음 메시지 수를 제공합니다.
  • 메시지가 없는 방과 READ_ONLY 방도 목록에 포함합니다.
  • 멤버십·상대방·최근 메시지·미읽음 수를 묶음 조회해 방별 반복 조회를 피했습니다.
  • 서비스 단위 테스트, 실제 HTTP 인수 테스트, OpenAPI/JSON 계약 테스트를 추가했습니다.

💬 참고 사항

  • DB 마이그레이션은 없습니다.
  • 기존 팀원 모집 개별 채팅방 및 메시지 API의 외부 경로는 그대로 유지됩니다.
  • 공개 Cloudflare API 명세 배포는 이 PR 범위에 포함하지 않았습니다.
  • 로컬 ./gradlew check --no-daemon --max-workers=1 통과: 1,144 tests / failures 0 / errors 0 / skipped 3.

✅ Checklist (완료 조건)

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

Summary by CodeRabbit

  • New Features

    • Added an endpoint to list a student’s team recruitment chat rooms.
    • Chat rooms now include room details, direct-chat counterpart information, latest message data, and unread message counts.
    • Rooms are ordered by recent activity, including rooms without messages and read-only rooms.
    • Updated chat room, message, and direct-chat endpoints to include the recruitment identifier.
  • Documentation

    • Improved API schema details for chat room timestamps and response fields.
  • Tests

    • Added coverage for chat room listing, ordering, unread counts, empty rooms, and API serialization.

@taejinn taejinn self-assigned this Sep 3, 2026
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: c81b77a3-812d-4351-b47d-fed1503ab13f

📥 Commits

Reviewing files that changed from the base of the PR and between 3175139 and ab73f15.

📒 Files selected for processing (10)
  • src/main/java/in/koreatech/koin/domain/team/recruitment/repository/TeamRecruitmentChatMemberRepository.java
  • src/main/java/in/koreatech/koin/domain/team/recruitment/repository/TeamRecruitmentChatMessageRepository.java
  • src/main/java/in/koreatech/koin/domain/teamrecruitment/controller/TeamRecruitmentChatApi.java
  • src/main/java/in/koreatech/koin/domain/teamrecruitment/controller/TeamRecruitmentChatController.java
  • src/main/java/in/koreatech/koin/domain/teamrecruitment/dto/TeamRecruitmentChatRoomListItemResponse.java
  • src/main/java/in/koreatech/koin/domain/teamrecruitment/service/TeamRecruitmentChatService.java
  • src/main/java/in/koreatech/koin/global/config/TeamRecruitmentOpenApiCustomizer.java
  • src/test/java/in/koreatech/koin/acceptance/domain/TeamRecruitmentChatApiTest.java
  • src/test/java/in/koreatech/koin/acceptance/domain/TeamRecruitmentOpenApiContractTest.java
  • src/test/java/in/koreatech/koin/unit/domain/teamrecruitment/service/TeamRecruitmentChatServiceTest.java

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Adds GET /chatroom/team-recruitment for a user's TEAM and DIRECT chat rooms. The response includes room metadata, counterpart details, latest-message data, unread counts, empty rooms, and READ_ONLY rooms. Existing chat routes now include recruitmentId.

Changes

Team recruitment chat list

Layer / File(s) Summary
Chat membership and message queries
src/main/java/in/koreatech/koin/domain/team/recruitment/repository/*
Adds bulk queries for user memberships, room users, latest messages, and unread message counts.
Chat room response and aggregation
src/main/java/in/koreatech/koin/domain/teamrecruitment/dto/TeamRecruitmentChatRoomListItemResponse.java, src/main/java/in/koreatech/koin/domain/teamrecruitment/service/TeamRecruitmentChatService.java, src/main/java/in/koreatech/koin/global/config/TeamRecruitmentOpenApiCustomizer.java
Defines the snake_case response and maps room, counterpart, latest-message, and unread-count data. Rooms are sorted by latest activity and chat room ID.
Chat list endpoint and route updates
src/main/java/in/koreatech/koin/domain/teamrecruitment/controller/TeamRecruitmentChatApi.java, src/main/java/in/koreatech/koin/domain/teamrecruitment/controller/TeamRecruitmentChatController.java
Adds the authenticated list endpoint and includes recruitmentId in existing chat routes.
Chat list behavior and contract tests
src/test/java/in/koreatech/koin/acceptance/domain/TeamRecruitmentChatApiTest.java, src/test/java/in/koreatech/koin/acceptance/domain/TeamRecruitmentOpenApiContractTest.java, src/test/java/in/koreatech/koin/unit/domain/teamrecruitment/service/TeamRecruitmentChatServiceTest.java
Validates room types, ordering, unread counts, empty rooms, access control, null serialization, and the OpenAPI schema.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to ab73f

The new chat-room list endpoint preserves existing routes and returns only the authenticated member’s rooms with the expected metadata. The change is ready to merge.

Sequence Diagram(s)

sequenceDiagram
  participant Student
  participant TeamRecruitmentChatController
  participant TeamRecruitmentChatService
  participant TeamRecruitmentChatMemberRepository
  participant TeamRecruitmentChatMessageRepository
  Student->>TeamRecruitmentChatController: GET /chatroom/team-recruitment
  TeamRecruitmentChatController->>TeamRecruitmentChatService: getChatRooms(userId)
  TeamRecruitmentChatService->>TeamRecruitmentChatMemberRepository: load memberships and room users
  TeamRecruitmentChatService->>TeamRecruitmentChatMessageRepository: load latest messages and unread counts
  TeamRecruitmentChatService-->>TeamRecruitmentChatController: return chat room list
  TeamRecruitmentChatController-->>Student: return list response
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 36 functions across 10 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 주요 변경 사항인 팀원 모집 채팅방 목록 조회 API 구현을 정확하고 간결하게 설명합니다.
Linked Issues check ✅ Passed PR은 #2407의 GET /chatroom/team-recruitment API, TEAM/DIRECT 채팅방 조회, 정렬, 최근 메시지, 상대방 정보, 미읽음 수, 빈 방과 READ_ONLY 방 지원 요구를 구현합니다. Swagger·JSON 계약과 테스트도 추가했습니다.
Out of Scope Changes check ✅ Passed 변경 사항은 링크된 이슈의 API 구현, 조회 최적화, 계약 설정 및 관련 테스트 범위에 포함됩니다. DB 마이그레이션이나 무관한 기능 변경은 확인되지 않습니다.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/2407-team-recruitment-chat-room-list

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.

@github-actions github-actions Bot added 공통 백엔드 공통으로 작업할 이슈입니다. 기능 새로운 기능을 개발합니다. labels Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Unit Test Results

1 144 tests   1 141 ✔️  3m 13s ⏱️
   258 suites         3 💤
   258 files           0

Results for commit ab73f15.

@taejinn
taejinn requested a review from insik03 September 3, 2026 04:23
@taejinn
taejinn marked this pull request as ready for review September 3, 2026 04:28
@taejinn
taejinn merged commit fda3ad8 into develop Sep 3, 2026
9 checks passed
@taejinn
taejinn deleted the feat/2407-team-recruitment-chat-room-list branch September 3, 2026 04:32
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.

[공통] 팀원 모집 전체 채팅방 목록 조회 API 구현

2 participants