Skip to content

feat: 사건기록 페이지 구현 - #65

Merged
evenif99 merged 4 commits into
devfrom
feature/case-record-jm
Jun 19, 2026
Merged

evenif99 merged 4 commits into
devfrom
feature/case-record-jm

Conversation

@wjdalss21

@wjdalss21 wjdalss21 commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • /records 페이지 신규 구현: 진행완료(judged/closed) 상태 사건만 표시
  • RecordListSection 컴포넌트: 카테고리 필터(전체/연애/가족/친구/직장) + 사건 카드 리스트
  • 사건 카드 하단 Avatar(프로필) + 날짜 + StatusBadge 레이아웃
  • CaseCard 컴포넌트: 미사용 status prop 제거, disputeStatus 기준 통일

CodeRabbit 반영

  • records/page.tsx 비로그인 redirect 가드 복구
  • RecordListSection 카드 클릭: div role="button"Link 교체 (키보드 접근성)
  • RecordListSection formatDate: .slice(2).slice(2, 10) (YY-MM-DD 정확히)
  • CaseCard 미사용 status prop 제거 + RecordList.tsx 호출부 이관 완료

Test plan

  • 비로그인 상태에서 /records 접근 시 /login으로 리다이렉트 확인
  • 로그인 후 /records 진입 → 카테고리 필터 동작 확인
  • 카드 클릭 시 /disputes/{id} 이동 확인 (키보드 Enter도 동작 확인)
  • 날짜 포맷 YY-MM-DD 형태로 표시 확인

🤖 Generated with Claude Code

Summary by CodeRabbit

변경 사항

  • 새로운 기능

    • 사건 기록 목록 페이지 추가: 카테고리별 필터링 기능 지원
    • 사건 카드에 진행 상태 배지 표시
  • 개선 사항

    • 기록 페이지 접근 시 로그인 확인 추가
    • 페이지 레이아웃 및 네비게이션 개선

- /records 페이지 생성: 진행완료(judged/closed) 사건 목록 표시
- RecordListSection 컴포넌트 구현: 카테고리 필터 + 사건 카드 리스트
- 사건 카드에 Avatar(프로필) + 날짜 + 진행완료 배지 외부 footer 구조 적용
- CaseCard: disputeStatus 기반 footer 렌더링 추가 (card__footer 스타일 포함)
- StatusBadge: DisputeStatus 타입 export 추가
- src/app/(page)/home 폴더 제거: 홈은 src/app/page.tsx 단일 진입점으로 정리
- join/page.tsx: 메인 이동 경로 /home → / 수정

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

vercel Bot commented Jun 18, 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 19, 2026 2:30am
talky-owl-xqdp Ready Ready Preview, Comment Jun 19, 2026 2:30am

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

워크스루

/home 리다이렉트 컴포넌트를 삭제하고 join 페이지의 라우팅을 '/'로 수정. DisputeStatus 타입을 공개 내보내기로 변경하고 CaseCardstatus prop을 disputeStatus로 교체. RecordListSection 클라이언트 컴포넌트와 스타일을 신규 추가하고 RecordsPage를 서버 컴포넌트로 전환.

변경 사항

Records 페이지 구축 및 CaseCard API 리팩터

레이어 / 파일 요약
DisputeStatus 공개 내보내기 및 CaseCard prop 교체
src/components/ui/StatusBadge.tsx, src/components/ui/CaseCard.tsx, src/components/ui/CaseCard.module.scss, src/components/calendar/RecordList.tsx
DisputeStatus 타입을 export로 변경, CaseCardPropsstatusdisputeStatus로 교체하고 footer 렌더링을 조건부 구조로 재편. card__footer SCSS 블록 추가. RecordList.tsx의 더미 데이터에서 status 필드 제거 및 CaseCard prop 전달 삭제.
RecordListSection 컴포넌트 및 스타일 신규 추가
src/components/records/RecordListSection.tsx, src/components/records/RecordListSection.module.scss
RecordItem 타입·더미 데이터 정의, 카테고리 필터 상태 관리, 빈 상태 처리, 카드 클릭 시 /disputes/{disputeId} 라우팅. 전체 SCSS 모듈(section, filter, list, card, footer, empty 스타일) 함께 추가.
RecordsPage 서버 컴포넌트 전환 및 레이아웃 구성
src/app/(page)/records/page.tsx, src/app/(page)/records/page.module.scss
async 서버 컴포넌트로 전환, getServerSession 호출 추가(로컬 개발용 주석 처리). JSX를 Header + RecordListSection + BottomNavigation 레이아웃으로 변경. .page SCSS 모듈 추가.
join 라우팅 수정
src/app/(page)/join/page.tsx
JoinPagegoToMain 경로를 '/home'에서 '/'로 변경.

추정 코드 리뷰 노력

🎯 3 (Moderate) | ⏱️ ~25 minutes

연관 가능성이 있는 PR

  • I5-Project/TALKY-OWL#38: CaseCard.tsxStatusBadge 사용 방식이 공통으로 변경되며, 배지 렌더링 API 수준에서 직접 연관됩니다.
  • I5-Project/TALKY-OWL#41: calendarRecordList UI 제작 과정에서 동일하게 RecordListCaseCard 전달 방식을 status 없이 변경합니다.
  • I5-Project/TALKY-OWL#47: 본 PR에서 /home 경로의 리다이렉트 컴포넌트를 제거하는 변경이 이 PR에서 새로운 HomePage 컴포넌트 추가로 이어집니다.

제안 리뷰어

  • lyla-bae

🐰 토끼가 노래합니다:

/home으로 가던 길, 이제는 /로 달려가~
더미 카드들 줄지어, 기록 페이지 꽃을 피워 🌸
disputeStatus 배지 달고, 사건들 나풀나풀
서버 컴포넌트 깨어나, 세션도 살짝 들여다봐
쑥쑥 자라는 올빼미, 오늘도 열심히 달려! 🦉✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 제목이 주요 변경 사항인 사건기록 페이지 구현을 명확하고 간결하게 요약하고 있습니다.
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/case-record-jm

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: one or more packages not found in the registry.


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

@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: 4

🧹 Nitpick comments (1)
src/components/ui/StatusBadge.tsx (1)

3-12: ⚡ Quick win

DisputeStatus 타입 소스를 단일화하세요.

Line 3-12에서 UI 컴포넌트가 도메인 타입을 직접 재정의/재export하면, src/types/dispute.ts와 이후 변경 시점에 쉽게 드리프트가 납니다. 이 파일은 타입을 재정의하지 말고 도메인 타입을 re-export하는 편이 안전합니다.

제안 diff
+import type { DisputeStatus } from '`@/types/dispute`';
+export type { DisputeStatus } from '`@/types/dispute`';
-
-export type DisputeStatus =
-  | 'draft'
-  | 'waiting_opponent'
-  | 'opponent_joined'
-  | 'both_submitted'
-  | 'judging'
-  | 'judged'
-  | 'closed'
-  | 'expired'
-  | 'deleted';
🤖 Prompt for 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.

In `@src/components/ui/StatusBadge.tsx` around lines 3 - 12, Remove the local
DisputeStatus type definition from the StatusBadge.tsx file and instead import
and re-export it from the canonical source at src/types/dispute.ts. Replace the
type definition (lines 3-12) with an import statement that brings in the
DisputeStatus type from the domain types file, ensuring there is a single source
of truth for this type to prevent future drift and maintenance issues.
🤖 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/`(page)/records/page.tsx:
- Around line 2-3: The authentication guard for the /records page is currently
disabled because the import statement for redirect from next/navigation is
commented out on line 2-3, and the redirect logic is also commented out around
line 14. To fix this, uncomment the import statement to enable the redirect
function, and then ensure the redirect call is active in the session validation
logic so that unauthenticated users are properly redirected away from the
/records route, aligning with the PR objective of implementing unauthenticated
user redirection.

In `@src/components/records/RecordListSection.tsx`:
- Line 4: Keyboard navigation for card movement is broken because elements with
role="button" and tabIndex are missing onKeyDown handlers for Enter/Space keys,
blocking keyboard users from navigating. Replace the button-like div elements
around lines 68 and 87-92 that currently have role="button" with Link components
from the already-imported next/navigation module. This will automatically
provide proper keyboard navigation support while maintaining the intended
routing behavior.
- Around line 63-65: The formatDate function uses slice(2) which only removes
the first two characters from the ISO date string, leaving the time portion
exposed (e.g., converting 2026-06-13T12:34:56Z to 26-06-13T12:34:56Z). To fix
this and extract only the date in YY-MM-DD format, modify the slice call in the
formatDate function to specify both the start and end indices so that only the
intended date portion (10 characters after removing the first 2) is returned,
excluding the time portion.

In `@src/components/ui/CaseCard.tsx`:
- Around line 12-13: The CaseCard component accepts a `status` prop at line 12
but the render logic at lines 44-51 only references `disputeStatus`, ignoring
the `status` prop completely. This causes RecordList.tsx which passes `status`
to silently lose the badge display. Either migrate all callers (including
RecordList.tsx) to use `disputeStatus` prop and remove the `status` prop
entirely, or add fallback rendering logic that uses `status` as a fallback when
`disputeStatus` is not provided to maintain backward compatibility until all
callers are migrated.

---

Nitpick comments:
In `@src/components/ui/StatusBadge.tsx`:
- Around line 3-12: Remove the local DisputeStatus type definition from the
StatusBadge.tsx file and instead import and re-export it from the canonical
source at src/types/dispute.ts. Replace the type definition (lines 3-12) with an
import statement that brings in the DisputeStatus type from the domain types
file, ensuring there is a single source of truth for this type to prevent future
drift and maintenance issues.
🪄 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: 34fc74aa-fc32-4506-8028-bf676b9dfc5e

📥 Commits

Reviewing files that changed from the base of the PR and between 4497d87 and ecadee2.

📒 Files selected for processing (10)
  • src/app/(page)/home/.gitkeep
  • src/app/(page)/home/page.tsx
  • src/app/(page)/join/page.tsx
  • src/app/(page)/records/page.module.scss
  • src/app/(page)/records/page.tsx
  • src/components/records/RecordListSection.module.scss
  • src/components/records/RecordListSection.tsx
  • src/components/ui/CaseCard.module.scss
  • src/components/ui/CaseCard.tsx
  • src/components/ui/StatusBadge.tsx
💤 Files with no reviewable changes (1)
  • src/app/(page)/home/page.tsx

Comment thread src/app/(page)/records/page.tsx Outdated
Comment thread src/components/records/RecordListSection.tsx Outdated
Comment thread src/components/records/RecordListSection.tsx
Comment thread src/components/ui/CaseCard.tsx Outdated
@wjdalss21 wjdalss21 changed the title feat: 사건기록 페이지 구현 feat: 사건기록 페이지 구현 아직 PR 피드백 수정 안햇슴다 merge nono Jun 19, 2026
wjdalss21 and others added 2 commits June 19, 2026 11:19
- records/page.tsx: 비로그인 redirect 가드 복구
- RecordListSection: div role=button → Link 교체로 키보드 접근성 개선
- RecordListSection: formatDate slice(2) → slice(2,10) 날짜 포맷 수정
- CaseCard: 미사용 status prop 제거
- RecordList: status prop 전달 제거

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wjdalss21 wjdalss21 changed the title feat: 사건기록 페이지 구현 아직 PR 피드백 수정 안햇슴다 merge nono feat: 사건기록 페이지 구현 Jun 19, 2026

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/records/RecordListSection.tsx (1)

90-101: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

날짜가 중복으로 렌더링됩니다.

CaseCarddisputeStatus를 전달하지 않으면, CaseCard 내부에서 date prop을 <time> 요소로 렌더링합니다 (CaseCard.tsx 라인 43). 그런데 cardFooter에서도 동일한 날짜를 다시 렌더링하고 있어 화면에 날짜가 두 번 표시됩니다.

커스텀 footer 구조(Avatar + 날짜 + StatusBadge)를 유지하려면, CaseCard에 빈 문자열을 전달하거나 date prop을 제거하는 방안을 검토하세요.

🐛 제안 diff
                 <CaseCard
                   title={record.title}
                   preview={record.description}
-                  date={formatDate(record.createdAt)}
+                  date=""
                   categoryGroup={record.categoryGroup}
                 />
🤖 Prompt for 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.

In `@src/components/records/RecordListSection.tsx` around lines 90 - 101, The date
is being rendered twice in the RecordListSection component: once inside the
CaseCard component via the date prop and again in the cardFooter section. To fix
this, remove the date prop from the CaseCard component (or pass an empty string
to it) so that the date only displays once in the cardFooter alongside the
Avatar and StatusBadge, maintaining the custom footer structure.
🤖 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.

Outside diff comments:
In `@src/components/records/RecordListSection.tsx`:
- Around line 90-101: The date is being rendered twice in the RecordListSection
component: once inside the CaseCard component via the date prop and again in the
cardFooter section. To fix this, remove the date prop from the CaseCard
component (or pass an empty string to it) so that the date only displays once in
the cardFooter alongside the Avatar and StatusBadge, maintaining the custom
footer structure.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: c39b9a15-0b2c-41cc-a154-3a8540ebc327

📥 Commits

Reviewing files that changed from the base of the PR and between ecadee2 and b2c497f.

📒 Files selected for processing (4)
  • src/app/(page)/records/page.tsx
  • src/components/calendar/RecordList.tsx
  • src/components/records/RecordListSection.tsx
  • src/components/ui/CaseCard.tsx
💤 Files with no reviewable changes (1)
  • src/components/calendar/RecordList.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/ui/CaseCard.tsx

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