Skip to content

fix: 리뷰 목록이 cursor null을 첫 페이지로 처리 - #487

Merged
chanwoo7 merged 1 commit into
developfrom
fix/review-cursor-null
Oct 4, 2026
Merged

chanwoo7 merged 1 commit into
developfrom
fix/review-cursor-null

Conversation

@chanwoo7

@chanwoo7 chanwoo7 commented Oct 4, 2026

Copy link
Copy Markdown
Member

배경

  • 이슈 #483입니다. productReviews·storeReviews의 cursor는 SDL에서 nullable인데, cursor: null을 보내면 첫 페이지 대신 400(INVALID_CURSOR·INVALID_LIKES_CURSOR)이 났습니다.
  • service가 input.cursor를 그대로 넘기고 아래에서 !== undefined로만 걸러, null이 커서 파싱으로 들어갔습니다.
  • 구매자 FE는 첫 페이지에 cursor를 보내지 않아 지금 깨진 화면은 없습니다.

변경

  • review-listing.service.ts에서 input.cursor ?? undefined로 정규화했습니다.
  • 두 DTO의 cursor를 string | null로 선언했습니다(정규화가 빠지면 tsc가 막도록).

테스트

  • 두 범위(상품·매장) × 두 정렬(LATEST·LIKES)에서 cursor: null이면 첫 페이지를 돌려주는 4건을 추가했습니다.
    • 수정을 되돌리면 4건 모두 커서 형식 오류로 실패하는 것을 확인했습니다.

플랜 대조

플랜 1번 불릿 상태
cursorRaw: input.cursor ?? undefined 한 것
회귀: 두 쿼리 × LATEST·LIKES에서 cursor null → 첫 페이지 한 것

- productReviews·storeReviews의 cursor는 SDL nullable인데 service가 !== undefined로만 걸러, cursor: null이 커서 파싱에 들어가 400(INVALID_CURSOR·INVALID_LIKES_CURSOR)
- service ?? undefined 정규화 + DTO cursor를 | null로 선언(다음 누락은 tsc가 잡게)
- 회귀: 두 범위 × LATEST·LIKES에서 cursor null이면 첫 페이지 4건(수정 전 4건 모두 커서 형식 오류로 실패 확인)
@coderabbitai

coderabbitai Bot commented Oct 4, 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: Repository: CaQuick/caquick-be/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3c27c91b-8c89-4571-a9b0-d55ca83df907

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
  • Autopilot · 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

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

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

🧹 knip — dead-code 리포트

Unused exported types (1)
전체 리포트
Unused exported types (1)
RateLimitPolicy  type  src/global/rate-limit/index.ts:4:8

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

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

🩺 NestJS Doctor — 90/100 (Excellent)

진단 470건 (error 12).

Category error warning info
architecture 1 1 42
correctness 0 261 0
performance 0 30 28
schema 0 0 75
security 11 21 0
architecture / security 상위 항목
  • error architecture/architecture/no-manual-instantiation: Manual instantiation of 'OutboxRepository' detected. Use dependency injection instead.
  • 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.
  • warning security/security/require-guards-on-endpoints: Endpoint 'adminLogin' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'adminRefresh' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'adminLogout' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'getJwks' has no @UseGuards() at class or method level.

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

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

Coverage report

St.❔
Category Percentage Covered / Total
🟢 Statements 97.9% 10043/10258
🟢 Branches 92.41% 3785/4096
🟢 Functions 97.4% 2020/2074
🟢 Lines 98.5% 9137/9276

Test suite run success

3727 tests passing in 355 suites.

Report generated by 🧪jest coverage report action from 9c5a685

@codecov

codecov Bot commented Oct 4, 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 77976b5 into develop Oct 4, 2026
13 checks passed
@chanwoo7
chanwoo7 deleted the fix/review-cursor-null branch October 4, 2026 15:05
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