feat: Sprint 03 댓글 도메인(생성·조회·수정·삭제) 및 하이브리드 프리뷰 아키텍처 구현 - #17
Merged
Conversation
- 쿼리 최적화: 스칼라 서브쿼리 제거 배치 집계 및 CROSS JOIN LATERAL Top-5 적용 - 동시성 및 가시성: 루트 선행 락을 통한 데드락 방어 및 게시글 가시성 검증 일원화 - 계층 및 정책: Comment.rootParent() 최상위 탐색 루프 및 replyCount 기준 화면 일치화 - 유효성 검증: CommentCreateRequest 익명 비밀번호 길이(@SiZe 4~20자) 검증 및 테스트 - 프론트엔드: 댓글 등록 시 Append-on-Create 적용 및 가짜 멘션 UI 제거 - 테스트 환경: H2 제거 및 CI/로컬 환경 MySQL 8.0 전면 일원화
feat: 댓글 생성(2-Depth 평탄화, 100개 상한) 및 루트 Batch + 대댓글 분리 페이징 조회 구현
feat: 댓글 수정(PUT /api/v1/comments/{commentId}) 기능 및 테스트 추가feat: 댓글 삭제(Soft Delete)기능 개발 및 단위/통합 테스트 구현
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (26)
📒 Files selected for processing (38)
📝 WalkthroughWalkthroughThe change migrates local, test, CI, and container databases to MySQL. It adds cursor-paginated comment reads, bounded reply previews, comment updates, permission handling, locking, reply limits, scale-test utilities, and extensive integration coverage. ChangesComment domain and MySQL migration
Estimated code review effort: 4 (Complex) | ~60 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 개요 (Overview)
feature/sprint03-comment➔main🛠️ 주요 변경 사항 (What Changed)
아키텍처 의사결정 (ADR-001) 및 하이브리드 프리뷰 조회
totalCount)로replyCount,previewReplies,hasMoreReplies기준을 100% 통일하여 UI 인지 부조화 방지.GET /api/v1/comments/{commentId}/replies) 진입 시 상위 게시글의 삭제/차단 상태(validatePostVisibility)를 필수 검증.댓글 생성 (Create) 및 동시성 방어
rootParent()while loop를 통해 항상 최상위 조상 루트 엔티티를 찾아 2-Depth 계층을 보장.SELECT ... FOR UPDATE로 동시 대댓글 폭증 시 상한 초과(COMMENT_005)를 물리적으로 방어.CommentCommandService독립 Bean 트랜잭션에서 수행.@Size(min = 4, max = 20)로 입력 경계값 검증.댓글 수정 (Update) 및 동시성 제어
@Version):Comment엔티티에 버전 필드를 추가해 동시 수정 시 선착순 변경만 반영하고 충돌 시COMMENT_006반환.211.234.***.***)를 응답하고, 일반 회원은null로 차단하여 네트워크 정보 과다 노출 방지.댓글 삭제 (Delete) 및 4대 권한 매트릭스
is_deleted = true처리 및"삭제된 댓글입니다."placeholder로 대체 노출하여 하위 대댓글의 대화 맥락 보존.ROLE_ADMIN): 비밀번호 없이 강제 삭제 허용.프론트엔드 UI/UX 완성 (
page.tsx)prompt,confirm제거 및 헤더 시각 옆 미니✕버튼과 인라인 플로팅 팝오버 위젯(CommentDeleteInline) 구현.CommentEditForm): 본문 불변 수정 및 익명 비밀번호 검증.toggleReplyEditor)로 단순화.🧪 테스트 및 검증 결과 (Verification & QA)
.\gradlew.bat test실행 결과BUILD SUCCESSFUL(130+ 개 테스트 전수 통과, 0 failure).npm run build실행 결과 Next.js 16.2.12 Turbopack 100% SUCCESS (TypeScript 컴파일 0 error, 10개 라우트 정상 생성)..\gradlew.bat spotlessApply서식 검증 완료.✅ PR 체크리스트 (Checklist)
Summary by CodeRabbit
New Features
Bug Fixes
Documentation