refactor: 보관(위시리스트) 편집·삭제 화면 개선 - #364
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthrough위시리스트 삭제 모드와 선택 상태 관리가 재구성되고, 공용 Changes위시리스트 선택 및 삭제 흐름
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: 삭제 모드와 다이얼로그 닫기
Possibly related issues
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
There was a problem hiding this comment.
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삭제 실패 시 사용자 피드백이 없습니다.
useMutation에onError핸들러가 없어 삭제가 실패해도 아무 알림도 뜨지 않습니다. 성공 시에는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
⛔ Files ignored due to path filters (1)
apps/web/src/assets/icons/fill/trash.svgis excluded by!**/*.svg
📒 Files selected for processing (16)
apps/web/src/app/archive/_common/_components/ArchivePageLayout.tsxapps/web/src/app/archive/wish/_components/WishContentClient.tsxapps/web/src/app/archive/wish/_components/WishlistBottomBar.tsxapps/web/src/app/archive/wish/_components/WishlistFabArea.tsxapps/web/src/app/archive/wish/_components/WishlistList.tsxapps/web/src/app/archive/wish/_components/wish-grid/WishFailedCard.tsxapps/web/src/app/archive/wish/_components/wish-grid/WishProcessingCard.tsxapps/web/src/app/archive/wish/_components/wish-grid/index.tsxapps/web/src/app/archive/wish/_hooks/useDeleteWishes.tsapps/web/src/app/archive/wish/page.tsxapps/web/src/app/tournament/[id]/create/by-wish/_components/ByWishContent.tsxapps/web/src/app/tournament/[id]/create/by-wish/_components/WishSelectCard.tsxapps/web/src/app/tournament/[id]/create/by-wish/_components/WishSelectHeader.tsxapps/web/src/components/common/confirm-dialog/index.tsxapps/web/src/components/common/wish-card/index.tsxapps/web/src/components/tournament-card/TournamentDeleteDialog.tsx
…/depromeet/PIKI-Client into refactor/339-archive-edit-delete
작업 요약
작업 세부 내용
components/common/confirm-dialog로 공통 분리, TournamentDeleteDialog에도 적용작동 확인 영상
KakaoTalk_Video_2026-07-20-21-29-27.mp4
연관 이슈
closes #339
Summary by CodeRabbit