Skip to content

Conversation

@minwoo1999
Copy link
Member

@minwoo1999 minwoo1999 commented Sep 28, 2025

🔗 관련 이슈

📘 작업 유형

  • ✨ Feature (기능 추가)
  • 🐞 Bugfix (버그 수정)
  • 🔧 Refactor (코드 리팩토링)
  • ⚙️ Chore (환경 설정)
  • 📝 Docs (문서 작성 및 수정)
  • ✅ Test (기능 테스트)
  • 🎨 style (코드 스타일 수정)

📙 작업 내역

  • 내서재(BookController) 기본 정렬 기준을 createdAtupdatedAt로 수정
  • 독서기록(ReadingRecordController) 기본 정렬 기준을 createdAtupdatedAt로 수정
  • ReadingRecordSortType에 UPDATED_DATE_ASC / UPDATED_DATE_DESC 추가
  • JpaReadingRecordQuerydslRepositoryImpl에서 업데이트 날짜 기준 정렬 로직 반영

🧪 테스트 내역

  • 브라우저/기기에서 동작 확인
  • 기존 기능 영향 없음 (정렬 기준만 변경)
  • 페이지네이션 및 정렬 엣지 케이스 테스트 완료

✅ PR 체크리스트

  • 커밋 메시지가 명확합니다
  • PR 제목이 컨벤션에 맞습니다
  • 관련 이슈 번호를 작성했습니다
  • 기능이 정상적으로 작동합니다
  • 불필요한 코드를 제거했습니다

💬 추가 설명 or 리뷰 포인트

  • ReadingRecordSortType 업데이트로 인해 기존 쿼리 로직에 영향이 없는지 확인 필요
  • 기본 정렬 변경이 사용자 경험에 문제 없는지 확인

Summary by CodeRabbit

  • New Features
    • 사용자 라이브러리 도서 목록과 독서 기록 목록의 기본 정렬이 생성일 기준에서 수정일 최신순으로 변경되어, 최근에 업데이트된 항목이 먼저 표시됩니다.
    • 정렬 옵션에 ‘수정일 오름차순/내림차순’이 추가되어, 목록을 수정일 기준으로 세밀하게 정렬할 수 있습니다. 기존 파라미터 사용 방식은 동일하며, 기본 정렬 동작만 변경됩니다.

@coderabbitai
Copy link

coderabbitai bot commented Sep 28, 2025

Walkthrough

내서재(책)와 독서기록 조회의 기본 정렬 기준을 createdAt에서 updatedAt으로 변경. 독서기록 정렬 타입 enum에 UPDATED_DATE_ASC/DESC 추가. JPA Querydsl 리포지토리에서 기본/명시적 정렬에 updatedAt 기준 처리를 반영. 공개 API 시그니처 변화 없음.

Changes

Cohort / File(s) Summary
API Controllers
apis/.../book/controller/BookController.kt, apis/.../readingrecord/controller/ReadingRecordController.kt
Pageable 기본 정렬 필드를 createdAt → updatedAt으로 변경. ReadingRecordController에 ReadingRecordPageResponse import 추가.
Domain Enum
domain/src/main/kotlin/org/yapp/domain/readingrecord/ReadingRecordSortType.kt
정렬 타입에 UPDATED_DATE_ASC, UPDATED_DATE_DESC 상수 추가. 기존 상수들은 유지.
Infra Repository (Querydsl)
infra/.../readingrecord/repository/impl/JpaReadingRecordQuerydslRepositoryImpl.kt
기본 정렬을 updatedAt DESC로 변경. 정렬 분기문에 UPDATED_DATE_ASC/DESC 처리 추가.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User
  participant C as Controller
  participant S as Service
  participant R as Repository

  U->>C: GET /reading-records (sort 미지정)
  note right of C: Pageable 기본 정렬: updatedAt DESC
  C->>S: findReadingRecords(pageable: sort=updatedAt DESC)
  S->>R: query(sort=updatedAt DESC)
  R-->>S: Page<ReadingRecord>
  S-->>C: ReadingRecordPageResponse
  C-->>U: 200 OK (updatedAt DESC)

  U->>C: GET /reading-records?sort=UPDATED_DATE_ASC
  C->>S: findReadingRecords(sort=UPDATED_DATE_ASC)
  S->>R: query(sort=updatedAt ASC)
  R-->>S: Page<ReadingRecord>
  S-->>C: ReadingRecordPageResponse
  C-->>U: 200 OK (updatedAt ASC)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed 제목은 내서재와 독서기록의 기본 정렬을 updatedAt으로 변경한다는 핵심 내용을 명확히 요약하고 있어 PR의 주요 변경 사항과 높은 관련성을 가지며 불필요한 정보나 모호한 표현 없이 간결합니다.
Linked Issues Check ✅ Passed 링크된 이슈 #117은 내서재와 독서기록 기본 정렬 값을 createdAt에서 updatedAt으로 수정하는 것이며, PR에서 BookController, ReadingRecordController, ReadingRecordSortType, JpaReadingRecordQuerydslRepositoryImpl 모두 해당 요구사항을 정확히 반영하고 있습니다.
Out of Scope Changes Check ✅ Passed PR에서 수행된 모든 변경 사항은 기본 정렬 로직을 수정하는 범위에 국한되어 있으며 링크된 이슈의 목적을 벗어나는 코드나 파일이 포함되지 않았습니다.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BOOK-324-fix/#117

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cbff2cf and fdac05b.

📒 Files selected for processing (4)
  • apis/src/main/kotlin/org/yapp/apis/book/controller/BookController.kt (1 hunks)
  • apis/src/main/kotlin/org/yapp/apis/readingrecord/controller/ReadingRecordController.kt (1 hunks)
  • domain/src/main/kotlin/org/yapp/domain/readingrecord/ReadingRecordSortType.kt (1 hunks)
  • infra/src/main/kotlin/org/yapp/infra/readingrecord/repository/impl/JpaReadingRecordQuerydslRepositoryImpl.kt (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-validation
🔇 Additional comments (1)
infra/src/main/kotlin/org/yapp/infra/readingrecord/repository/impl/JpaReadingRecordQuerydslRepositoryImpl.kt (1)

62-65: 업데이트 날짜 기준 정렬 반영 👍
요구했던 기본 정렬 전환이 Querydsl 레벨에서도 정확히 맞춰진 것 확인했습니다.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

@sonarqubecloud
Copy link

mgrv-hoon

This comment was marked as duplicate.

Copy link
Member

@move-hoon move-hoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@minwoo1999 minwoo1999 merged commit 6007d66 into develop Oct 5, 2025
7 checks passed
@move-hoon move-hoon changed the title [BOOK-324] fix: 내서재와 독서기록 기본정렬을 수정합니다. (#117) fix: 내서재와 독서기록 기본정렬을 수정합니다. (#117) Oct 22, 2025
@move-hoon move-hoon changed the title fix: 내서재와 독서기록 기본정렬을 수정합니다. (#117) fix: 내서재와 독서기록 기본정렬을 수정합니다. Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOOK-324/fix]내서재와 독서기록 기본 정렬 값을 수정합니다.

4 participants