Skip to content

feat: 2인 판결결과 UI 및 진술 탭 참여자 정보 개선 - #104

Merged
evenif99 merged 32 commits into
devfrom
feature/judgement-result
Jun 22, 2026
Merged

feat: 2인 판결결과 UI 및 진술 탭 참여자 정보 개선#104
evenif99 merged 32 commits into
devfrom
feature/judgement-result

Conversation

@wjdalss21

@wjdalss21 wjdalss21 commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • 2인 판결결과 점수 그래프 UI 구현 (border-radius, 점선 중앙선, 색상 디테일)
  • JudgmentResult cardLabel/barLabel 참여자 실명 표시 및 AI 텍스트 내 A님/B님 치환 적용
  • 진술 탭 카드 레이블 A/B → 참여자 실명으로 변경
  • 진술 카드 하단 프로필 이미지 + MBTI 표시
  • DisputeParticipantDto에 mbti 필드 추가
  • disputes 목록/상세 API profileImageUrl null 시 image 필드 fallback 적용

Changes

파일 내용
JudgmentResult.tsx nameA/nameB 변수 통일, replaceRoleNames 단일 pass 치환 함수 적용
JudgmentResult.module.scss 점수 그래프 스타일 (점선 중앙선, bar border-radius 4, 색상)
disputes/[id]/page.tsx 진술 카드 참여자 이름 표시, 프로필/MBTI footer 추가
DisputePage.module.scss statementFooter / statementAvatar / statementMbti 스타일
dispute.ts DisputeParticipantDto mbti 필드 추가
disputes/route.ts Prisma 쿼리 image 필드 선택 추가, profileImageUrl fallback
disputes/[id]/route.ts participants user select에 image/mbti 추가, profileImageUrl fallback

Test Plan

  • 2인 판결 완료된 사건에서 판결 탭 진입 → 점수 그래프 정상 표시
  • 판결 점수에 따라 더 잘못한 참여자 이름 + 아바타 표시 확인
  • aFault / bFault 카드 레이블에 참여자 실명 표시 확인
  • aSuggestedLine / bSuggestedLine 화해 제안 카드 레이블 실명 확인
  • 진술 탭 카드 레이블 A/B → 참여자 이름 표시 확인
  • 진술 카드 하단 프로필 이미지 + MBTI 표시 확인
  • profileImageUrl null 계정도 카카오 image fallback으로 프로필 표시 확인
  • 단독 판결(1인)에서 B 관련 UI 미노출 확인

🤖 Generated with Claude Code

Summary by CodeRabbit

릴리스 노트

  • New Features

    • 분쟁 상세의 진술 카드에 참여자 프로필 아바타와 MBTI 배지를 표시
    • 판결 결과 페이지(2인 판결)에 점수 비교 그래프 추가
    • 판결문 및 화해 제안에서 참여자 실명으로 텍스트 치환
  • UI 개선

    • AI 고지 문구의 색상 스타일을 가시성에 맞게 조정

wjdalss21 and others added 30 commits June 20, 2026 11:30
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>
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>
- 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>
- nameA / nameB 변수로 cardLabel, barLabel 통일
- replaceRoleNames 함수로 aFault/bFault/aSuggestedLine/bSuggestedLine 내 A님→실제이름 치환

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
talky-owl Ready Ready Preview, Comment Jun 22, 2026 6:05am

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 22524700-701c-4733-a29f-a6718f2ffcb2

📥 Commits

Reviewing files that changed from the base of the PR and between bad9966 and 2fe63f6.

📒 Files selected for processing (2)
  • src/app/api/disputes/route.ts
  • src/components/judgement/JudgmentResult.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/app/api/disputes/route.ts
  • src/components/judgement/JudgmentResult.tsx

📝 Walkthrough

Walkthrough

분쟁 참여자 DTO에 mbtiimage 필드를 추가하고, Prisma 조회 스펙과 toParticipantDto 매핑을 업데이트했습니다. 진술 카드 UI는 참여자 이름·아바타·MBTI 배지를 동적으로 렌더링하도록 변경되었으며, 판결 결과 컴포넌트에는 2인 판결 전용 점수 바 그래프와 참여자 이름 치환 로직이 추가되었습니다.

Changes

참여자 프로필 필드 확장 및 UI 반영

Layer / File(s) Summary
DTO 타입 및 API 매핑 확장
src/types/dispute.ts, src/app/api/disputes/route.ts, src/app/api/disputes/[id]/route.ts
DisputeParticipantDtombti: string | null 필드를 추가하고, 목록·상세 API의 Prisma select에 image·mbti를 포함하며 toParticipantDto에서 profileImageUrl ?? image ?? null 폴백과 mbti 매핑을 적용한다.
진술 카드 참여자 정보 렌더링
src/app/(page)/disputes/[id]/page.tsx, src/app/(page)/disputes/[id]/DisputePage.module.scss
dispute.participants에서 role_a/role_b 참여자를 추출해 진술 카드 라벨·아바타·MBTI 배지를 동적으로 렌더링하고, 관련 SCSS 클래스(statementFooter, statementAvatar, statementAvatarImg, statementMbti)를 추가한다.
판결 결과 점수 그래프 및 이름 치환
src/components/judgement/JudgmentResult.tsx, src/components/judgement/JudgmentResult.module.scss
replaceRoleNames 헬퍼로 판결 텍스트의 'A님'/'B님'을 실제 이름으로 치환하고, !isSolo일 때 verdictScoreA/B 기반 바 그래프 섹션을 렌더링하며, 관련 SCSS 스타일과 aiNotice 색상 변경을 포함한다.

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로 판결 텍스트 내 이름 치환
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • I5-Project/TALKY-OWL#49: 진술 작성 페이지에 mbti 선택 UI를 추가해 이번 PR에서 노출하는 mbti 값을 사용자가 입력할 수 있게 하는 변경으로, 동일 데이터 흐름의 입력 측에 해당합니다.
  • I5-Project/TALKY-OWL#53: DisputePage/DisputePage.module.scss의 진술 카드 렌더링 기반을 구축한 PR로, 이번 PR이 동일 컴포넌트에서 라벨·아바타·MBTI 표시를 확장합니다.
  • I5-Project/TALKY-OWL#90: 분쟁 상세 페이지 진술 카드의 기본 아바타 이미지 경로를 변경한 PR로, 이번 PR에서 추가하는 아바타 렌더링 로직과 직접 맞닿아 있습니다.

Suggested reviewers

  • evenif99
  • juahcheon

Poem

🐇 토끼가 코드를 살펴보니,
A님도 B님도 이름이 생겼네!
아바타 둥글게, MBTI 배지 반짝,
막대 그래프로 잘못을 나눠보며
화해 제안도 이름 따라 속삭이네. 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.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
Title check ✅ Passed PR 제목이 변경사항의 핵심인 2인 판결결과 UI 개선과 진술 탭 참여자 정보 개선을 명확하게 요약하고 있습니다.
Description check ✅ Passed PR 설명이 작업 내용, 변경 파일, 테스트 계획을 포함하여 구조화되어 있고 구체적인 변경사항을 설명하고 있습니다.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/judgement-result

Comment @coderabbitai help to get the list of available commands and usage tips.

@wjdalss21
wjdalss21 requested review from juahcheon and lyla-bae and removed request for lyla-bae June 22, 2026 05:51

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6d1c4a6 and bad9966.

📒 Files selected for processing (7)
  • src/app/(page)/disputes/[id]/DisputePage.module.scss
  • src/app/(page)/disputes/[id]/page.tsx
  • src/app/api/disputes/[id]/route.ts
  • src/app/api/disputes/route.ts
  • src/components/judgement/JudgmentResult.module.scss
  • src/components/judgement/JudgmentResult.tsx
  • src/types/dispute.ts

Comment thread src/app/api/disputes/route.ts
Comment thread src/components/judgement/JudgmentResult.tsx
- replaceRoleNames 단일 패스 치환으로 개선 (A님|B님 alternation)
- disputes 목록/POST API Prisma 쿼리에 image 필드 선택 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants