Skip to content

Conversation

@nayonsoso
Copy link
Collaborator

@nayonsoso nayonsoso commented Jul 31, 2025

관련 이슈

  • related: 419

작업 내용

멘토의 마이페이지 응답 GET api가 범용적으로 사용되도록, '합격 팁'을 포함하여 응답하게 합니다.

AS-IS

  • 멘토의 마이페이지 미리보기 화면에서는 '합격 팁'이 존재하지 않아 내려주지 않았습니다.

TO-BE

  • 멘토가 마이페이지를 수정할 때 보여주는 '마이페이지 상세 조회'에는 합격 팁이 존재합니다.
  • 이들 api를 하나로 통일하기 위해 '마이페이지' GET 의 응답이 '합격 팁'을 추가합니다.

멘토/멘티 api 변경 회의에서 이야기 나온 🔽 부분을 적용했다 생각하시면 됩니다.
image

특이 사항

"페이지네이션이 중복 설정된 것" 을 삭제하는 것까지
이번 PR에서 포함해봅니다 🐒

- '멘토의 마이페이지 조회' api를 미리보기와 상세 보기에 모두 사용하게 한다.
- 이를 위해, 마이페이지 응답이 전체 정보를 내려주도록 한다.
@nayonsoso nayonsoso self-assigned this Jul 31, 2025
@nayonsoso nayonsoso changed the title refactor: 멘토의 마이페이지 응답이 '합격 팁' 추가 refactor: 멘토의 마이페이지 응답에 '합격 팁' 추가 Jul 31, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jul 31, 2025

Walkthrough

  1. MentorController 정렬 방식 변경

    • 기존에 @PageableDefault에서 정렬 기준을 지정하던 방식을 제거하고, @SortDefaults와 두 개의 @SortDefault를 사용하여 정렬 기준을 명확하게 분리하였습니다.
    • 이제 멘토 목록은 menteeCount 내림차순, 그 다음 id 오름차순으로 정렬됩니다.
  2. MentorMyPageResponse 필드 추가 및 팩토리 메서드 수정

    • MentorMyPageResponse 레코드에 새로운 필드 passTip(String 타입)이 추가되었습니다.
    • 정적 팩토리 메서드 of도 변경되어, Mentor 객체에서 passTip 값을 받아와 응답 객체에 포함시키도록 수정되었습니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • wibaek
  • lsy1307
  • Gyuhyeok99

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 69a0bc9 and 1177cea.

📒 Files selected for processing (2)
  • src/main/java/com/example/solidconnection/mentor/controller/MentorController.java (1 hunks)
  • src/main/java/com/example/solidconnection/mentor/dto/MentorMyPageResponse.java (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: nayonsoso
PR: solid-connection/solid-connect-server#375
File: src/main/java/com/example/solidconnection/mentor/service/MentorMyPageService.java:47-53
Timestamp: 2025-07-05T17:54:42.475Z
Learning: MentorMyPageService에서 PUT 메서드 구현 시 전체 채널을 새로 생성하여 교체하는 방식을 사용하는 것이 PUT의 의미론적 특성과 일치하며, 트랜잭션 로킹 관점에서도 합리적인 접근이다.
Learnt from: whqtker
PR: solid-connection/solid-connect-server#362
File: src/main/java/com/example/solidconnection/mentor/service/MentoringQueryService.java:0-0
Timestamp: 2025-07-04T10:41:32.999Z
Learning: 멘토링 관련 기능에는 페이지네이션을 적용하지 않는 것이 해당 프로젝트의 설계 방침이다.
🔇 Additional comments (3)
src/main/java/com/example/solidconnection/mentor/dto/MentorMyPageResponse.java (1)

18-18: 1. 합격 팁 필드 추가가 적절하게 구현되었습니다!

• `passTip` 필드가 DTO 레코드에 올바르게 추가되었습니다
• 정적 팩토리 메서드에서도 `mentor.getPassTip()` 호출이 적절히 포함되었습니다
• PR 목표인 "멘토 마이페이지 응답에 합격 팁 추가"가 정확히 구현되었습니다

Also applies to: 33-33

src/main/java/com/example/solidconnection/mentor/controller/MentorController.java (2)

42-47: 2. 정렬 설정 리팩토링이 코드 명확성을 개선했습니다

• `@PageableDefault`에서 중복된 정렬 설정을 제거하고 `@SortDefaults`로 분리한 것이 좋습니다
• `menteeCount` 내림차순, `id` 오름차순 정렬 로직이 멘토 목록 표시에 적합합니다
• 코드 가독성과 유지보수성이 향상되었습니다

42-47: AI 요약과 PR 목표 간 불일치 확인이 필요합니다

AI 요약에서는 이 변경사항이 주요 내용으로 언급되었지만, PR 목표는 "합격 팁 추가"입니다. 이 정렬 설정 변경이 주요 기능과 어떤 관련이 있는지 또는 단순한 코드 정리인지 명확하지 않습니다.

Likely an incorrect or invalid review comment.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@nayonsoso nayonsoso merged commit 51ae689 into solid-connection:develop Aug 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants