Skip to content

[FIX] 독서 히스토리 연도를 해당 연도의 첫 기록 날짜에 표시 - #368

Merged
kjhyeon0620 merged 1 commit into
develop-demofrom
fix/#367-timeline-show-year-first-record
Sep 13, 2026
Merged

kjhyeon0620 merged 1 commit into
develop-demofrom
fix/#367-timeline-show-year-first-record

Conversation

@kjhyeon0620

@kjhyeon0620 kjhyeon0620 commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

📄 작업 내용 요약

  • 독서 히스토리의 showYear를 연도별 첫 기록 날짜에 표시하도록 변경
  • 최신순 정렬과 기존 페이징 방식 유지

📎 Issue 번호


✅ 작업 목록

  • 기능 구현
  • 테스트 수정
  • 문서 업데이트

📝 기타 참고사항

Summary by CodeRabbit

  • 변경 사항
    • 타임라인의 showYear 표시 기준을 페이지·커서가 아닌 서재 내 해당 연도의 첫 기록 날짜로 변경했습니다.
    • 동일한 날짜의 기록이 여러 페이지로 나뉘어도 일관된 연도 표시를 제공합니다.
    • 타임라인 요약 및 미리보기 문서와 응답 설명을 새로운 기준에 맞게 업데이트했습니다.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 4d8ac9f7-ea37-49c6-9d95-a786b75fa820

📥 Commits

Reviewing files that changed from the base of the PR and between 2daa39a and 7aa882a.

📒 Files selected for processing (6)
  • src/docs/asciidoc/timeline.adoc
  • src/main/java/app/nook/timeline/repository/TimelineRepository.java
  • src/main/java/app/nook/timeline/service/TimelineQueryService.java
  • src/test/java/app/nook/controller/timeline/TimelineControllerTest.java
  • src/test/java/app/nook/timeline/repository/TimelineRepositoryTest.java
  • src/test/java/app/nook/timeline/service/TimelineQueryServiceTest.java

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

showYear 판단을 페이지·커서 기준에서 라이브러리의 연도별 첫 기록 날짜 기준으로 변경했습니다. 저장소 쿼리와 서비스 로직을 추가하고, 관련 테스트와 API 문서를 갱신했습니다.

Changes

타임라인 연도 표시

Layer / File(s) Summary
연도별 첫 기록 조회
src/main/java/app/nook/timeline/repository/TimelineRepository.java, src/test/java/app/nook/timeline/repository/TimelineRepositoryTest.java
라이브러리와 연도 집합을 기준으로 연도별 최소 occurredAt을 조회하는 메서드와 테스트를 추가했습니다.
showYear 계산 변경
src/main/java/app/nook/timeline/service/TimelineQueryService.java, src/test/java/app/nook/timeline/service/TimelineQueryServiceTest.java
요약과 페이지 조회에서 연도별 첫 기록 날짜에만 showYear=true를 반환하도록 변경했습니다. 빈 목록 처리와 페이지 분할 테스트도 갱신했습니다.
showYear 문서 계약
src/docs/asciidoc/timeline.adoc, src/test/java/app/nook/controller/timeline/TimelineControllerTest.java
요약 및 전체 조회의 showYear 설명을 연도별 첫 기록 날짜 기준으로 변경했습니다.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 7aa88

The updated timeline responses consistently mark only each year’s first record date, including when that date spans pages. No actionable merge risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 5 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 독서 히스토리의 연도를 해당 연도의 첫 기록 날짜에 표시하도록 변경하는 주요 내용을 정확하고 간결하게 설명합니다.
Linked Issues check ✅ Passed [ #367 ] 구현은 TimelineRepository.findFirstOccurredAtByLibraryAndYears로 서재별·연도별 최소 occurredAt를 조회합니다. TimelineQueryService는 전체 조회와 요약 preview에서 이 날짜를 기준으로 showYear를 설정합니다. 조회 정렬과 커서 페이징은 유지됩니다. …
Out of Scope Changes check ✅ Passed 변경 사항은 [ #367 ]의 showYear 기준 수정에 집중됩니다. 저장소 쿼리, 서비스 로직, 관련 테스트, API 문서 변경은 모두 해당 동작을 구현하거나 검증하거나 설명하는 지원 변경입니다. 관련 없는 기능 변경은 확인되지 않습니다.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 5 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#367-timeline-show-year-first-record

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
Overall Project 79.59% 🍏
Files changed 100% 🍏

File Coverage
TimelineQueryService.java 97.21% 🍏

@kjhyeon0620
kjhyeon0620 merged commit dfe649e into develop-demo Sep 13, 2026
2 checks passed
@kjhyeon0620
kjhyeon0620 deleted the fix/#367-timeline-show-year-first-record branch September 13, 2026 17:33
@kjhyeon0620 kjhyeon0620 mentioned this pull request Sep 14, 2026
4 tasks done
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.

[FIX] 독서 히스토리에서 연도가 가장 최근 기록에 표시됨

1 participant