fix: 이미 참여한 게스트의 초대 링크 재진입 시 토너먼트로 바로 진입 - #385
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough초대 미리보기 응답에 토너먼트 참여 여부를 추가하고, 이미 참여한 요청자는 별도 조인 절차 없이 토너먼트 생성 화면으로 이동하도록 변경했습니다. Changes게스트 초대 재진입
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/web/src/app/invite/[id]/_components/InviteClient.tsx (1)
78-86: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win게스트 재진입 분기에 회귀 테스트를 추가해 주세요.
joined === true일 때TOURNAMENT_CREATE로 이동하고,false일 때 기존 join-by-link 경로로 이동하는 두 경우를 검증하면 이후 라우팅 변경으로 인한 회귀를 방지할 수 있습니다.🤖 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/invite/`[id]/_components/InviteClient.tsx around lines 78 - 86, InviteClient의 preview.joined 분기에 회귀 테스트를 추가하세요. joined가 true이면 ROUTES.TOURNAMENT_CREATE(tournamentId)로 이동하고 이후 join 흐름을 실행하지 않는지 검증하며, false이면 기존 join-by-link 경로가 실행되는지도 별도 테스트로 확인하세요.
🤖 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.
Nitpick comments:
In `@apps/web/src/app/invite/`[id]/_components/InviteClient.tsx:
- Around line 78-86: InviteClient의 preview.joined 분기에 회귀 테스트를 추가하세요. joined가
true이면 ROUTES.TOURNAMENT_CREATE(tournamentId)로 이동하고 이후 join 흐름을 실행하지 않는지 검증하며,
false이면 기존 join-by-link 경로가 실행되는지도 별도 테스트로 확인하세요.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 2e8c1af6-ac9f-40a6-99ac-1b5f4b646716
📒 Files selected for processing (2)
apps/web/src/app/invite/[id]/_components/InviteClient.tsxapps/web/src/app/tournament/join/_types/join.ts
| @@ -75,6 +75,15 @@ function InviteClient({ tournamentId, inviteCode }: InviteClientProps) { | |||
| return; | |||
There was a problem hiding this comment.
멤버일 떄도 이미 참여한 토너먼트면 Join 플로우 건너뛰어야 하는 거 아니야??
작업 내용
이미 참여한 게스트가 같은 초대 링크로 재진입할 때, join 플로우를 다시 거치지 않고 토너먼트로 바로 진입하도록 수정했습니다. (#286 의 미구현 항목)
문제
기존에는 게스트가 초대 링크로 재진입하면
InviteClient가 무조건 join 페이지로 보냈습니다.→ "참여하기" 버튼이 다시 뜨고, 누르면
postJoin이 409(이미 참여) 를 반환 → 에러 다이얼로그로 빠지는 막다른 길.변경
InviteClient의 게스트 분기에서 join 페이지로 보내기 전에getTournament(tournamentId)로 참여 여부를 먼저 확인합니다.TOURNAMENT_CREATE로 바로 진입 (join 우회)설계 노트
getTournament의 200/403 이 곧 "이 게스트가 참여자인지" 를 판별해 줍니다. (tournament/[id]/layout.tsx도 동일하게 403 → 홈 리다이렉트 가드를 사용 중)joinAsMemberAndGoToCreate)에도 유사한 409 이슈가 잠재하지만 이번 스코프에서는 제외했습니다.연관 이슈
closes #286
Summary by CodeRabbit