Skip to content

[FEAT] 타임라인 기록 상세 본문 100자 제한 및 수정 시 preview 갱신 - #378

Merged
JiwonLee42 merged 2 commits into
develop-demofrom
fix/record-image-upload-and-content-length
Oct 6, 2026
Merged

JiwonLee42 merged 2 commits into
develop-demofrom
fix/record-image-upload-and-content-length

Conversation

@JiwonLee42

@JiwonLee42 JiwonLee42 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

📄 작업 내용 요약

  • 타임라인 기록 상세 조회(GET /library/{libraryId}/timeline/{timelineId})의 본문을 100자 이내로 제한
    • 기존에는 목록/요약과 생성 시 저장하는 preview만 100자로 잘리고, 상세 조회는 원본 본문 전체를 반환했습니다.
  • 기록 수정 시 타임라인 previewText를 함께 갱신
    • 기존에는 생성 시 한 번만 저장되고 수정 후에도 갱신되지 않았습니다.
    • 갱신 규칙은 생성 시와 동일합니다. 본문이 있으면 trim 후 100자 이내, 본문이 없으면 N개의 이미지 또는 독서 기록입니다.

📎 Issue 번호

  • 없음

✅ 작업 목록

  • 기능 구현
  • 코드 리뷰 반영
  • 테스트 코드 작성
  • 문서 업데이트

📝 기타 참고사항

  • 이미 저장된 기존 타임라인 행의 previewText는 마이그레이션하지 않았습니다. 해당 기록을 수정하면 갱신되는데, 미리 운영 DB 환경에서 수정 필요합니다.

Summary by CodeRabbit

  • 개선 사항
    • 기록을 수정하면 타임라인 미리보기에 최신 내용과 이미지 수가 반영됩니다.
    • 기록 상세의 본문은 최대 100자까지 표시됩니다. 본문이 비어 있으면 이미지 수를 안내하는 문구가 미리보기에 표시됩니다. 기존 기록에 연결된 타임라인이 없는 경우에는 별도의 미리보기 변경이 적용되지 않습니다.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in 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: c4cb6e1c-2d0e-4cdf-a4cd-969dba1c7521
📥 Commits

Reviewing files that changed from the base of the PR and between 7fd6d6b and d4cccec.

📒 Files selected for processing (8)
  • src/main/java/app/nook/record/service/RecordCommandService.java
  • src/main/java/app/nook/timeline/domain/Timeline.java
  • src/main/java/app/nook/timeline/repository/TimelineRepository.java
  • src/main/java/app/nook/timeline/service/TimelineCommandService.java
  • src/main/java/app/nook/timeline/service/TimelineQueryService.java
  • src/test/java/app/nook/record/service/RecordServiceTest.java
  • src/test/java/app/nook/timeline/service/TimelineCommandServiceTest.java
  • src/test/java/app/nook/timeline/service/TimelineQueryServiceTest.java

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


Walkthrough

기록 수정 시 연결된 RECORD 타임라인의 미리보기를 본문과 이미지 개수에 맞춰 갱신합니다. 기록 상세 응답은 본문을 100자로 잘라 반환합니다.

Changes

기록 타임라인 미리보기

Layer / File(s) Summary
기록 수정과 미리보기 동기화
src/main/java/app/nook/record/service/RecordCommandService.java, src/main/java/app/nook/timeline/domain/Timeline.java, src/main/java/app/nook/timeline/repository/TimelineRepository.java, src/main/java/app/nook/timeline/service/TimelineCommandService.java, src/test/java/app/nook/record/service/RecordServiceTest.java, src/test/java/app/nook/timeline/service/TimelineCommandServiceTest.java
이미지 동기화 뒤 서재, 유형, 기록 ID가 일치하는 타임라인을 조회합니다. 타임라인이 있으면 본문 또는 이미지 개수로 계산한 미리보기 텍스트를 갱신합니다. 테스트는 본문 갱신, 이미지 개수 문구, 타임라인 부재 시 저장하지 않는 경우를 확인합니다.
기록 상세 본문 길이 제한
src/main/java/app/nook/timeline/service/TimelineQueryService.java, src/test/java/app/nook/timeline/service/TimelineQueryServiceTest.java
기록 상세 본문을 100자로 잘라 반환합니다. 테스트의 기대값도 100자로 변경합니다.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: kjhyeon0620

Merge Risk: ⚪ Minimal · up to d4ccc

The reviewed changes have no established merge-blocking issue. The Postgres-backed tests remain unrun and should be completed when Docker is available.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 8 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 타임라인 기록 상세 본문을 100자로 제한하고 기록 수정 시 preview를 갱신하는 두 가지 주요 변경을 명확히 설명합니다.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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.

@JiwonLee42 JiwonLee42 self-assigned this Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Overall Project 79.81% 🍏
Files changed 100% 🍏

File Coverage
Timeline.java 100% 🍏
TimelineCommandService.java 98.41% 🍏
TimelineQueryService.java 97.2% 🍏
RecordCommandService.java 96.96% 🍏

@JiwonLee42
JiwonLee42 merged commit 5fbae49 into develop-demo Oct 6, 2026
2 checks passed
@kjhyeon0620 kjhyeon0620 mentioned this pull request Oct 20, 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.

1 participant