-
Notifications
You must be signed in to change notification settings - Fork 3
[Fix][jjaeroong]: 사용자 한줄소개 채소 이름에서 새싹으로 변경 #445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughUserCommandServiceImpl.saveNickname 변경: 사용자 소개 문자열의 접미사가 역할 기반 동적 값에서 고정 문자열 "새싹입니다."로 대체됨. 저장/임시 사용자 삭제/토큰 발급 흐름과 기타 빌더 필드는 변경 없음. 공개 시그니처 변화 없음. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this 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 (3)
src/main/java/stackpot/stackpot/user/service/UserCommandServiceImpl.java (3)
268-279: Enum Role 직접 노출 및 null 케이스 대비: 한줄소개 생성 로직을 helper로 캡슐화 권장현재
tempUser.getRole()(Enum)이 직접 문자열로 합쳐져 사용자에게DEVELOPER등 내부 식별자가 노출될 수 있고, 흐름에 따라 role이 아직 미설정(null)인 상태에서 저장을 시도할 가능성도 있습니다. 한줄소개 문자열 생성을 전용 메서드로 캡슐화하여 사용자 친화적인 라벨과 null-safe 처리를 권장합니다.아래처럼 빌더 라인만 교체하면 나머지는 보완 메서드로 흡수 가능합니다.
- .userIntroduction(tempUser.getRole() + "에 관심있는 " + nickname + " " + "새싹입니다.") + .userIntroduction(buildUserIntroduction(tempUser.getRole(), nickname))클래스 내부에 다음 보조 메서드를 추가해 주세요(역할 라벨 맵핑은 제품 용어집에 맞게 보강).
// 클래스 내부에 추가 private String buildUserIntroduction(Role role, String nickname) { final String roleLabel = role != null ? toDisplayKo(role) : "역할 미지정"; return String.format("%s에 관심있는 %s 새싹입니다.", roleLabel, nickname); } private String toDisplayKo(Role role) { // TODO: Role 전 케이스 반영 switch (role) { case DEVELOPER: return "개발자"; case DESIGNER: return "디자이너"; case PM: return "기획자"; default: return role.name(); // 임시 폴백 } }
290-293: 주석-구현 불일치(사소): trimNickname에서 공백 처리 설명 수정 권장주석은 “앞뒤 공백 유지”라고 되어 있지만 실제로
trim()으로 공백을 제거합니다. 주석만 현실에 맞게 정정하면 혼선을 줄일 수 있습니다.- // 앞뒤 공백 유지 + // 앞뒤 공백 제거
256-257: FE·BE 계약 명세: “새싹” 접미사 제거 처리
saveNickname()에서는 내부의trimNickname()이" 새싹"(또는"새싹"단독) 접미사를 제거하므로,
- FE가
createNickname()으로 전달된<수식어> 새싹을 그대로 보내도,- FE가
<수식어>만 보내도,
저장되는 값은 항상<수식어>로 일관됩니다.따라서 현재 구현상 추가 수정은 불필요하며, 아래 사항을 참고해 API 명세서에 해당 동작을 명확히 기재해주세요.
trimNickname()구현
- 공백 포함
" 새싹"및"새싹"단독 제거- 기타 채소(
버섯, 양파, 브로콜리, 당근)도 동일 처리- FE·BE 양방향 호출 시 저장 결과 일관성 보장
- API 문서(또는 Swagger 스펙)에 “닉네임 저장 시 접미사 ‘새싹’을 자동 제거” 동작 명시
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/main/java/stackpot/stackpot/user/service/UserCommandServiceImpl.java(1 hunks)
🔇 Additional comments (2)
src/main/java/stackpot/stackpot/user/service/UserCommandServiceImpl.java (2)
273-273: PR 의도 충족: 한줄소개 접미사를 ‘새싹입니다.’로 고정제목/요구사항과 정확히 일치하는 변경입니다. 한줄소개에서 채소명 대신 ‘새싹’으로 고정하는 목적을 잘 반영했습니다.
484-491: 정책 일관성 확인: 알림 메일에는 여전히 채소명이 노출됩니다이메일 알림 제목/본문 구성에서
Role.toVegetable(...)로 채소명이 계속 노출됩니다. 이번 PR 범위가 “사용자 한줄소개”만이라면 그대로 유지해도 됩니다. 다만 제품 정책이 “대외 노출 전반에서 채소명을 ‘새싹’ 컨셉으로 통일”이라면 이 구문도 동일한 규칙(예: 역할 라벨 + ‘새싹’)으로 정리해야 합니다. 범위 확인 부탁드립니다.
PR 타입(하나 이상의 PR 타입을 선택해주세요)
반영 브랜치
ex) feat/login -> dev
작업 내용
ex) 로그인 시, 구글 소셜 로그인 기능을 추가했습니다.
테스트 결과
ex) 베이스 브랜치에 포함되기 위한 코드는 모두 정상적으로 동작해야 합니다. 결과물에 대한 스크린샷, GIF, 혹은 라이브
Summary by CodeRabbit