Skip to content

Comments

[Onboarding][Feat] 온보딩 CRUD 구현#196

Merged
AlphaBs merged 19 commits intodevfrom
feat/onboarding
Dec 1, 2025
Merged

[Onboarding][Feat] 온보딩 CRUD 구현#196
AlphaBs merged 19 commits intodevfrom
feat/onboarding

Conversation

@AlphaBs
Copy link
Member

@AlphaBs AlphaBs commented Nov 30, 2025

History

#163

🚀 Major Changes & Explanations

  • 온보딩 카테고리 CRUD
  • 온보딩 키워드 CRUD
  • 멤머별 카테고리 한개, 키워드 목록, 인생책, 인생작가 설정

📷 Test Image

image

💡 TODO

  • 테스트

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @AlphaBs, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 사용자 온보딩 프로세스를 위한 핵심 기능을 도입합니다. 온보딩 카테고리와 키워드를 관리하고, 각 회원이 선택한 온보딩 선호도(카테고리, 키워드, 인생책, 인생작가)를 저장하고 조회할 수 있도록 합니다. 이는 사용자에게 맞춤형 초기 설정 경험을 제공하기 위한 기반을 마련합니다.

Highlights

  • 온보딩 카테고리 CRUD: 온보딩 카테고리를 생성, 조회, 업데이트, 삭제할 수 있는 CRUD 기능이 구현되었습니다.
  • 온보딩 키워드 CRUD: 각 카테고리에 속하는 온보딩 키워드를 생성, 조회, 업데이트, 삭제할 수 있는 CRUD 기능이 구현되었습니다.
  • 회원별 온보딩 정보 관리: 회원별로 하나의 온보딩 카테고리, 키워드 목록, 인생책, 인생작가 정보를 설정하고 조회할 수 있는 기능이 추가되었습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 온보딩 기능을 구현하기 위한 카테고리, 키워드, 그리고 멤버별 온보딩 정보 CRUD를 추가하고 있습니다. 전반적으로 API, 서비스, 데이터 접근 계층으로 코드가 잘 구조화되어 있으며, DTO에 record를, 엔티티에 빌더 패턴을 사용한 점이 좋습니다. 다만, API 엔드포인트 경로 컨벤션, 에러 처리, 그리고 서비스 로직의 효율성 측면에서 몇 가지 개선점을 발견했습니다. 자세한 내용은 아래의 개별 코멘트를 참고해 주시기 바랍니다.

@github-actions
Copy link

github-actions bot commented Nov 30, 2025

Test Results

 98 files   98 suites   17s ⏱️
523 tests 522 ✅ 0 💤 1 ❌
533 runs  532 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 777ad29.

♻️ This comment has been updated with latest results.

@AlphaBs
Copy link
Member Author

AlphaBs commented Nov 30, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 온보딩 기능에 대한 CRUD를 구현합니다. 전반적으로 새로운 엔티티, DTO, 리포지토리, 서비스 및 API가 잘 구조화되어 있습니다. 몇 가지 개선점을 제안합니다. ErrorCode에 중복된 코드가 있어 수정이 필요하며, OnboardingService에서 발생할 수 있는 NullPointerException을 방지해야 합니다. 또한, 테스트 Fixture 코드의 일관성과 명확성을 높이고, 서비스 레이어의 잠재적인 성능 문제를 개선할 수 있는 부분을 지적했습니다.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 사용자를 위한 온보딩 기능의 CRUD를 구현합니다. 전반적으로 새로운 기능의 구조가 잘 잡혀있지만, 몇 가지 중요한 개선점이 필요해 보입니다. 특히 중복된 에러 코드, API 보안, 잠재적인 NullPointerException 등 수정이 필요한 부분들이 있습니다. 또한 코드 일관성 및 가독성을 높이기 위한 몇 가지 제안도 포함했습니다. 아래의 상세 리뷰를 확인해주세요.

@AlphaBs
Copy link
Member Author

AlphaBs commented Dec 1, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

온보딩 기능 구현을 위한 CRUD API 및 관련 로직 추가 잘 보았습니다. 전반적으로 기능 구현이 잘 이루어졌지만, 몇 가지 중요한 수정 사항과 개선점을 발견했습니다. 가장 중요한 것은 멤버의 온보딩 정보를 조회할 때 잘못된 ID를 사용하여 키워드를 가져오는 심각한 버그입니다. 이로 인해 기능이 오작동할 수 있으므로 반드시 수정이 필요합니다. 또한, 잠재적인 NullPointerException을 방지하기 위한 유효성 검사 강화가 필요하며, 코드 가독성과 유지보수성을 높이기 위한 몇 가지 리팩토링을 제안합니다. 테스트 코드에서도 잘못된 ID를 사용하는 부분이 있어 함께 수정이 필요합니다.

return ResponseForm.ok();
}

@Operation(summary = "디버깅용, 로그인된 멤버가 온보딩때 입력한 정보 확인하기")
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

@Operationsummary가 "디버깅용"으로 되어 있습니다. 이 API가 실제 사용자 기능으로 제공된다면, "로그인된 멤버의 온보딩 정보 조회"와 같이 명확한 설명으로 변경하는 것이 API 문서를 이해하는 데 도움이 됩니다.

Suggested change
@Operation(summary = "디버깅용, 로그인된 멤버가 온보딩때 입력한 정보 확인하기")
@Operation(summary = "로그인된 멤버의 온보딩 정보 조회")

@AlphaBs
Copy link
Member Author

AlphaBs commented Dec 1, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

온보딩 기능에 대한 CRUD 구현을 추가하는 PR이네요. 전반적으로 엔티티, 리포지토리, 서비스, API 계층이 잘 구조화되어 있고 테스트 코드도 충실하게 작성되었습니다. 몇 가지 성능 개선점과 코드 정리 관련 제안을 리뷰 코멘트로 남겼습니다. 특히 getMemberPreferences API에서 발생할 수 있는 N+1 쿼리 문제를 해결하면 더 좋은 코드가 될 것 같습니다. 수정 후에는 관련 테스트가 여전히 통과하는지 확인해주세요.

@AlphaBs
Copy link
Member Author

AlphaBs commented Dec 1, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

온보딩 기능 구현을 위한 전반적인 CRUD 로직과 API, 테스트 코드 추가 잘 보았습니다. 전체적으로 구조가 잘 잡혀있고, 특히 서비스 로직에서 N+1 문제를 방지하기 위한 fetch join 사용과 테스트 코드의 상세한 케이스 분리가 인상적입니다. 다만, 에러 코드 중복이라는 심각한 문제가 발견되었고, 서비스 로직의 안정성을 높이기 위한 개선점을 제안드렸습니다. 해당 내용들을 반영하시면 더 완성도 높은 코드가 될 것 같습니다.

Comment on lines 130 to 132
List<Long> keywordIds = keywordDTOs.stream()
.map(OnboardingKeywordDto::id)
.toList();
Copy link
Contributor

Choose a reason for hiding this comment

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

high

updateMemberKeywords 메소드에서 keywordDTOs 리스트를 처리할 때 몇 가지 잠재적인 문제가 있습니다.

  1. 리스트에 null 요소가 포함된 경우 map(OnboardingKeywordDto::id) 호출 시 NullPointerException이 발생할 수 있습니다.
  2. OnboardingKeywordDtoidnull인 경우 findAllById에서 예외가 발생할 수 있습니다.
  3. 클라이언트가 중복된 키워드 ID를 보내는 경우, onboardingKeywords.size() != keywordIds.size() 검사 로직이 의도치 않게 예외를 발생시킬 수 있습니다.

이러한 문제를 해결하기 위해 스트림 처리 시 null 값을 필터링하고 distinct()를 사용하여 중복을 제거하는 것이 좋습니다. 이렇게 하면 코드가 더 안정적이고 예측 가능하게 동작합니다.

            List<Long> keywordIds = keywordDTOs.stream()
                .filter(java.util.Objects::nonNull)
                .map(OnboardingKeywordDto::id)
                .filter(java.util.Objects::nonNull)
                .distinct()
                .toList();

AlphaBs and others added 3 commits December 1, 2025 20:20
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@AlphaBs
Copy link
Member Author

AlphaBs commented Dec 1, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 사용자의 온보딩 경험을 위한 CRUD 기능을 구현합니다. 새로운 엔티티, DTO, 리포지토리, 서비스, API 컨트롤러를 추가하여 온보딩 플로우를 완성했습니다. 전반적으로 코드 구조가 잘 잡혀있고, 특히 서비스 레이어의 로직이 견고하며 테스트 커버리지도 훌륭합니다. 몇 가지 개선점을 제안했습니다. API 문서의 명확성을 높이고, 사용자 정의 리포지토리 구현을 Spring Data JPA의 내장 기능을 활용하여 단순화하는 것을 고려해볼 수 있습니다.

@AlphaBs
Copy link
Member Author

AlphaBs commented Dec 1, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

온보딩 카테고리 및 키워드 CRUD와 멤버별 온보딩 결과 저장 기능을 구현한 PR입니다. API, 서비스, 리포지토리 계층이 잘 분리되어 구조가 명확하며, 기능에 대한 통합 테스트가 충실하게 작성되었습니다. 전반적으로 잘 작성된 코드이지만, API 경로의 일관성을 개선하고, 입력값 검증을 강화하며, 벌크 연산 후 데이터 정합성을 보장하기 위한 몇 가지 개선 사항을 제안합니다.

AlphaBs and others added 2 commits December 1, 2025 21:49
…KeywordRepository.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@AlphaBs AlphaBs merged commit ce4c6ba into dev Dec 1, 2025
0 of 2 checks passed
@AlphaBs AlphaBs deleted the feat/onboarding branch December 1, 2025 13:14
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.

2 participants