Skip to content

refactor: 보관(위시리스트) 편집·삭제 화면 개선 - #364

Merged
soyeong0115 merged 11 commits into
devfrom
refactor/339-archive-edit-delete
Jul 21, 2026
Merged

refactor: 보관(위시리스트) 편집·삭제 화면 개선#364
soyeong0115 merged 11 commits into
devfrom
refactor/339-archive-edit-delete

Conversation

@soyeong0115

@soyeong0115 soyeong0115 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

작업 요약

  • 위시리스트 편집·삭제 플로우 개선 (삭제 모드 분리, 전체선택, 확인 다이얼로그)
  • 공통 ConfirmDialog 컴포넌트 분리

작업 세부 내용

  • 헤더 우측 삭제 버튼 추가, 삭제 모드 진입 시 '전체선택 / 취소' 바로 전환
  • 삭제 모드 진입 시 하단 FAB 숨김 → '선택한 N개의 상품 삭제' CTA 등장
  • 체크박스 스타일: 미선택 시 내부 overlay 8 + stroke inverse 1.4px, 선택 시 체크 + 이미지 overlay 20 딤 처리
  • 삭제 확인 다이얼로그: "상품을 정말 삭제할까요? / 삭제 후에는 다시 복구할 수 없어요."
  • 확인 다이얼로그를 components/common/confirm-dialog로 공통 분리, TournamentDeleteDialog에도 적용
  • WishFailedCard / WishProcessingCard 크기 WishCard 기준으로 통일
  • WishCard 배경색 bg-layer-basement 적용, 이미지 비율 aspect-[201/166]로 조정

작동 확인 영상

KakaoTalk_Video_2026-07-20-21-29-27.mp4

연관 이슈

closes #339

Summary by CodeRabbit

  • 새 기능
    • 위시리스트 삭제를 위한 선택 기반 삭제 모드와 삭제 확인 대화상자가 추가되었습니다.
    • 삭제/확인 흐름에 사용할 공통 확인 다이얼로그 컴포넌트가 도입되었습니다.
  • 화면 개선
    • 위시리스트 하단 액션(선택 수/전체 선택/삭제 진입)과 FAB 영역이 삭제 모드에 맞게 재구성되었습니다.
    • 위시 카드(처리중/실패) 및 위시 그리드 선택 표시/간격이 개선되었습니다.
    • 토너먼트 삭제 확인창이 공통 확인 대화상자로 교체되었습니다.
    • 관련 레이아웃 여백과 스켈레톤 간격이 조정되었습니다.

@vercel

vercel Bot commented Jul 20, 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 21, 2026 12:27pm

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 32429869-24af-43f0-af57-493d4665af6f

📥 Commits

Reviewing files that changed from the base of the PR and between 5b58409 and 80b9acb.

📒 Files selected for processing (5)
  • apps/web/src/app/archive/wish/_components/WishContentClient.tsx
  • apps/web/src/app/archive/wish/_components/wish-grid/index.tsx
  • apps/web/src/app/tournament/[id]/create/by-wish/_components/ByWishContent.tsx
  • apps/web/src/app/tournament/[id]/create/by-wish/_components/WishSelectCard.tsx
  • apps/web/src/components/common/confirm-dialog/index.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
  • apps/web/src/components/common/confirm-dialog/index.tsx
  • apps/web/src/app/tournament/[id]/create/by-wish/_components/ByWishContent.tsx
  • apps/web/src/app/archive/wish/_components/wish-grid/index.tsx
  • apps/web/src/app/archive/wish/_components/WishContentClient.tsx

📝 Walkthrough

Walkthrough

위시리스트 삭제 모드와 선택 상태 관리가 재구성되고, 공용 ConfirmDialog가 추가되었습니다. 위시 카드·그리드 레이아웃과 토너먼트 위시 선택 화면의 헤더, 체크 UI, CTA도 변경되었습니다.

Changes

위시리스트 선택 및 삭제 흐름

Layer / File(s) Summary
공용 확인 다이얼로그 및 삭제 연동
apps/web/src/components/common/confirm-dialog/index.tsx, apps/web/src/components/tournament-card/TournamentDeleteDialog.tsx
ConfirmDialog가 경고 아이콘, 취소·확인 버튼, pending 상태를 지원하도록 추가되고 토너먼트 삭제 화면에 연결되었습니다.
위시리스트 선택 및 삭제 상태 관리
apps/web/src/app/archive/wish/_hooks/useDeleteWishes.ts, apps/web/src/app/archive/wish/_components/WishContentClient.tsx
삭제 훅이 선택·전체 선택·삭제 실행 API와 성공 콜백을 제공하며, WishContentClient가 선택 가능 항목, 삭제 모드 및 확인 다이얼로그 상태를 관리합니다.
위시리스트 컨트롤 및 카드 레이아웃
apps/web/src/app/archive/wish/_components/*, apps/web/src/components/common/wish-card/index.tsx, apps/web/src/app/archive/_common/...
삭제 CTA와 추가 FAB 동작, 선택 오버레이, 처리·실패 카드, 공통 위시 카드, 그리드 간격 및 페이지 패딩이 변경되었습니다.
위시 선택 화면 레이아웃
apps/web/src/app/tournament/[id]/create/by-wish/_components/*
화면 상단 헤더가 추가되고 선택 카드의 체크 UI, 안내 문구, 하단 CTA 구성이 변경되었습니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant WishContentClient
  participant WishlistBottomBar
  participant ConfirmDialog
  participant useDeleteWishes
  WishContentClient->>WishlistBottomBar: selectedCount와 삭제 콜백 전달
  WishlistBottomBar->>ConfirmDialog: 삭제 확인 열기
  ConfirmDialog->>useDeleteWishes: handleDeleteWishes 호출
  useDeleteWishes-->>WishContentClient: 삭제 성공 및 선택 초기화
  WishContentClient->>ConfirmDialog: 삭제 모드와 다이얼로그 닫기
Loading

Possibly related issues

  • #339: 위시리스트 전체 선택, 삭제 모드, 삭제 CTA 및 확인 다이얼로그 개선 목표와 직접 연결됩니다.
  • #338: by-wish 화면과 공통 WishCard 스타일 변경 범위가 겹칩니다.

Possibly related PRs

  • TeamPiKi/client#322: useDeleteWishes의 삭제 성공 처리와 상태 초기화 흐름이 연결됩니다.
  • TeamPiKi/client#347: /archive/wish 삭제 훅과 관련 컴포넌트 구조를 직접 확장합니다.
  • TeamPiKi/client#357: 위시 그리드의 선택 체크박스 렌더링을 함께 변경합니다.

Suggested labels: WEB

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Several changes touch unrelated tournament by-wish components and archive/page layout tweaks that are outside the wishlist edit/delete scope. Remove or split the unrelated tournament and layout changes into a separate PR focused on the wishlist edit/delete flow.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the archive wishlist edit/delete screen refactor and matches the main changes.
Linked Issues check ✅ Passed The wishlist delete flow, select-all/cancel controls, delete CTA, overlay styling, and confirm dialog requirements are implemented.
✨ 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 refactor/339-archive-edit-delete

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Comment @coderabbitai help to get the list of available commands.

@soyeong0115 soyeong0115 added feature New feature or request refactor Extra attention is needed style labels Jul 20, 2026
@soyeong0115 soyeong0115 self-assigned this Jul 20, 2026

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

Actionable comments posted: 1

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/wish/_hooks/useDeleteWishes.ts (1)

11-22: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

삭제 실패 시 사용자 피드백이 없습니다.

useMutationonError 핸들러가 없어 삭제가 실패해도 아무 알림도 뜨지 않습니다. 성공 시에는 toast.success가 있으므로, 실패 시에도 toast.error로 사용자에게 알려주는 것이 좋습니다.

🔧 onError 핸들러 추가 제안
     onSuccess: (_, wishIds) => {
       queryClient.invalidateQueries({ queryKey: ['wishlists'] });
       wishIds.forEach(wishId => {
         queryClient.invalidateQueries({ queryKey: ['wish', wishId] });
       });
       setSelectedIds(new Set());
       options?.onSuccess?.();
       toast.success('선택한 위시를 삭제했어요');
     },
+    onError: () => {
+      toast.error('상품 삭제에 실패했어요. 다시 시도해 주세요');
+    },
🤖 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/wish/_hooks/useDeleteWishes.ts` around lines 11 -
22, useDeleteWishes의 useMutation 설정에 onError 핸들러를 추가해 deleteWishes 실패 시
toast.error로 사용자에게 삭제 실패를 알리세요. 기존 onSuccess 처리와 성공 알림은 유지하고, 실패 경로에서 적절한 한국어 오류
메시지를 표시하세요.
🧹 Nitpick comments (2)
apps/web/src/app/archive/wish/_components/wish-grid/index.tsx (1)

42-42: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

선택 오버레이의 className을 100자 폭에 맞게 분리해 주세요.

현재 한 줄이 설정된 print width를 크게 초과합니다. As per coding guidelines, print width of 100 규칙을 적용해 주세요.

🤖 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/wish/_components/wish-grid/index.tsx` at line 42,
Wish-grid의 선택 오버레이 div에서 긴 className 템플릿 문자열을 여러 줄로 분리해 print width 100 규칙을
준수하세요. `isSelected`에 따른 opacity 동작과 기존 클래스 값은 그대로 유지하세요.

Source: Coding guidelines

apps/web/src/app/archive/wish/_components/WishContentClient.tsx (1)

71-97: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

커스텀 체크박스에 접근성 시맨틱스 누락.

전체선택 토글(라인 73-89)이 시각적으로만 체크 상태를 표현하고 있어, 스크린리더 사용자는 "전체선택, 버튼"만 듣고 현재 선택 여부를 알 수 없습니다. role="checkbox"aria-checked={isAllSelected}를 버튼에 추가하는 것을 권장합니다.

♿ aria 속성 추가 제안
             <button
               type="button"
               onClick={handleToggleSelectAll}
+              role="checkbox"
+              aria-checked={isAllSelected}
               className="flex w-[110px] cursor-pointer items-center gap-2"
             >
🤖 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/wish/_components/WishContentClient.tsx` around lines
71 - 97, Update the select-all button handled by handleToggleSelectAll to expose
checkbox semantics by adding role="checkbox" and binding aria-checked to
isAllSelected, while preserving its existing click behavior and visual state.
🤖 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.

Inline comments:
In
`@apps/web/src/app/tournament/`[id]/create/by-wish/_components/ByWishContent.tsx:
- Line 63: Update the title rendered through the center prop in ByWishContent to
use a semantic h1 element instead of p, while preserving the existing heading-1
class and text.

---

Outside diff comments:
In `@apps/web/src/app/archive/wish/_hooks/useDeleteWishes.ts`:
- Around line 11-22: useDeleteWishes의 useMutation 설정에 onError 핸들러를 추가해
deleteWishes 실패 시 toast.error로 사용자에게 삭제 실패를 알리세요. 기존 onSuccess 처리와 성공 알림은 유지하고,
실패 경로에서 적절한 한국어 오류 메시지를 표시하세요.

---

Nitpick comments:
In `@apps/web/src/app/archive/wish/_components/wish-grid/index.tsx`:
- Line 42: Wish-grid의 선택 오버레이 div에서 긴 className 템플릿 문자열을 여러 줄로 분리해 print width
100 규칙을 준수하세요. `isSelected`에 따른 opacity 동작과 기존 클래스 값은 그대로 유지하세요.

In `@apps/web/src/app/archive/wish/_components/WishContentClient.tsx`:
- Around line 71-97: Update the select-all button handled by
handleToggleSelectAll to expose checkbox semantics by adding role="checkbox" and
binding aria-checked to isAllSelected, while preserving its existing click
behavior and visual state.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 60be708c-9309-454e-8cb3-b72e2c17e754

📥 Commits

Reviewing files that changed from the base of the PR and between 598ee54 and da66e06.

⛔ Files ignored due to path filters (1)
  • apps/web/src/assets/icons/fill/trash.svg is excluded by !**/*.svg
📒 Files selected for processing (16)
  • apps/web/src/app/archive/_common/_components/ArchivePageLayout.tsx
  • apps/web/src/app/archive/wish/_components/WishContentClient.tsx
  • apps/web/src/app/archive/wish/_components/WishlistBottomBar.tsx
  • apps/web/src/app/archive/wish/_components/WishlistFabArea.tsx
  • apps/web/src/app/archive/wish/_components/WishlistList.tsx
  • apps/web/src/app/archive/wish/_components/wish-grid/WishFailedCard.tsx
  • apps/web/src/app/archive/wish/_components/wish-grid/WishProcessingCard.tsx
  • apps/web/src/app/archive/wish/_components/wish-grid/index.tsx
  • apps/web/src/app/archive/wish/_hooks/useDeleteWishes.ts
  • apps/web/src/app/archive/wish/page.tsx
  • apps/web/src/app/tournament/[id]/create/by-wish/_components/ByWishContent.tsx
  • apps/web/src/app/tournament/[id]/create/by-wish/_components/WishSelectCard.tsx
  • apps/web/src/app/tournament/[id]/create/by-wish/_components/WishSelectHeader.tsx
  • apps/web/src/components/common/confirm-dialog/index.tsx
  • apps/web/src/components/common/wish-card/index.tsx
  • apps/web/src/components/tournament-card/TournamentDeleteDialog.tsx

Comment thread apps/web/src/app/tournament/[id]/create/by-wish/_components/ByWishContent.tsx Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request refactor Extra attention is needed style

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: 보관(위시리스트) 편집·삭제 화면 개선

1 participant