Skip to content

refactor: 내 토너먼트 화면 개선안 반영 - #366

Merged
iOdiO89 merged 8 commits into
devfrom
refactor/335-archive-tournament
Jul 21, 2026
Merged

refactor: 내 토너먼트 화면 개선안 반영#366
iOdiO89 merged 8 commits into
devfrom
refactor/335-archive-tournament

Conversation

@iOdiO89

@iOdiO89 iOdiO89 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

작업 요약

  • archive/tournament(내 토너먼트) 화면을 UI 개선안에 맞춰 리팩터링했습니다.
  • 서버 왕복 없이 탭이 즉시 전환되도록 조회를 CSR로 바꾸고, 로딩 구간에 Skeleton을 붙였습니다.

작업 내용

  • 탭/컨테이너 구조를 TournamentHistorySection으로 통합 — 공용 ArchivePageLayout과 중간 래퍼(ArchiveTournamentClient, TournamentHistoryContent)를 제거하고, 타이틀·탭·리스트를 하나의 섹션 컴포넌트로 정리. archive/wish 페이지도 동일하게 ArchivePageLayout 의존을 걷어내고 인라인 레이아웃으로 맞춤

  • 목록 조회 CSR 전환 + Skeleton 적용page.tsx에서 초기 탭 데이터만 prefetch해 HydrationBoundary로 넘기고, 탭별 조회는 Suspense(key={activeTab}) + TournamentHistoryList로 처리. 로딩 중에는 TournamentCardSkeleton 4개(TournamentHistorySkeleton)를 노출

  • 탭 전환을 클라이언트 상태로 변경해 즉시 반영useState로 활성 탭을 관리하고, window.history.replaceState로 주소(?tab=)만 동기화. 서버 라운드트립 없이 탭이 바로 전환됨. 새로고침·공유 시엔 searchParamstab으로 초기 탭 복원

  • 탭 상태 매핑을 _consts/tournamentTab.ts로 분리 — 탭 값을 in-progress → ongoing으로 변경하고, STATUS_BY_TAB(ongoing → PENDING/IN_PROGRESS, completed → COMPLETED)으로 탭↔조회 상태 매핑을 상수화. 탭 타입도 이 파일로 이동

  • UI 개선안 반영 — 탭에 아이콘 추가(진행 중=장바구니, 완료=영수증), 토너먼트 만들기 FAB(TournamentFab) 추가, 타이틀 heading-1 → heading-1-bold 적용

미작업 사항

  • 상태 필터칩#361의 필터칩은 기획 논의가 아직 끝나지 않아 이번 PR에서는 작업하지 않았습니다. 기획 확정 후 별도 작업 예정

스크린샷

2026-07-21.5.37.34.mov

연관 이슈

related to #335

Summary by CodeRabbit

  • 새로운 기능

    • 토너먼트 보관함에서 진행 중·완료된 토너먼트를 탭으로 구분해 확인할 수 있습니다.
    • 토너먼트 생성 버튼과 생성 다이얼로그를 보관함과 홈 화면에서 제공합니다.
    • 토너먼트 목록과 기록을 불러오는 동안 카드형 로딩 화면을 표시합니다.
  • 개선

    • 탭 전환 시 페이지 이동 없이 기록을 빠르게 확인할 수 있습니다.
    • 토너먼트 상태 탭에 아이콘과 명확한 라벨을 추가했습니다.

@iOdiO89 iOdiO89 self-assigned this Jul 21, 2026
@iOdiO89 iOdiO89 linked an issue Jul 21, 2026 that may be closed by this pull request
8 tasks
@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
piki Ready Ready Preview, Comment Jul 21, 2026 1:07pm

@github-actions
github-actions Bot requested review from kanghaeun and ychany July 21, 2026 08:48
@github-actions github-actions Bot added the refactor Extra attention is needed label Jul 21, 2026
@github-actions

Copy link
Copy Markdown

Discord 스레드 연동용 메타데이터입니다. discord-pr-bot 워크플로가 자동 생성하며, 수정·삭제하면 PR 과 Discord 알림 연동이 끊깁니다.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 69c6f187-4e10-46e9-b19a-75e2134ca6a7

📥 Commits

Reviewing files that changed from the base of the PR and between bc9d726 and 6596484.

📒 Files selected for processing (20)
  • apps/web/src/apis/postCreateTournament.ts
  • apps/web/src/app/archive/_common/_components/ArchivePageLayout.tsx
  • apps/web/src/app/archive/tournament/_components/ArchiveTournamentClient.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentFab.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentHistoryContent.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentHistoryList.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentHistorySkeleton.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentStatusTab.tsx
  • apps/web/src/app/archive/tournament/_consts/tournamentTab.ts
  • apps/web/src/app/archive/tournament/page.tsx
  • apps/web/src/app/home/_components/CreateTournamentDialog.tsx
  • apps/web/src/app/home/_components/tournament-list/TournamentListSkeleton.tsx
  • apps/web/src/app/home/_components/tournament-list/index.tsx
  • apps/web/src/app/home/_types/tournament.ts
  • apps/web/src/app/home/page.tsx
  • apps/web/src/components/common/create-tournament-dialog/index.tsx
  • apps/web/src/components/tournament-card/TournamentCardSkeleton.tsx
  • apps/web/src/hooks/usePostCreateTournament.ts
  • apps/web/src/types/tournament.ts
💤 Files with no reviewable changes (6)
  • apps/web/src/app/home/_types/tournament.ts
  • apps/web/src/app/archive/tournament/_components/TournamentHistoryContent.tsx
  • apps/web/src/app/home/_components/tournament-list/TournamentListSkeleton.tsx
  • apps/web/src/app/home/_components/CreateTournamentDialog.tsx
  • apps/web/src/app/archive/tournament/_components/ArchiveTournamentClient.tsx
  • apps/web/src/app/archive/_common/_components/ArchivePageLayout.tsx
🚧 Files skipped from review as they are similar to previous changes (14)
  • apps/web/src/app/archive/tournament/_consts/tournamentTab.ts
  • apps/web/src/app/archive/tournament/_components/TournamentFab.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentHistoryList.tsx
  • apps/web/src/components/tournament-card/TournamentCardSkeleton.tsx
  • apps/web/src/app/home/page.tsx
  • apps/web/src/app/home/_components/tournament-list/index.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentHistorySkeleton.tsx
  • apps/web/src/apis/postCreateTournament.ts
  • apps/web/src/types/tournament.ts
  • apps/web/src/hooks/usePostCreateTournament.ts
  • apps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsx
  • apps/web/src/components/common/create-tournament-dialog/index.tsx
  • apps/web/src/app/archive/tournament/page.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentStatusTab.tsx

📝 Walkthrough

Walkthrough

토너먼트 생성 다이얼로그를 공통 컴포넌트로 분리하고 홈·아카이브에 연결했습니다. 아카이브는 탭별 서버 프리패치와 하이드레이션, 클라이언트 탭 전환 및 스켈레톤 UI를 사용하도록 변경했습니다.

Changes

토너먼트 생성 다이얼로그

Layer / File(s) Summary
공통 생성 다이얼로그와 진입점 연결
apps/web/src/components/common/create-tournament-dialog/index.tsx, apps/web/src/app/home/page.tsx, apps/web/src/app/archive/tournament/_components/TournamentFab.tsx, apps/web/src/types/tournament.ts, apps/web/src/apis/postCreateTournament.ts, apps/web/src/hooks/usePostCreateTournament.ts
생성 요청·응답 타입을 공통 타입 경로로 옮기고, 입력 검증·생성 요청·다이얼로그 UI를 공통화해 홈과 아카이브의 트리거에 연결했습니다.

아카이브 토너먼트 상태 흐름

Layer / File(s) Summary
탭 상태 매핑과 서버 하이드레이션
apps/web/src/app/archive/tournament/_consts/tournamentTab.ts, apps/web/src/app/archive/tournament/_components/TournamentStatusTab.tsx, apps/web/src/app/archive/tournament/page.tsx
ongoing·completed 탭과 상태 목록 매핑을 추가하고, 선택된 상태 목록을 프리패치·하이드레이션하도록 페이지 흐름을 변경했습니다.
클라이언트 탭 전환과 목록 표시
apps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsx, apps/web/src/app/archive/tournament/_components/TournamentHistoryList.tsx
탭 상태를 관리하고 URL 쿼리를 갱신하며, 탭 변경 시 목록과 로딩 스켈레톤을 전환하도록 구성했습니다. 기존 목록 래퍼는 제거했습니다.
아카이브 구성 요소 정리
apps/web/src/app/archive/_common/_components/ArchivePageLayout.tsx, apps/web/src/app/archive/tournament/_components/ArchiveTournamentClient.tsx, apps/web/src/app/archive/tournament/_components/TournamentHistoryContent.tsx
기존 아카이브 레이아웃·클라이언트·프리패치 컴포넌트를 제거하고 새 페이지 및 섹션 흐름으로 대체했습니다.

토너먼트 목록 로딩 UI

Layer / File(s) Summary
카드 스켈레톤과 홈 목록 fallback
apps/web/src/components/tournament-card/TournamentCardSkeleton.tsx, apps/web/src/app/home/_components/tournament-list/index.tsx, apps/web/src/app/home/_components/tournament-list/TournamentListSkeleton.tsx, apps/web/src/app/archive/tournament/_components/TournamentHistorySkeleton.tsx
공통 카드 스켈레톤을 추가하고 홈 목록 fallback을 카드 3개 렌더링으로 변경했으며, 아카이브에는 카드 4개 기반 스켈레톤을 추가했습니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related issues

Possibly related PRs

  • TeamPiKi/client#347 — 아카이브 토너먼트 탭, 상태 필터링, 목록 하이드레이션 흐름이 같은 코드 영역에서 변경됩니다.
  • TeamPiKi/client#354archive/tournament/page.tsx의 렌더링 및 레이아웃 변경이 겹칩니다.
  • TeamPiKi/client#357TournamentHistoryList.tsx의 목록 및 카드 prop 계약 변경이 직접적으로 연관됩니다.

Suggested labels: WEB, feature

Suggested reviewers: kanghaeun, ychany

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 내 토너먼트 화면의 탭 구조, 스켈레톤, 생성 UI, 관련 리팩터링을 반영한 제목으로 변경 내용과 잘 맞습니다.
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.
✨ 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 refactor/335-archive-tournament

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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)
apps/web/src/app/archive/tournament/_components/TournamentHistoryList.tsx (1)

23-35: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

빈 상태의 중첩 <main>을 제거해 주세요.

상위 TournamentHistorySectionmain 안에서 목록을 렌더링하도록 바뀌었지만, 빈 목록 분기(Line 15-20)는 여전히 main을 반환합니다. 빈 상태에서 <main>이 중첩되므로 div로 변경하고 기존 flex 클래스를 유지해 주세요.

수정 예시
-      <main className="flex flex-1 flex-col items-center justify-center pb-24">
+      <div className="flex flex-1 flex-col items-center justify-center pb-24">
         <TournamentEmptyState />
-      </main>
+      </div>
🤖 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 `@apps/web/src/app/archive/tournament/_components/TournamentHistoryList.tsx`
around lines 23 - 35, TournamentHistoryList의 빈 목록 분기에서 중첩된 main 요소를 div로 변경하세요.
기존 flex 관련 클래스와 빈 상태 렌더링 동작은 그대로 유지하고, 목록이 있는 경우의 TournamentCard 렌더링은 수정하지 마세요.
🧹 Nitpick comments (3)
apps/web/src/app/archive/tournament/page.tsx (3)

9-9: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

type-only import를 import type으로 분리해 주세요.

  • apps/web/src/app/archive/tournament/page.tsx#L9-L9: TournamentStatusTabT를 별도 import type 문으로 분리합니다.
  • apps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsx#L7-L7: TournamentStatusTabT를 별도 import type 문으로 분리합니다.

As per coding guidelines, type-only import는 import type 문을 사용해야 합니다.

🤖 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 `@apps/web/src/app/archive/tournament/page.tsx` at line 9, Separate
TournamentStatusTabT into a dedicated import type declaration while keeping
STATUS_BY_TAB in the value import. Apply this change in
apps/web/src/app/archive/tournament/page.tsx at lines 9-9 and
apps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsx at
lines 7-7.

Source: Coding guidelines


7-9: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

아카이브 모듈 import를 @/* 절대 경로로 통일해 주세요.

세 위치 모두 같은 디렉터리가 아닌 모듈을 상대 경로로 import합니다.

  • apps/web/src/app/archive/tournament/page.tsx#L7-L9: _components_consts import를 @/app/archive/tournament/...로 변경합니다.
  • apps/web/src/app/archive/tournament/_components/TournamentStatusTab.tsx#L8-L8: _consts import를 절대 경로로 변경합니다.
  • apps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsx#L7-L7: _consts import를 절대 경로로 변경합니다.

As per coding guidelines, 프로젝트 모듈은 @/* 절대 경로를 사용하고 상대 경로는 같은 디렉터리 모듈에만 사용해야 합니다.

🤖 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 `@apps/web/src/app/archive/tournament/page.tsx` around lines 7 - 9, 아카이브 모듈의 상대
경로 import를 `@/`* 절대 경로로 통일하세요. apps/web/src/app/archive/tournament/page.tsx의
TournamentFab, TournamentHistorySection, STATUS_BY_TAB 및 TournamentStatusTabT
import를 변경하고,
apps/web/src/app/archive/tournament/_components/TournamentStatusTab.tsx와
TournamentHistorySection.tsx의 _consts import도 각각 `@/app/archive/tournament/`...
경로로 변경하세요.

Source: Coding guidelines


11-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

컴포넌트 props 타입을 컴포넌트명 기반으로 바꿔 주세요.

  • apps/web/src/app/archive/tournament/page.tsx#L11-L13: PropsArchiveTournamentPageProps로 변경합니다.
  • apps/web/src/app/archive/tournament/_components/TournamentStatusTab.tsx#L10-L13: PropsTournamentStatusTabProps로 변경합니다.
  • apps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsx#L12-L14: PropsTournamentHistorySectionProps로 변경합니다.

As per coding guidelines, 컴포넌트 props 타입은 {ComponentName}Props 형식을 사용해야 합니다.

🤖 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 `@apps/web/src/app/archive/tournament/page.tsx` around lines 11 - 13, Rename
the props types to follow the component-name convention: update Props to
ArchiveTournamentPageProps in apps/web/src/app/archive/tournament/page.tsx
(lines 11-13), Props to TournamentStatusTabProps in
apps/web/src/app/archive/tournament/_components/TournamentStatusTab.tsx (lines
10-13), and Props to TournamentHistorySectionProps in
apps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsx
(lines 12-14), including all corresponding type references.

Source: Coding guidelines

🤖 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 `@apps/web/src/app/archive/tournament/_components/TournamentHistoryList.tsx`:
- Around line 23-35: TournamentHistoryList의 빈 목록 분기에서 중첩된 main 요소를 div로 변경하세요.
기존 flex 관련 클래스와 빈 상태 렌더링 동작은 그대로 유지하고, 목록이 있는 경우의 TournamentCard 렌더링은 수정하지 마세요.

---

Nitpick comments:
In `@apps/web/src/app/archive/tournament/page.tsx`:
- Line 9: Separate TournamentStatusTabT into a dedicated import type declaration
while keeping STATUS_BY_TAB in the value import. Apply this change in
apps/web/src/app/archive/tournament/page.tsx at lines 9-9 and
apps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsx at
lines 7-7.
- Around line 7-9: 아카이브 모듈의 상대 경로 import를 `@/`* 절대 경로로 통일하세요.
apps/web/src/app/archive/tournament/page.tsx의 TournamentFab,
TournamentHistorySection, STATUS_BY_TAB 및 TournamentStatusTabT import를 변경하고,
apps/web/src/app/archive/tournament/_components/TournamentStatusTab.tsx와
TournamentHistorySection.tsx의 _consts import도 각각 `@/app/archive/tournament/`...
경로로 변경하세요.
- Around line 11-13: Rename the props types to follow the component-name
convention: update Props to ArchiveTournamentPageProps in
apps/web/src/app/archive/tournament/page.tsx (lines 11-13), Props to
TournamentStatusTabProps in
apps/web/src/app/archive/tournament/_components/TournamentStatusTab.tsx (lines
10-13), and Props to TournamentHistorySectionProps in
apps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsx
(lines 12-14), including all corresponding type references.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2dd8449d-79c4-48c2-89df-0d9add007da1

📥 Commits

Reviewing files that changed from the base of the PR and between 8c2e97e and bc9d726.

📒 Files selected for processing (21)
  • apps/web/src/apis/postCreateTournament.ts
  • apps/web/src/app/archive/_common/_components/ArchivePageLayout.tsx
  • apps/web/src/app/archive/tournament/_components/ArchiveTournamentClient.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentFab.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentHistoryContent.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentHistoryList.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentHistorySkeleton.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentStatusTab.tsx
  • apps/web/src/app/archive/tournament/_consts/tournamentTab.ts
  • apps/web/src/app/archive/tournament/page.tsx
  • apps/web/src/app/archive/wish/page.tsx
  • apps/web/src/app/home/_components/CreateTournamentDialog.tsx
  • apps/web/src/app/home/_components/tournament-list/TournamentListSkeleton.tsx
  • apps/web/src/app/home/_components/tournament-list/index.tsx
  • apps/web/src/app/home/_types/tournament.ts
  • apps/web/src/app/home/page.tsx
  • apps/web/src/components/common/create-tournament-dialog/index.tsx
  • apps/web/src/components/tournament-card/TournamentCardSkeleton.tsx
  • apps/web/src/hooks/usePostCreateTournament.ts
  • apps/web/src/types/tournament.ts
💤 Files with no reviewable changes (6)
  • apps/web/src/app/home/_types/tournament.ts
  • apps/web/src/app/home/_components/tournament-list/TournamentListSkeleton.tsx
  • apps/web/src/app/home/_components/CreateTournamentDialog.tsx
  • apps/web/src/app/archive/tournament/_components/ArchiveTournamentClient.tsx
  • apps/web/src/app/archive/_common/_components/ArchivePageLayout.tsx
  • apps/web/src/app/archive/tournament/_components/TournamentHistoryContent.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: 내 토너먼트 화면 개선안 반영

1 participant