Skip to content

Conversation

@stoneTiger0912
Copy link
Member

@stoneTiger0912 stoneTiger0912 commented Nov 21, 2025

📝 변경 내용


✅ 체크리스트

  • 코드가 정상적으로 동작함
  • 테스트 코드 통과함
  • 문서(README 등)를 최신화함
  • 코드 스타일 가이드 준수

💬 기타 참고 사항

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능
    • 사용자가 생성한 그룹을 조회하는 새 API 엔드포인트 추가(내가 만든 그룹 목록 조회 지원).
    • 카테고리 필터와 커서 기반 페이징을 지원해 대규모 목록 조회 시 효율성 및 응답 일관성 개선.

✏️ Tip: You can customize this high-level summary in your review settings.

✏️ Tip: You can customize this high-level summary in your review settings.

@stoneTiger0912 stoneTiger0912 self-assigned this Nov 21, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 21, 2025

Walkthrough

인증된 사용자가 생성한 그룹을 조회하는 새 API가 추가되었습니다. GET /v1/groups/created 엔드포인트가 GroupController에 추가되고, GroupService와 GroupRepository(Custom/Impl)에 대응 메서드들이 추가되어 생성자(Owner) 기준의 커서 기반 페이징 조회를 수행합니다.

Changes

Cohort / File(s) 변경 요약
컨트롤러 — 새로운 엔드포인트
src/main/java/project/flipnote/group/controller/GroupController.java
GET /v1/groups/created 엔드포인트 추가. 인증된 사용자 기준으로 생성한 그룹을 조회하여 CursorPagingResponse<GroupInfo> 반환.
서비스 — 생성자 기반 조회 로직
src/main/java/project/flipnote/group/service/GroupService.java
findCreatedGroup(AuthPrinciple, GroupListRequest) 메서드 추가. 요청 파라미터 변환 후 리포지토리 호출 및 커서 페이징 응답 구성.
리포지토리 인터페이스 확장
src/main/java/project/flipnote/group/repository/GroupRepositoryCustom.java
findAllByCursorAndCreatedUserId(Long cursorId, Category category, int size, Long id) 메서드 시그니처 추가.
리포지토리 구현 — 생성자 필터링 쿼리
src/main/java/project/flipnote/group/repository/GroupRepositoryImpl.java
findAllByCursorAndCreatedUserId(Long lastId, Category category, int pageSize, Long userId) 구현 추가. GroupMember 조인과 OWNER 역할 필터 적용, optional cursor/category 필터, imageRef 좌측 조인, 정렬 및 limit(pageSize + 1).

Sequence Diagram(s)

sequenceDiagram
    participant Client as Client
    participant Controller as GroupController
    participant Service as GroupService
    participant Repo as GroupRepositoryImpl
    participant DB as Database

    Client->>Controller: GET /v1/groups/created?(category,cursor,size)
    Controller->>Service: findCreatedGroup(authPrinciple, request)
    Service->>Service: category 변환 및 파라미터 준비
    Service->>Repo: findAllByCursorAndCreatedUserId(cursorId, category, size, userId)
    Repo->>DB: Query (join GroupMember where role = OWNER, optional cursor/category, left join imageRef)
    DB-->>Repo: List<GroupInfo>
    Repo-->>Service: List<GroupInfo>
    Service->>Service: CursorPagingResponse 생성 (pageSize + 1 처리)
    Service-->>Controller: CursorPagingResponse<GroupInfo>
    Controller-->>Client: 200 OK + Response
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • 변경 범위는 컨트롤러·서비스·리포지토리(인터페이스/구현)로 일관된 패턴의 추가이며 논리 밀도가 중간 수준입니다.
  • 추가 검토 포인트:
    • GroupRepositoryImpl의 쿼리: GroupMember 조인과 OWNER 역할 필터가 의도대로 동작하는지(조인 유형, 조건 위치).
    • 커서 페이징 일관성 (limit = pageSize + 1 취급, cursor 비교 연산자).
    • 인증된 사용자 ID 취득 및 권한 검증 경로의 적절성.

Suggested labels

enhancement

Suggested reviewers

  • dungbik

Poem

🐇 새 길이 났네, 그룹의 길,
내가 만든 둥지 하나하나,
커서 따라 흐르며 모여들고,
엔드포인트 빛나네, 키보드 위 달빛,
히힛, 토끼가 축하해요 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 풀 리퀘스트의 제목은 주요 변경사항을 명확하게 설명하며, 인증된 사용자가 생성한 그룹을 조회하는 새로운 기능을 추가하는 변경사항과 완전히 관련이 있습니다.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/get-created-group

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
src/main/java/project/flipnote/group/service/GroupService.java (1)

467-479: 코드 중복을 리팩토링하는 것을 권장합니다.

findCreatedGroup 메서드가 findMyGroup (439-450번 라인)과 거의 동일한 구조를 가지고 있습니다. 466번 라인의 "//리팩토링" 주석이 이를 인지하고 있음을 보여줍니다. 공통 로직을 추출하여 중복을 제거하는 것을 고려해보세요.

예를 들어, 다음과 같이 공통 메서드를 추출할 수 있습니다:

