Skip to content

feat(product): 홈 카드 3종에 storeId 노출 (FE 상세 URL 대응) - #191

Merged
chanwoo7 merged 1 commit into
developfrom
feat/home-card-store-id
Aug 20, 2026
Merged

feat(product): 홈 카드 3종에 storeId 노출 (FE 상세 URL 대응)#191
chanwoo7 merged 1 commit into
developfrom
feat/home-card-store-id

Conversation

@chanwoo7

@chanwoo7 chanwoo7 commented Aug 20, 2026

Copy link
Copy Markdown
Member

배경

프론트의 상세 화면 URL 구조가 매장 id를 포함하는 형태입니다.

  • 상품 상세: /store/{storeId}/products/{productId}
  • 후기 상세: /store/{storeId}/reviews/{reviewId}

그런데 홈 신설 API의 카드 응답에는 상품/후기 id만 있어서, 카드를 탭했을 때 기존 상세 화면으로 바로 이동할 수 없습니다.

프론트에서 카드 클릭 시마다 상세 조회를 한 번 더 해서 storeId를 알아내는 우회도 가능하지만, 클릭마다 불필요한 요청이 생기고 URL 구조와도 어긋나므로 홈 응답에 storeId를 함께 포함하기로 했습니다.

변경 내용

세 카드 타입에 storeId: ID! 필드를 추가했습니다. 모두 additive 변경이라 기존 필드·쿼리는 영향이 없습니다.

  • PopularCake.storeId — 상황별 인기 케이크 카드
  • RandomCake.storeId — 랜덤 케이크 그리드 셀
  • CustomCakeShowcaseItem.storeId — 제작 후기 카드 (후기 상세 URL 구성용)

세 조회 모두 원본 데이터가 이미 매장 id를 갖고 있습니다 — 상품 카드 두 종은 product.store_id, 제작 후기는 review.store_id. 따라서 추가 쿼리나 조인 없이 기존 select에 컬럼 하나를 더하고 매핑에 노출하는 것으로 끝나며, 응답 비용 변화도 사실상 없습니다.

검증

  • 기존 매핑 테스트 3곳(인기 케이크 카드 매핑, 랜덤 케이크 썸네일 매핑 루프, resolver 통합 2건)에 storeId 검증을 추가해 세 타입 모두 실제 매장 id가 매핑되는 것을 확인했습니다. 관련 스위트 33건 통과.
  • yarn validate(lint + tsc + dto:check + arch:check + 커버리지 포함 전체 테스트) 통과.
  • 프론트 가이드 문서(docs/guide-to-frontend/guide-home-screen.md, gitignore 경로)에도 세 쿼리 예시에 storeId를 반영해 두었습니다.

프론트 상세 화면 URL이 /store/{storeId}/products/{productId},
/store/{storeId}/reviews/{reviewId} 구조라 홈 카드 클릭 시 storeId가
필요하다는 FE 요청 반영. 카드마다 상세 조회로 storeId를 알아내는
추가 요청을 없앤다.

- popularCakes.items[].storeId / randomCakes.items[].storeId /
  customCakeShowcase[].storeId 추가 (additive, 기존 필드 불변)
- 세 조회 모두 원본 row가 store_id를 이미 갖고 있어(상품 store_id,
  리뷰 store_id) select 확장 + 매핑만으로 처리 — 추가 쿼리 없음

회귀: 기존 매핑 테스트 3곳에 storeId 검증 추가(33건 통과).
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

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 Plus

Run ID: 8c737553-6fe0-46e7-b82f-1f17e3f73917

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

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

🩺 NestJS Doctor — 89/100 (Good)

진단 277건 (error 0).

Category error warning info
architecture 0 0 13
correctness 0 124 0
performance 0 24 17
schema 0 0 86
security 0 13 0
architecture / security 상위 항목
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal type 'IAuditLogRepository'.
  • warning security/security/no-exposed-env-vars: Direct 'process.env.NODE_ENV' access in 'AuthController'. Use ConfigService instead.
  • warning security/security/require-guards-on-endpoints: Endpoint 'start' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'callback' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'refresh' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'logout' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'sellerLogin' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'sellerRefresh' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'sellerLogout' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'devIssueToken' has no @UseGuards() at class or method level.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal module '@/features/conversation/repositories/conversation.repository'.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal type 'ConversationRepository'.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal module '@/features/order/repositories/order.repository'.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal type 'OrderRepository'.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal module '@/features/product/repositories/product.repository'.

오탐 포함 가능 · 기준 docs/guide/architecture-conventions.md

@github-actions

Copy link
Copy Markdown

🧹 knip — dead-code 리포트

요약 항목 없음
전체 리포트
(knip 출력 없음 — 이슈 0이거나 실행 실패)

청소 후보(오탐 가능) · 기준 docs/guide/architecture-conventions.md

@github-actions

Copy link
Copy Markdown

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 97.53% 4659/4777
🟢 Branches 93.12% 1488/1598
🟢 Functions 95.89% 909/948
🟢 Lines 98.17% 4237/4316

Test suite run success

1552 tests passing in 182 suites.

Report generated by 🧪jest coverage report action from dcb24d5

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@chanwoo7
chanwoo7 merged commit e1fc9f9 into develop Aug 20, 2026
12 checks passed
@chanwoo7
chanwoo7 deleted the feat/home-card-store-id branch August 20, 2026 17:10
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