Skip to content

fix: 영수증 공유 버튼 연타 시 미지원 안내가 뜨던 문제 - #495

Merged
ychany merged 3 commits into
devfrom
fix/481-share-double-tap
Aug 12, 2026
Merged

fix: 영수증 공유 버튼 연타 시 미지원 안내가 뜨던 문제#495
ychany merged 3 commits into
devfrom
fix/481-share-double-tap

Conversation

@ychany

@ychany ychany commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

작업 요약

  • 영수증 공유 버튼 연타 시 미지원 안내 토스트가 뜨던 문제를 수정합니다.
  • 이미 공유가 진행 중이면 아무 안내 없이 무시하도록 변경합니다.
  • 스토리 공유 버튼에도 동일한 연타 가드를 적용합니다.

작업 세부 내용

공유 시트가 이미 열린 상태에서 navigator.share() 를 다시 호출하면 InvalidStateError(Safari 는 NotAllowedError) 가 발생합니다. 기존 코드는 AbortError 가 아니면 전부 unsupported 로 떨어뜨려, 실제로는 공유를 지원하는 환경인데도 미지원 안내가 노출됐습니다.

1. 중복 호출 에러를 별도 분류

busy 를 추가해 연타로 인한 중복 호출을 미지원과 구분합니다. 브라우저마다 에러 이름이 달라 InvalidStateError / NotAllowedError 를 함께 처리했습니다.

if (!(error instanceof DOMException)) return 'unsupported';
if (error.name === 'AbortError') return 'cancelled';
if (CONCURRENT_SHARE_ERROR_NAMES.includes(error.name)) return 'busy';
return 'unsupported';

2. 호출부 연타 가드

state 가 아닌 ref 로 막았습니다 — state 는 리렌더 후에야 버튼에 반영되는데 연타는 그 사이에 들어오기 때문입니다. 버튼 비활성화 표시용으로 state 도 함께 둡니다.

3. 스토리 공유도 동일 처리

useInstagramStoryShareisSharing 역시 state 로만 관리돼 같은 취약점이 있었습니다. 링크 공유와 동일하게 ref 가드를 넣고, 중복 호출은 busy 로 반환해 안내 없이 무시합니다.

연관 이슈

closes #481

ychany added 2 commits August 12, 2026 15:37
공유 시트가 열린 상태에서 navigator.share() 를 다시 호출하면
InvalidStateError/NotAllowedError 가 나는데, AbortError 가 아니라는
이유로 전부 unsupported 로 떨어져 엉뚱한 안내가 노출됐다.

- 중복 호출 에러를 'busy' 로 분류해 조용히 무시
- handleShareLink 에 ref 기반 연타 가드 추가 (리렌더 전 두 번째 클릭 차단)
- 공유 진행 중에는 링크 공유 버튼 비활성화 — 스토리 공유와 동일한 처리
isSharing 이 state 로만 관리돼 리렌더 전 두 번째 클릭을 막지 못했다.
링크 공유와 동일하게 ref 로 즉시 차단하고, 중복 호출은 'busy' 로
반환해 안내 없이 무시한다.
@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:04pm

@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: 58 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: 32dc7363-b374-4419-a9ec-bb2895eb84ee

📥 Commits

Reviewing files that changed from the base of the PR and between d461b37 and e31e202.

📒 Files selected for processing (3)
  • apps/web/src/app/tournament/[id]/result/_components/receipt-share-dialog/ReceiptShareDialog.tsx
  • apps/web/src/app/tournament/[id]/result/_utils/shareReceiptImage.ts
  • apps/web/src/hooks/useInstagramStoryShare.ts

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

Copy link
Copy Markdown

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

@github-actions github-actions Bot added fix Something isn't working WEB labels Aug 12, 2026
@ychany ychany changed the title Fix/481 share double tap fix: 영수증 공유 버튼 연타 시 미지원 안내가 뜨던 문제 Aug 12, 2026
@ychany
ychany merged commit 3f4ef43 into dev Aug 12, 2026
6 of 7 checks passed
@ychany
ychany deleted the fix/481-share-double-tap branch August 12, 2026 17:04
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