Skip to content

feat(user): 주문 카드에 hasReviewableItem 노출#79

Merged
chanwoo7 merged 2 commits intodevelopfrom
feat/mypage-figma-order-card-cta
Apr 29, 2026
Merged

feat(user): 주문 카드에 hasReviewableItem 노출#79
chanwoo7 merged 2 commits intodevelopfrom
feat/mypage-figma-order-card-cta

Conversation

@chanwoo7
Copy link
Copy Markdown
Member

Summary

  • 마이페이지 figma 04-order-list 명세 '픽업 완료 상태일 경우 리뷰 작성 버튼 노출' 정책을 카드 단위로 노출 가능하도록 백엔드에 hasReviewableItem 필드 추가
  • 조건: status === PICKED_UP && (active 리뷰 미작성 item이 1건이라도 존재)
  • 단일 IN 쿼리로 조회하여 N+1 회피

변경 사항

  • SDL MyOrderSummary에 hasReviewableItem: Boolean! 추가
  • TS DTO 동기화 + codegen 갱신
  • OrderRepository.findReviewableOrderIds 신규 (account_id로 안전 필터, distinct order_id)
  • user-order.service.listMyOrders 매핑에 hasReviewableItem 계산
  • 회귀 테스트 6건
    • 미작성 item → true
    • 모든 item active 리뷰 → false
    • 모든 item soft-delete 리뷰 → true
    • CONFIRMED 비-PICKED_UP → false
    • CANCELED → false
    • PICKED_UP 혼합(일부 작성/일부 미작성) → true

Breaking 여부

  • ❌ Breaking 아님. non-null 필드 추가지만 GraphQL은 모르는 필드를 무시
  • 마이그레이션: 없음

Test plan

  • 로컬 yarn test:cov 통과 (846 tests)
  • CI check 통과
  • CI coverage-report 통과
  • CodeQL 통과

마이페이지 figma 04-order-list 명세 '픽업 완료 상태일 경우 리뷰 작성 버튼 노출'을
백엔드 카드 단위로 노출 가능하도록 hasReviewableItem 필드를 추가한다.

조건: status === PICKED_UP && (active 리뷰 미작성 item이 1건이라도 존재).

- SDL MyOrderSummary에 hasReviewableItem: Boolean! 추가
- TS DTO 동기화
- OrderRepository.findReviewableOrderIds 메서드 신규 (단일 IN 쿼리, N+1 회피)
- user-order.service에서 list 매핑 시 set 조회 후 hasReviewableItem 계산
- 회귀 테스트 6건 (미작성/active리뷰/soft-delete/CONFIRMED/CANCELED/혼합)
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 07ba1c93-2343-4290-a28d-120089ded248

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/mypage-figma-order-card-cta

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 and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 96.61% 2819/2918
🟢 Branches 86.61% 1611/1860
🟢 Functions 93.13% 596/640
🟢 Lines 96.95% 2571/2652

Test suite run success

847 tests passing in 75 suites.

Report generated by 🧪jest coverage report action from 0779ac9

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

orderRepository.findReviewableOrderIds의 빈 배열 early return 분기 커버.
codecov patch coverage가 100%가 되도록 보강.
@chanwoo7 chanwoo7 merged commit ef9eb87 into develop Apr 29, 2026
9 checks passed
@chanwoo7 chanwoo7 deleted the feat/mypage-figma-order-card-cta branch April 29, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant