refactor: 내 토너먼트 화면 개선안 반영 - #366
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Discord 스레드 연동용 메타데이터입니다. discord-pr-bot 워크플로가 자동 생성하며, 수정·삭제하면 PR 과 Discord 알림 연동이 끊깁니다. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (20)
💤 Files with no reviewable changes (6)
🚧 Files skipped from review as they are similar to previous changes (14)
📝 WalkthroughWalkthrough토너먼트 생성 다이얼로그를 공통 컴포넌트로 분리하고 홈·아카이브에 연결했습니다. 아카이브는 탭별 서버 프리패치와 하이드레이션, 클라이언트 탭 전환 및 스켈레톤 UI를 사용하도록 변경했습니다. Changes토너먼트 생성 다이얼로그
아카이브 토너먼트 상태 흐름
토너먼트 목록 로딩 UI
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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>을 제거해 주세요.상위
TournamentHistorySection의main안에서 목록을 렌더링하도록 바뀌었지만, 빈 목록 분기(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 wintype-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와_constsimport를@/app/archive/tournament/...로 변경합니다.apps/web/src/app/archive/tournament/_components/TournamentStatusTab.tsx#L8-L8:_constsimport를 절대 경로로 변경합니다.apps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsx#L7-L7:_constsimport를 절대 경로로 변경합니다.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:Props를ArchiveTournamentPageProps로 변경합니다.apps/web/src/app/archive/tournament/_components/TournamentStatusTab.tsx#L10-L13:Props를TournamentStatusTabProps로 변경합니다.apps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsx#L12-L14:Props를TournamentHistorySectionProps로 변경합니다.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
📒 Files selected for processing (21)
apps/web/src/apis/postCreateTournament.tsapps/web/src/app/archive/_common/_components/ArchivePageLayout.tsxapps/web/src/app/archive/tournament/_components/ArchiveTournamentClient.tsxapps/web/src/app/archive/tournament/_components/TournamentFab.tsxapps/web/src/app/archive/tournament/_components/TournamentHistoryContent.tsxapps/web/src/app/archive/tournament/_components/TournamentHistoryList.tsxapps/web/src/app/archive/tournament/_components/TournamentHistorySection.tsxapps/web/src/app/archive/tournament/_components/TournamentHistorySkeleton.tsxapps/web/src/app/archive/tournament/_components/TournamentStatusTab.tsxapps/web/src/app/archive/tournament/_consts/tournamentTab.tsapps/web/src/app/archive/tournament/page.tsxapps/web/src/app/archive/wish/page.tsxapps/web/src/app/home/_components/CreateTournamentDialog.tsxapps/web/src/app/home/_components/tournament-list/TournamentListSkeleton.tsxapps/web/src/app/home/_components/tournament-list/index.tsxapps/web/src/app/home/_types/tournament.tsapps/web/src/app/home/page.tsxapps/web/src/components/common/create-tournament-dialog/index.tsxapps/web/src/components/tournament-card/TournamentCardSkeleton.tsxapps/web/src/hooks/usePostCreateTournament.tsapps/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
bc9d726 to
6596484
Compare
작업 요약
archive/tournament(내 토너먼트) 화면을 UI 개선안에 맞춰 리팩터링했습니다.작업 내용
탭/컨테이너 구조를
TournamentHistorySection으로 통합 — 공용ArchivePageLayout과 중간 래퍼(ArchiveTournamentClient,TournamentHistoryContent)를 제거하고, 타이틀·탭·리스트를 하나의 섹션 컴포넌트로 정리.archive/wish페이지도 동일하게ArchivePageLayout의존을 걷어내고 인라인 레이아웃으로 맞춤목록 조회 CSR 전환 + Skeleton 적용 —
page.tsx에서 초기 탭 데이터만 prefetch해HydrationBoundary로 넘기고, 탭별 조회는Suspense(key={activeTab}) +TournamentHistoryList로 처리. 로딩 중에는TournamentCardSkeleton4개(TournamentHistorySkeleton)를 노출탭 전환을 클라이언트 상태로 변경해 즉시 반영 —
useState로 활성 탭을 관리하고,window.history.replaceState로 주소(?tab=)만 동기화. 서버 라운드트립 없이 탭이 바로 전환됨. 새로고침·공유 시엔searchParams의tab으로 초기 탭 복원탭 상태 매핑을
_consts/tournamentTab.ts로 분리 — 탭 값을in-progress → ongoing으로 변경하고,STATUS_BY_TAB(ongoing →PENDING/IN_PROGRESS, completed →COMPLETED)으로 탭↔조회 상태 매핑을 상수화. 탭 타입도 이 파일로 이동UI 개선안 반영 — 탭에 아이콘 추가(진행 중=장바구니, 완료=영수증), 토너먼트 만들기 FAB(
TournamentFab) 추가, 타이틀heading-1 → heading-1-bold적용미작업 사항
스크린샷
2026-07-21.5.37.34.mov
연관 이슈
related to #335
Summary by CodeRabbit
새로운 기능
개선