feat: 2인 판결결과 UI 및 진술 탭 참여자 정보 개선 - #104
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- DisputePage: 판결/유형 서브탭(Tab 공통컴포넌트) 추가 - JudgmentResult: 이미지 기준 UI 재구성, nickname 적용 - JudgmentTypeResult: 유형탭 컴포넌트 신규 생성 (카드이미지, ActionPrompt) - Tab.module.scss: w60 h36 사이즈 조정 - DisputeParticipantDto: nickname 필드 추가 - disputes/[id]/route: nickname 조회 추가 - judgment.mapper: cardImageUrl 추가 - types/judgment: ConflictTypeDetailDto에 cardImageUrl 추가 - auth/index: 카카오 로그인 시 profileImageUrl 저장 - page.module.scss: diaryBox max-width 제거 - NewCaseButton: AbortController timeout 30s Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ature/judgement-result
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- participants nickname → name으로 변경 (DTO, route, 컴포넌트, useActiveCases) - next.config: 카카오 HTTP 패턴 제거 (HTTPS만 허용) - DisputePage: isCompleted null 케이스 처리 (!!dispute) - JudgmentResult.module.scss: declaration-empty-line-before stylelint 수정 - JudgmentTypeResult.module.scss: 동일 stylelint 수정 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- JudgmentResult/JudgmentTypeResult: props 대신 disputeId 기반 직접 API 호출 (새로고침 시 데이터 유실 방지, TanStack Query 캐시로 중복 요청 없음) - DisputePage: judgment/participants props 제거, isError 기반 에러 처리 - auth/index.ts: 프로필 이미지 백필 try-catch 감싸기 (실패 시 로그인 차단 방지) - judgement.api.ts: 에러 메시지 사용자 친화적으로 개선 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- CalendarRecord 모델 및 CalendarRecordType enum 제거 - User, DisputeRoom, RoomAiConversation, Dispute에서 calendarRecords relation 제거 - EmotionDiary에 title 필드 추가 (VarChar 200) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- next.config.ts: k.kakaocdn.net → *.kakaocdn.net 통합 (dev 기준) - DisputePage: useCloseDispute, disputeKeys, useUserMe import 추가 (dev 기준) - canJudge 로직 dev 기준으로 통합 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- GET /api/disputes에 completed=true 쿼리 파라미터 추가 (judged/closed 필터링)
- fetchCompletedCases, useCompletedCases 추가 (카테고리 필터 + 최신순)
- RecordListSection 더미 데이터 제거, 실제 API 연동
- 사건 박스 클릭 시 /disputes/{id}로 이동 (기존 Link 구조 유지)
- 로딩/에러/빈 상태 처리
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 빈 상태 텍스트 → '등록한 사건이 없어요' - character-case.png 이미지 + 텍스트 중앙 배치 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- CaseRecordCard 신규 생성 (src/components/ui) - MUI AvatarGroup으로 1인/2인 참여자 프로필 겹침 표시 - RecordListSection에서 CaseRecordCard 사용하도록 교체 - 카드 스타일 RecordListSection.module.scss → CaseRecordCard.module.scss로 이동 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
카카오 기본 프로필 이미지 URL이 http로 오는 경우가 있어 *.kakaocdn.net http 패턴 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- UseQueryOptions, DisputeDto import 추가 (dev 브랜치 기준) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- dev 브랜치 isRefreshing, handleRefresh 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- disputes/route.ts: active/completed 동시 사용 시 if/else 분기로 필터 충돌 방지 - CaseRecordCard: <time> 요소에 dateTime 속성 추가 (접근성) - Header: transparent prop 추가, :global(header) 셀렉터 제거 - RecordListSection: 에러 메시지 구체화 - next.config.ts: 중복 HTTP 항목 제거 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ature/judgement-result
- isEqual/barEqual 제거, 색상 로직 ratioA >= ratioB 패턴으로 단순화 - scoreGraph margin-bottom 추가 - scoreAvatarImg 크기 명시적 fn.r(48)로 변경 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 바 height 12 → 16, border-radius 6 → 4 - 중앙 실선 추가 (solid, border-strong, h36) - barDark 컬러 → status-disabled-text - scoreTitle 이름 부분만 bold 처리 - AI 고지 문구 컬러 → text-secondary Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 진술 카드 레이블 A/B → 참여자 실명으로 변경 - 진술 카드 하단 프로필 이미지 + MBTI 추가 - DisputeParticipantDto에 mbti 필드 추가 - API participants에 mbti 포함 (disputes/[id] GET/PATCH) - profileImageUrl null 시 image 필드 fallback 적용 (목록/상세 API) - DisputePage.module.scss mixins import 추가 - JudgmentResult 그래프 점선/바 높이 디테일 수정 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- nameA / nameB 변수로 cardLabel, barLabel 통일 - replaceRoleNames 함수로 aFault/bFault/aSuggestedLine/bSuggestedLine 내 A님→실제이름 치환 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ature/judgement-result
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough분쟁 참여자 DTO에 Changes참여자 프로필 필드 확장 및 UI 반영
Sequence Diagram(s)sequenceDiagram
actor User as 사용자
participant DisputePage as DisputePage (page.tsx)
participant API as disputes/[id]/route.ts
participant DB as Prisma DB
User->>DisputePage: 분쟁 상세 페이지 접근
DisputePage->>API: GET /api/disputes/[id]
API->>DB: findFirst (participants.user: name, profileImageUrl, image, mbti)
DB-->>API: participants[{ name, profileImageUrl, image, mbti }]
API-->>DisputePage: DisputeParticipantDto (profileImageUrl ?? image, mbti)
DisputePage-->>User: 진술 카드 (참여자 이름, 아바타, MBTI 배지) 렌더링
DisputePage->>DisputePage: JudgmentResult 렌더링
Note over DisputePage: !isSolo → verdictScoreA/B 점수 바 그래프<br>replaceRoleNames로 판결 텍스트 내 이름 치환
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/app/api/disputes/route.ts`:
- Line 24: The Prisma query selections are inconsistent with the fallback
mapping logic. The diff shows that the user select statement includes both
profileImageUrl and image, but the actual database queries at the findMany and
findUniqueOrThrow calls still only select profileImageUrl. Locate these queries
(around lines 126 and 244 based on the comment) and update their user select
statements to include both profileImageUrl: true and image: true, matching the
pattern shown in the diff on line 24. This ensures the type contract is
satisfied and the image fallback logic can work correctly at runtime.
In `@src/components/judgement/JudgmentResult.tsx`:
- Around line 12-14: The replaceRoleNames function applies sequential replace
operations which risks unintended re-substitution: if the first replacement
creates a pattern matching the second regex, it will be replaced again. Refactor
the function to use a single regex pattern with alternation (A님|B님) and a
callback function that determines which replacement to apply based on the
matched pattern, ensuring all substitutions happen in a single pass without
intermediate states that could be re-matched.
🪄 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: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 34faa1c6-8015-4c9d-82bd-baf8ac958766
📒 Files selected for processing (7)
src/app/(page)/disputes/[id]/DisputePage.module.scsssrc/app/(page)/disputes/[id]/page.tsxsrc/app/api/disputes/[id]/route.tssrc/app/api/disputes/route.tssrc/components/judgement/JudgmentResult.module.scsssrc/components/judgement/JudgmentResult.tsxsrc/types/dispute.ts
- replaceRoleNames 단일 패스 치환으로 개선 (A님|B님 alternation) - disputes 목록/POST API Prisma 쿼리에 image 필드 선택 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
mbti필드 추가profileImageUrlnull 시image필드 fallback 적용Changes
JudgmentResult.tsxJudgmentResult.module.scssdisputes/[id]/page.tsxDisputePage.module.scssdispute.tsdisputes/route.tsdisputes/[id]/route.tsTest Plan
🤖 Generated with Claude Code
Summary by CodeRabbit
릴리스 노트
New Features
UI 개선