Skip to content

fix: 토너먼트 시작 후 참여자 화면에 담기 버튼이 남던 문제 - #496

Merged
ychany merged 2 commits into
devfrom
fix/483-hide-add-after-start
Aug 12, 2026
Merged

fix: 토너먼트 시작 후 참여자 화면에 담기 버튼이 남던 문제#496
ychany merged 2 commits into
devfrom
fix/483-hide-add-after-start

Conversation

@ychany

@ychany ychany commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

작업 요약

  • 주최자가 토너먼트를 시작한 뒤 참여자 화면에서 담기 + 버튼이 사라지도록 수정합니다.
  • 쿼리 파라미터로 열리는 담기 다이얼로그도 동일하게 차단합니다.

작업 세부 내용

+ 버튼 노출 조건이 isDepositClosed 만 보고 있었는데, 이 값은 ownerStarted 가 true 면 오히려 false 가 됩니다. 그래서 시작 이후에도 버튼이 남고, 누르면 409(시작 전에만 가능)만 돌아왔습니다.

원인 — 한 플래그가 두 의미를 겸함

const isDepositClosed = !isOwner && !ownerStarted && isExpired && isCollaborative;

isDepositClosed 는 "만료로 인한 마감" 개념이라 마감 안내 모달과 시작 버튼에서 쓰입니다. 여기서 !ownerStarted 는 의도된 조건입니다 — 시작했으면 마감 모달을 띄울 이유가 없기 때문입니다.

문제는 여기에 "담기 가능 여부" 판단까지 얹으면서 시작 이후 구멍이 생긴 점입니다.

담기 차단 플래그를 분리

기존 값을 건드리지 않고 담기 전용 플래그를 추가했습니다.

const isAddItemBlocked = isDepositClosed || (!tournamentData.isOwner && ownerStarted);

isDepositClosed 는 마감 모달·시작 버튼에서 그대로 쓰고, 바스켓 캐러셀에는 isAddItemBlocked 를 내려보냅니다.

다른 진입 경로 차단

이슈에서 확인 요청한 부분입니다. TournamentCreateClient 에 쿼리 파라미터(OPEN_GET_ITEM_DIALOG)로 열리는 담기 다이얼로그가 하나 더 있어, + 버튼만 숨기면 URL 로 우회됩니다. 같은 조건으로 막았습니다.

open={isGetItemDialogOpen && !isAddItemBlocked}

스크린샷

image

연관 이슈

closes #483

+ 버튼 노출이 isDepositClosed 만 보는데, 이 값은 ownerStarted 일 때
오히려 false 가 되어 시작 후에도 버튼이 남고 누르면 409 만 돌아왔다.

- 담기 차단 여부를 isAddItemBlocked 로 분리 (만료 마감 + 주최자 시작)
- 쿼리 파라미터로 열리는 담기 다이얼로그도 같은 조건으로 차단
@vercel

vercel Bot commented Aug 12, 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 Aug 12, 2026 5:07pm

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ychany, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cd9365ac-8820-46b2-b244-31493d8a2c11

📥 Commits

Reviewing files that changed from the base of the PR and between 3f4ef43 and 10e30a6.

📒 Files selected for processing (3)
  • apps/web/src/app/tournament/[id]/create/_components/TournamentCreateClient.tsx
  • apps/web/src/app/tournament/[id]/create/_components/tournament-item-basket/TournamentItemBasket.tsx
  • apps/web/src/app/tournament/[id]/create/_components/tournament-item-basket/TournamentItemBasketCarousel.tsx

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.

@github-actions
github-actions Bot requested a review from kanghaeun August 12, 2026 06:52
@github-actions github-actions Bot added fix Something isn't working WEB labels Aug 12, 2026
@github-actions

Copy link
Copy Markdown

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

@ychany
ychany merged commit 0512f8b into dev Aug 12, 2026
6 of 7 checks passed
@ychany
ychany deleted the fix/483-hide-add-after-start branch August 12, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Something isn't working WEB

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: 토너먼트 시작 후에도 참여자 화면에 담기 + 버튼이 남음

1 participant