private CursorPagingResponse<GroupInfo> findGroupsWithFilter(
    AuthPrinciple authPrinciple, 
    GroupListRequest req,
    BiFunction<Long, Category, List<GroupInfo>> repositoryMethod) {
    
    UserProfile user = getUser(authPrinciple);
    Category category = convertCategory(req.getCategory());
    List<GroupInfo> groups = repositoryMethod.apply(category, req.getSize());
    return createGroupInfoCursorPagingResponse(req, groups);
}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb45c83 and a45d1f7.

📒 Files selected for processing (4)
  • src/main/java/project/flipnote/group/controller/GroupController.java (1 hunks)
  • src/main/java/project/flipnote/group/repository/GroupRepositoryCustom.java (1 hunks)
  • src/main/java/project/flipnote/group/repository/GroupRepositoryImpl.java (2 hunks)
  • src/main/java/project/flipnote/group/service/GroupService.java (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (3)
src/main/java/project/flipnote/group/controller/GroupController.java (1)

110-119: 새로운 엔드포인트 구현이 적절합니다.

내가 생성한 그룹 조회 엔드포인트가 기존 패턴을 잘 따르고 있으며, 인증 및 유효성 검증이 올바르게 적용되었습니다.

src/main/java/project/flipnote/group/repository/GroupRepositoryCustom.java (1)

15-15: 메서드 선언이 적절합니다.

새로운 메서드 시그니처가 기존 메서드들과 일관성 있게 정의되었습니다.

src/main/java/project/flipnote/group/repository/GroupRepositoryImpl.java (1)

103-129: 구현 로직이 올바릅니다.

OWNER 역할을 가진 사용자가 생성한 그룹만 필터링하는 로직이 정확하게 구현되었습니다. 기존 findAllByCursorAndUserId 메서드와의 차이점(모든 역할 vs OWNER만)이 명확하게 반영되어 있습니다.

Comment on lines +94 to +101
/**
* 그룹 테이블에 생성한 유저 추가?
* @param lastId
* @param category
* @param pageSize
* @param userId
* @return
*/
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Javadoc을 명확하게 작성하세요.

Javadoc 주석이 불명확합니다. "그룹 테이블에 생성한 유저 추가?"라는 질문 형태의 설명은 메서드의 목적을 명확히 전달하지 못합니다.

다음과 같이 수정하는 것을 권장합니다:

 /**
- * 그룹 테이블에 생성한 유저 추가?
+ * 특정 사용자가 생성한(OWNER 역할) 그룹 목록을 커서 기반 페이징으로 조회합니다.
+ * 
  * @param lastId 마지막으로 조회된 그룹 ID (커서)
  * @param category 필터링할 카테고리 (선택사항)
  * @param pageSize 페이지 크기
- * @param userId
- * @return
+ * @param userId 그룹을 생성한 사용자 ID
+ * @return 조회된 그룹 정보 리스트
  */
🤖 Prompt for AI Agents
In src/main/java/project/flipnote/group/repository/GroupRepositoryImpl.java
around lines 94 to 101, replace the ambiguous question-style Javadoc with a
clear method description and parameter/return details: state the method’s
purpose in one sentence (e.g., what it retrieves or modifies in the group
table), document each parameter (lastId, category, pageSize, userId) with
types/semantics and any nullable/optional behavior, describe the return value
and its contents (e.g., list of groups, paging token), and note any thrown
exceptions or side effects; keep it concise, use imperative form, and localize
language consistently (Korean or English) to match project conventions.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/main/java/project/flipnote/group/service/GroupService.java (1)

464-478: findCreatedGroup 구현이 기존 패턴과 잘 맞고, 기능적으로 문제 없어 보입니다

findMyGroup/findGroup과 동일한 플로우(유저 조회 → 카테고리 변환 → 커서 페이징 → 공통 응답 생성)를 그대로 따르고 있어서 서비스 레이어 일관성이 좋습니다. 새 레포지토리 메서드 호출부도 커서/카테고리/size/userId 인자 순서가 다른 메서드들과 정합적으로 보입니다.

다만, 아래 두 가지는 향후 리팩토링 후보로 한 번 고려해볼 만합니다.

  1. //리팩토링 주석은 의미가 모호해서, 아예 제거하거나 // 내가 생성한 그룹 목록 조회처럼 역할이 드러나게 바꾸면 가독성이 조금 좋아질 것 같습니다.
  2. findMyGroupfindCreatedGroup가 거의 동일한 구조라,
    • 공통 private 메서드로 추출하거나,
    • 혹은 validateUser(authPrinciple) + authPrinciple.userId() 조합을 쓰도록 통일해서 불필요한 UserProfile 조회를 줄이는 것도 선택지입니다.
      (지금 상태도 성능상 큰 문제는 없어 보이므로 필수는 아닙니다.)

전체적으로 이 메서드 추가만으로는 버그나 예외적인 동작은 보이지 않습니다.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a45d1f7 and c16d5b3.

📒 Files selected for processing (2)
  • src/main/java/project/flipnote/group/repository/GroupRepositoryCustom.java (1 hunks)
  • src/main/java/project/flipnote/group/service/GroupService.java (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/project/flipnote/group/repository/GroupRepositoryCustom.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build

@stoneTiger0912 stoneTiger0912 merged commit 4e23577 into develop Nov 27, 2025
3 checks passed
@stoneTiger0912 stoneTiger0912 deleted the feat/get-created-group branch November 27, 2025 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants