Skip to content

release: 룩북 저장버튼(saveId) + 커스텀 태그 500 오류 수정 - #391

Merged
sangsong0734-creator merged 4 commits into
mainfrom
develop
Aug 20, 2026
Merged

release: 룩북 저장버튼(saveId) + 커스텀 태그 500 오류 수정#391
sangsong0734-creator merged 4 commits into
mainfrom
develop

Conversation

@sangsong0734-creator

Copy link
Copy Markdown
Contributor

포함된 변경

🤖 Generated with Claude Code

sangsong0734-creator and others added 4 commits August 20, 2026 16:23
상세로 안 들어가고도 피드/마이클로젯 목록의 룩북 썸네일에서 하트 옆에
저장 버튼을 붙일 수 있도록, LookbookItem(목록 조회 응답)에 saveId를
추가. null이면 저장 안 한 상태, 값이 있으면 그 값이 저장취소(기존
DELETE /api/v1/closet-saves/{saveId})에 쓰는 id — 상세 조회 응답의
saveId와 동일한 규칙.

ClosetSaveRepository에 배치 조회용 메서드 추가
(findAllByMemberIdAndTargetTypeAndTargetIdIn), LookbookService가
좋아요 여부(isLiked)와 같은 방식으로 목록 조회 시 한 번에 계산.

LookbookServiceTest에 저장된 항목/안 된 항목이 섞인 목록에서 saveId가
정확히 채워지는지 확인하는 테스트 추가.
feat: 룩북 목록 항목에 saveId 포함 — 썸네일에서 바로 저장/저장취소
AI 태그 분석 화면에서 매치율만 바꿔 동일한 커스텀 태그명으로 재확인하면
서버 내부 오류(500)가 발생하던 문제를 수정.

원인: AnalysisReport.confirmRecommendationInput()에서 customTags를
clear() 후 addAll()로 통째로 교체하고 있었는데, 이름이 안 바뀐 커스텀
태그까지 같은 flush 안에서 delete 후 insert가 일어나 (report_id,
normalized_name) 유니크 제약을 일시적으로 위반할 수 있었음
(Hibernate flush 순서가 delete-before-insert를 보장하지 않음).

수정: 바로 위 reportTags 처리와 동일한 패턴으로, 실제로 제거된 이름만
removeIf하고 새로 추가된 이름만 add하도록 변경 — 이름이 그대로인
커스텀 태그는 기존 엔티티를 유지해 delete+insert 자체가 발생하지 않음.

테스트:
- resubmittingSameCustomTagWithDifferentMatchPercentageSucceeds: 수정 전
  500으로 실패하던 재현 테스트, 수정 후 통과 확인
- rejectsCustomTagNameOverFiftyCharsWithValidationErrorNotServerError:
  50자 초과 커스텀 태그명이 여전히 400(COMMON400_2)으로 정상 거부되는지
  회귀 확인

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…int-violation

fix: 직접 태그 추가 재확인 시 발생하는 500 오류 수정
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fad2f5f5-52b1-4b47-8b22-a81984484725


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.

@sangsong0734-creator
sangsong0734-creator merged commit bae2a68 into main Aug 20, 2026
5 checks passed
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