Skip to content

feat: 폴더 상세 폴더 API 연결 (3단계) - #779

Merged
ychany merged 8 commits into
devfrom
feat/733-folder-detail
Nov 2, 2026
Merged

ychany merged 8 commits into
devfrom
feat/733-folder-detail

Conversation

@ychany

@ychany ychany commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

작업 요약

  • 폴더 상세의 목록 · 빼기 · 다른 폴더로 이동을 API 로 연결합니다
  • 폴더에 내 위시 가져오기를 API 로 연결합니다
  • 폴더 상세에서 링크 · 이미지로 등록할 때 폴더를 바로 지정합니다
  • 위시·폴더 화면 실제 API 전환 #733 API 연동 4개 PR 중 3번째입니다

작업 세부 내용

머지 조건

  • base 는 feat: 전체 위시 탭 위시 API 연결 (2단계) #778 브랜치(feat/733-all-wishes). 이 PR diff 에는 3번째 작업만 보임
  • 앞 PR 머지 후 dev 위로 rebase 하고 base 를 dev 로 변경
  • 서버 폴더 API dev 반영 완료. dev 서버로 실제 흐름 확인하고 머지
  • 폴더 지정 등록은 서버 3단계(core #1271) 머지 후 확인
    • 그 전까지 서버가 folderId 를 무시해 위시만 등록되고 폴더에는 안 들어감

폴더 상세

  • 폴더 정보는 폴더 목록 조회 응답에서 찾아 사용
    • 원인: 폴더 단건 조회 API 없음
    • 없는 폴더면 기존대로 안내 후 폴더 탭으로 이동
  • 폴더 안 위시는 folderId 목록 조회 무한 스크롤
    • 폴더가 있을 때만 조회. 화면을 폴더 확인용 바깥 컴포넌트와 목록용 안쪽 컴포넌트로 나눔
      • 원인: 없는 폴더로 조회하면 404 가 Suspense 쿼리를 통해 에러 화면으로 빠짐
  • 상품 개수는 폴더의 wishCount
  • 페이지에서 폴더 목록 · 폴더 위시 서버 프리페치

편집 모드

동작 API 안내
삭제 (폴더에서 빼기) DELETE /folders/{id}/wishes?wishIds= · 전체 선택이면 ?all=true 폴더에서 상품 N개를 삭제했어요.
다른 폴더로 이동 POST /folders/{id}/wishes/move · 전체 선택이면 all: true 상품을 'OO' 폴더로 이동했어요.
  • 이동은 move API 한 번으로 처리
    • 원인: 빼기와 넣기를 따로 부르면 중간 실패 시 위시가 두 폴더에 있거나 어디에도 없는 상태가 남음
  • 전체 선택은 서버 all 옵션으로 요청
    • 아직 불러오지 않은 위시까지 포함. 100개 제한 없음
    • 선택 개수는 폴더 wishCount 로 표시
    • 전체 선택 중 하나를 해제하면 불러온 위시 기준 개별 선택으로 전환

내 위시에서 가져오기

  • 후보는 excludeFolderId 목록 조회. 이미 든 위시는 서버가 제외
  • 상품 개수는 위시 개수 API(excludeFolderId)로 표시
  • 선택 상한 100개. 초과 선택 시 FOLDER-003 문구 토스트
    • 원인: 넣기 API 한 번에 최대 100개. 나눠 보내면 중간 실패 시 일부만 들어감
  • 추가 후 폴더 상세로 복귀

폴더 지정 등록

  • 링크 · 이미지 등록 요청에 선택 필드 folderId 추가

  • ByLinkDialog · ByImageDialog 가 folderId 를 받아 등록 훅에 전달

  • folderId 를 주면 등록 후 옛 위시 화면(/archive/wish)으로 이동하지 않음

  • 이미 담은 링크를 폴더에서 다시 담으면 서버가 201 과 folderResult 를 줌 (core #1271)

folderResult 의미 안내
null 새 위시 없음
ADDED 기존 위시를 폴더에 넣음 이미 담은 상품을 폴더에 추가했어요.
ALREADY_IN_FOLDER 이미 이 폴더에 있음 이미 이 폴더에 있는 상품이에요.
  • 위험: 안내 문구는 임시. 시안에 없어 디자인 확인 필요
  • 이미 담은 링크면 위시 등록 완료 분석 이벤트 제외
    • 원인: 새로 담은 위시가 아님. 서버도 등록 한도에 세지 않음
등록 위치 이전 이후
폴더 상세 등록 후 옛 위시 화면으로 이동 폴더 상세에 머물고 폴더 · 위시 목록 갱신
그 외 (옛 위시 화면 · 토너먼트) 기존 동작 동일

정리

  • formatWishCount 유틸 분리. 전체 위시 · 폴더 상세 · 가져오기가 같이 사용
  • 폴더에 담기 성공 문구를 훅에서 호출 화면으로 이동
    • 원인: 전체 위시는 토스트, 가져오기는 화면 복귀로 안내가 다름

테스트

  • e2e specs/wish/folderDetail.spec.ts 10개 추가
    • 진입 · 없는 폴더 · 빼기 · 이동 · 가져오기 · 폴더 지정 링크 등록
    • 전체 선택 빼기(all=true) · 전체 선택 옮기기(all: true)
    • 이미 담은 링크 ADDED · ALREADY_IN_FOLDER 안내
  • 등록 다이얼로그 공유처 확인: 옛 위시 화면 · 토너먼트 담기 e2e 22개 통과

다음 PR

  • feat/733-cleanup: 토너먼트 폴더 칩 연결 · 목 데이터 삭제

스크린샷

화면 변화 없음

연관 이슈

@ychany ychany added feature New feature or request WEB labels Oct 30, 2026
@ychany ychany self-assigned this Oct 30, 2026
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
piki Ready Ready Preview Nov 2, 2026 11:45am UTC
1 Skipped Deployment
Project Deployment Actions Updated
piki-notify Skipped Skipped Nov 2, 2026 11:45am UTC

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

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

Next included review available in 33 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7949ac60-7b98-464d-9df6-8afd861e3f10
Commits

Reviewing files that changed from the base of the PR and between ee1bf36 and 7740409.

Files selected for processing: 21
  • apps/web/e2e/specs/wish/folderDetail.spec.ts
  • apps/web/src/apis/postWishLink.ts
  • apps/web/src/app/wish/_common/_consts/folder.ts
  • apps/web/src/app/wish/_common/_hooks/usePostFolderWishes.ts
  • apps/web/src/app/wish/_common/_utils/formatWishCount.ts
  • apps/web/src/app/wish/_components/WishListContent.tsx
  • apps/web/src/app/wish/_components/WishTabSummary.tsx
  • apps/web/src/app/wish/folder/[folderId]/_components/FolderDetailContent.tsx
  • apps/web/src/app/wish/folder/[folderId]/_components/FolderWishAddDialog.tsx
  • apps/web/src/app/wish/folder/[folderId]/_hooks/useDeleteFolderWishes.ts
  • apps/web/src/app/wish/folder/[folderId]/_hooks/usePostFolderWishesMove.ts
  • apps/web/src/app/wish/folder/[folderId]/add/_components/FolderWishSelectContent.tsx
  • apps/web/src/app/wish/folder/[folderId]/add/page.tsx
  • apps/web/src/app/wish/folder/[folderId]/page.tsx
  • apps/web/src/components/get-item-dialog/ByImageDialog.tsx
  • apps/web/src/components/get-item-dialog/ByLinkDialog.tsx
  • apps/web/src/consts/folder.ts
  • apps/web/src/hooks/usePostWishLink.ts
  • apps/web/src/hooks/usePostWishOCR.ts
  • apps/web/src/types/folder.ts
  • apps/web/src/types/wish.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@ychany

ychany commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ychany

ychany commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

- 링크 · 이미지 등록 요청에 선택 필드 folderId 추가
- 등록 다이얼로그가 folderId 를 받아 등록 훅에 전달
- folderId 를 주면 등록 후 옛 위시 화면으로 이동하지 않고 폴더 목록도 갱신
  - 원인: 폴더 상세에서 등록하면 그 자리에서 결과를 봐야 함
- 999+ 상한과 다음 페이지 + 표시를 formatWishCount 로 분리
  - 원인: 전체 위시 · 폴더 상세 · 가져오기 화면이 같이 사용
- usePostFolderWishes 가 담은 폴더를 onSuccess 로 넘김
  - 원인: 전체 위시 · 가져오기 화면의 안내가 다름
- 폴더 정보를 폴더 목록 조회 응답에서 찾아 사용
  - 원인: 폴더 단건 조회 API 없음
  - 없는 폴더면 기존대로 안내 후 폴더 탭으로 이동
- 폴더 안 위시를 folderId 목록 조회 무한 스크롤로 교체
  - 폴더가 있을 때만 조회
    - 원인: 없는 폴더로 조회하면 404 로 에러 화면에 빠짐
- 상품 개수는 폴더의 wishCount 사용
- 편집 모드 빼기 · 다른 폴더로 이동을 API 로 연결
  - 이동은 move API 한 번으로 처리
- 페이지에서 폴더 목록 · 폴더 위시 서버 프리페치
- 후보 목록을 excludeFolderId 목록 조회 무한 스크롤로 교체
  - 이미 폴더에 든 위시는 서버가 제외
- 선택한 위시를 폴더에 넣기 API 로 추가 후 폴더 상세로 복귀
- 선택 상한 100개
  - 원인: 넣기 API 한 번에 최대 100개. 나눠 보내면 중간 실패 시 일부만 들어감
- 페이지에서 폴더 목록 · 후보 목록 서버 프리페치
- 폴더 상세 진입 · 없는 폴더 안내 · 폴더에서 빼기 · 다른 폴더로 이동
- 내 위시에서 가져오기 · 폴더 지정 링크 등록
- 전체 선택이면 빼기 · 옮기기를 all 로 요청
  - 불러오지 않은 위시까지 포함. 100개 제한 해소
  - 선택 개수는 폴더 wishCount 로 표시
  - 전체 선택 중 하나를 해제하면 불러온 위시 기준 개별 선택으로 전환
- 가져오기 화면 상품 개수를 위시 개수 API 로 교체
- formatWishCount 의 다음 페이지 + 인자 제거
  - 원인: 개수를 모두 개수 API · wishCount 로 받음
- e2e 빼기 요청 확인을 쿼리 기준으로 변경 · 전체 선택 빼기 · 옮기기 시나리오 추가
- 링크 등록 응답에 folderResult 선택 필드 추가
  - 원인: 서버 3단계(core #1271)가 이미 담은 링크를 폴더에서 다시 담으면 201 과 결과를 줌
- ADDED · ALREADY_IN_FOLDER 면 토스트 안내
  - 문구는 임시. 디자인 확인 필요
- 이미 담은 링크면 위시 등록 완료 이벤트 제외
  - 원인: 새로 담은 위시가 아님
- e2e 시나리오 2개 추가
@ychany
ychany force-pushed the feat/733-folder-detail branch from 800a509 to 7740409 Compare November 2, 2026 11:45
@vercel
vercel Bot temporarily deployed to Preview – piki-notify November 2, 2026 11:45 Inactive
@ychany
ychany merged commit 437b1fa into dev Nov 2, 2026
7 checks passed
@ychany
ychany deleted the feat/733-folder-detail branch November 2, 2026 11:47

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – piki — 7740409a Deployed Nov 2, 2026 by vercel[bot]
Preview – piki-notify — 7740409a Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request WEB

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant