Skip to content

fix: 팀명 수정 시 앞뒤 공백 제거 누락 수정#61

Closed
LeeJeongHeon02 wants to merge 2 commits into
devfrom
fix/team-rename-trim-whitespace
Closed

fix: 팀명 수정 시 앞뒤 공백 제거 누락 수정#61
LeeJeongHeon02 wants to merge 2 commits into
devfrom
fix/team-rename-trim-whitespace

Conversation

@LeeJeongHeon02

@LeeJeongHeon02 LeeJeongHeon02 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • PR [Feat] 팀명 수정 API 추가 #60("팀명 수정 API 추가")에서 이 수정 커밋(80abebc)을 두 번째 커밋으로 푸시했는데,
    PR이 이미 첫 번째 커밋만으로 스쿼시 머지되어 dev에는 반영되지 않은 채 남아있었다.
    로컬 서버로 실제 API를 호출하며 QA하던 중 발견한 회귀 버그가 dev(및 배포됐다면 운영)에
    그대로 살아있던 것 — 이번 PR로 정정한다.
  • TeamMemberManagementService.renameTeam()Texts.trim() 없이 teamName을 그대로
    저장하고 있었다. 팀 생성(TeamCreateCommand)은 이미 같은 유틸로 trim하는데 rename만
    빠뜨렸던 것 — " 이름 "처럼 앞뒤 공백이 있는 값을 그대로 저장하던 버그를 고쳤다.

Test plan

  • renameTeam_trimsEdgeWhitespace 회귀 테스트 추가
  • 전체 테스트 스위트 통과 (299개, 0 실패)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 버그 수정

    • 팀 이름 변경 시 앞뒤 공백이 자동으로 제거되어 저장됩니다.
  • 테스트

    • 팀 이름에 앞뒤 공백이 포함된 경우에도 올바르게 처리되는 검증을 추가했습니다.

로컬 서버를 띄워 PATCH /api/v1/teams/{teamId}를 실제로 호출하며 QA하다가 발견 -
"  이름  " 처럼 앞뒤에 공백이 있는 teamName을 그대로 저장하고 있었다.
팀 생성 API(TeamCreateCommand)는 이미 Texts.trim()으로 teamName을 정리하는데
이번에 추가한 renameTeam()만 빠뜨렸다. 같은 유틸을 적용해 동작을 맞췄다.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@LeeJeongHeon02, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 39 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 08e02737-e501-4782-97e0-ed8a0b7c2281

📥 Commits

Reviewing files that changed from the base of the PR and between 2dff3b8 and 0e67e14.

📒 Files selected for processing (1)
  • src/test/java/com/shinhan/klljs/domain/team/service/TeamMemberManagementServiceTest.java
📝 Walkthrough

Walkthrough

팀명 변경 시 입력 문자열의 양 끝 공백을 제거하도록 서비스 로직을 변경하고, 트리밍된 팀명과 응답을 검증하는 테스트를 추가했습니다.

Changes

팀명 변경 입력 정규화

Layer / File(s) Summary
팀명 변경 트리밍 및 검증
src/main/java/com/shinhan/klljs/domain/team/service/TeamMemberManagementService.java, src/test/java/com/shinhan/klljs/domain/team/service/TeamMemberManagementServiceTest.java
renameTeamTexts.trim으로 입력 팀명의 양 끝 공백을 제거한 뒤 변경하며, 저장된 팀명과 반환값을 검증하는 테스트를 추가했습니다.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 팀명 수정 시 앞뒤 공백을 제거하지 않던 버그를 수정한다는 점이 변경 내용과 정확히 일치합니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/team-rename-trim-whitespace

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/test/java/com/shinhan/klljs/domain/team/service/TeamMemberManagementServiceTest.java`:
- Around line 125-135: Update renameTeam_trimsEdgeWhitespace to flush and clear
the persistence context after renaming, then reload the Team from the database
and assert the reloaded entity’s team name is trimmed. Keep the response
assertion and existing business-rule coverage unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 041421d2-cf8e-4b1e-a5b1-00c386c087c4

📥 Commits

Reviewing files that changed from the base of the PR and between af4d232 and 2dff3b8.

📒 Files selected for processing (2)
  • src/main/java/com/shinhan/klljs/domain/team/service/TeamMemberManagementService.java
  • src/test/java/com/shinhan/klljs/domain/team/service/TeamMemberManagementServiceTest.java

CodeRabbit 지적 - 기존 테스트는 flush 없이 영속성 컨텍스트에 남아있는 같은 Team
인스턴스를 검사해서, 실제로 DB에 반영됐는지가 아니라 메모리 상태만 확인하고
있었다. flush+clear 후 다시 조회하도록 고쳤다 - 같은 파일의
leaveTeam_allowsSoleOwnerToLeaveWithoutTransfer 테스트와 동일한 패턴이다.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@LeeJeongHeon02

Copy link
Copy Markdown
Contributor Author

PR #62에 합쳤습니다 (팀명 수정 공백 버그 수정 + 캠페인명 수정 API를 하나의 PR로 결합). 이 PR은 닫습니다.

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.

1 participant