Skip to content

fix: 이미 참여한 게스트의 초대 링크 재진입 시 토너먼트로 바로 진입 - #385

Merged
iOdiO89 merged 5 commits into
devfrom
fix/286-guest-reentry
Jul 27, 2026
Merged

fix: 이미 참여한 게스트의 초대 링크 재진입 시 토너먼트로 바로 진입#385
iOdiO89 merged 5 commits into
devfrom
fix/286-guest-reentry

Conversation

@ychany

@ychany ychany commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

작업 내용

이미 참여한 게스트가 같은 초대 링크로 재진입할 때, join 플로우를 다시 거치지 않고 토너먼트로 바로 진입하도록 수정했습니다. (#286 의 미구현 항목)

문제

기존에는 게스트가 초대 링크로 재진입하면 InviteClient 가 무조건 join 페이지로 보냈습니다.
→ "참여하기" 버튼이 다시 뜨고, 누르면 postJoin409(이미 참여) 를 반환 → 에러 다이얼로그로 빠지는 막다른 길.

"유효 토큰 있는데 새 게스트 발급" 은 이미 방지돼 있었고(proxy handleGuestLogin, #288), 이번엔 남아 있던 "재진입 시 join 우회 → 토너먼트 직접 진입" 을 구현했습니다.

변경

InviteClient 의 게스트 분기에서 join 페이지로 보내기 전에 getTournament(tournamentId) 로 참여 여부를 먼저 확인합니다.

  • 200 (이미 참여)TOURNAMENT_CREATE 로 바로 진입 (join 우회)
  • 403 (미참여) → 기존대로 join 페이지로 이동
  • 그 외 에러 → 기존 catch 로 전파

설계 노트

  • 백엔드 변경 없음 — 기존 getTournament 의 200/403 이 곧 "이 게스트가 참여자인지" 를 판별해 줍니다. (tournament/[id]/layout.tsx 도 동일하게 403 → 홈 리다이렉트 가드를 사용 중)
  • 409 를 판별에 쓰지 않은 이유 — 409 는 "만료 · 이미 참여 · 이미 시작" 이 뒤섞여 있어(해당 파일 TODO 주석 참고), 참여 판별에 쓰면 만료 링크도 통과시킬 위험이 있습니다. 200 은 "실제 접근 가능" 을 명확히 보장.
  • 범위 — 이슈 fix: 유효한 게스트 토큰이 있어도 초대 링크 재진입 시 새 게스트 발급되는 오류 수정 #286 대상인 게스트 경로만 처리. 회원 경로(joinAsMemberAndGoToCreate)에도 유사한 409 이슈가 잠재하지만 이번 스코프에서는 제외했습니다.

연관 이슈

closes #286

Summary by CodeRabbit

  • 개선 사항
    • 초대 미리보기 응답에 참여 여부(joined)를 포함해, 이미 참여 중인 경우 별도 절차 없이 토너먼트 생성 화면으로 즉시 이동합니다.
    • 초대 미리보기 한 번으로 참여 상태를 확인해 이동 흐름을 더 단순화했습니다.
    • 참여하지 않은 경우에는 기존과 동일한 초대/조인 흐름을 유지하며, 반복 조회나 불필요한 단계가 줄어 이동 시간이 단축되고 화면 전환이 더 매끄럽습니다.

@vercel

vercel Bot commented Jul 25, 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 27, 2026 3:16pm

@github-actions

Copy link
Copy Markdown

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

@github-actions
github-actions Bot requested a review from iOdiO89 July 25, 2026 15:20
@coderabbitai

coderabbitai Bot commented Jul 25, 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: 9189f8b4-d900-4009-ad1f-f667cad12670

📥 Commits

Reviewing files that changed from the base of the PR and between 6de6c34 and b26beea.

📒 Files selected for processing (1)
  • apps/web/src/app/invite/[id]/_components/InviteClient.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/app/invite/[id]/_components/InviteClient.tsx

📝 Walkthrough

Walkthrough

초대 미리보기 응답에 토너먼트 참여 여부를 추가하고, 이미 참여한 요청자는 별도 조인 절차 없이 토너먼트 생성 화면으로 이동하도록 변경했습니다.

Changes

게스트 초대 재진입

Layer / File(s) Summary
게스트 참여 여부 확인 및 라우팅
apps/web/src/app/tournament/join/_types/join.ts, apps/web/src/app/invite/[id]/_components/InviteClient.tsx
초대 미리보기 타입에 joined 필드를 추가하고, 참여 상태가 참이면 기존 조인 경로 대신 토너먼트 생성 화면으로 이동합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • #390: preview.joined를 활용한 초대 플로우 라우팅 변경과 직접적으로 연관됩니다.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 초대 링크 재진입 시 이미 참여한 게스트를 토너먼트로 바로 보내는 핵심 변경을 잘 요약합니다.
Linked Issues check ✅ Passed 기존 게스트 세션이 있으면 join 플로우를 건너뛰고 바로 토너먼트로 진입하도록 바뀌어 이슈 요구와 일치합니다.
Out of Scope Changes check ✅ Passed 변경은 초대 재진입 분기와 관련 타입 추가에 국한되어 있어 범위를 벗어난 수정은 보이지 않습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 fix/286-guest-reentry

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.

❤️ Share

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.

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between 62300b6 and 6de6c34.

📒 Files selected for processing (2)
  • apps/web/src/app/invite/[id]/_components/InviteClient.tsx
  • apps/web/src/app/tournament/join/_types/join.ts

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

코멘트 하나만 확인해줘 ~~ 후속 이슈 #390 도 발행했어

Comment on lines 73 to 75
@@ -75,6 +75,15 @@ function InviteClient({ tournamentId, inviteCode }: InviteClientProps) {
return;

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.

멤버일 떄도 이미 참여한 토너먼트면 Join 플로우 건너뛰어야 하는 거 아니야??

@iOdiO89
iOdiO89 merged commit f4261f6 into dev Jul 27, 2026
11 checks passed
@iOdiO89
iOdiO89 deleted the fix/286-guest-reentry branch July 27, 2026 15:17
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.

fix: 유효한 게스트 토큰이 있어도 초대 링크 재진입 시 새 게스트 발급되는 오류 수정

2 participants