Skip to content

feat: 영상 목록 hasUnreadFeedback 구현 (#121) - #124

Merged
young0206 merged 2 commits into
developfrom
feat/121-unread
Aug 5, 2026
Merged

feat: 영상 목록 hasUnreadFeedback 구현 (#121)#124
young0206 merged 2 commits into
developfrom
feat/121-unread

Conversation

@young0206

@young0206 young0206 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🔗 관련 이슈 (Related Issue)

Closes #121

📝 작업 내용

  • 영상 목록 응답의 unreadCommentCounthasUnreadFeedback으로 변경했습니다.
  • 미읽음 피드백 알림이 하나 이상 존재하면 hasUnreadFeedback=true를 반환하도록 적용했습니다.
  • 여러 영상의 미읽음 상태를 한 번에 조회하여 N+1 쿼리가 발생하지 않도록 처리했습니다.
  • 영상 상세 응답에서 사용하지 않는 unreadCommentCount 필드를 제거했습니다.

✅ PR 체크리스트

  • PR 제목은 커밋 컨벤션을 따랐습니다.
  • 관련 이슈를 연결했습니다.
  • 변경 사항에 대한 테스트를 진행했습니다.

Summary by CodeRabbit

  • 변경 사항
    • 영상 목록에서 미읽은 피드백의 정확한 개수 대신, 미읽은 피드백 존재 여부가 표시됩니다.
    • 여러 영상의 미읽은 피드백 상태를 한 번에 조회해 목록에 반영합니다.
    • 영상 상세 화면에서는 사용자별 미읽은 피드백 개수 표시가 제거되었습니다.
    • 미읽은 피드백이 없는 영상은 불필요한 표시 없이 제공됩니다.

@young0206 young0206 self-assigned this Aug 5, 2026
@young0206 young0206 added the feature 새로운 기능 추가 label Aug 5, 2026
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1c34bbab-63b6-4b76-b9bd-028c2e1cab67

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
📝 Walkthrough

Walkthrough

영상별 미읽음 피드백 조회가 다중 ID 기반의 Map<Long, Integer> 반환 방식으로 변경되었습니다. 영상 목록 응답은 개수 대신 hasUnreadFeedback을 반환하며, 상세 응답에서는 해당 개수를 제거했습니다.

Changes

미읽음 피드백 흐름

Layer / File(s) Summary
영상별 미읽음 개수 집계
src/main/java/com/slatto/domain/notification/repository/NotificationRepository.java, src/main/java/com/slatto/domain/notification/service/NotificationService.java
저장소가 여러 영상 ID를 그룹별로 조회합니다. 서비스는 결과를 Map<Long, Integer>로 변환합니다.
영상 응답 필드 변경
src/main/java/com/slatto/domain/video/dto/response/VideoResponse.java
상세 응답의 미읽음 피드백 개수를 제거합니다. 목록 응답은 hasUnreadFeedback을 사용합니다.
영상 목록 상태 연결
src/main/java/com/slatto/domain/video/service/VideoService.java
영상 목록 조회 시 영상별 미읽음 개수를 조회합니다. 개수가 0보다 큰지 여부를 응답 DTO에 전달합니다.

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

Sequence Diagram(s)

sequenceDiagram
  participant VideoService
  participant NotificationService
  participant NotificationRepository
  participant VideoResponse
  VideoService->>NotificationService: 영상 ID 목록 전달
  NotificationService->>NotificationRepository: 영상별 미읽음 알림 그룹 조회
  NotificationRepository-->>NotificationService: 영상별 개수 반환
  NotificationService-->>VideoService: Map<Long, Integer> 반환
  VideoService->>VideoResponse: hasUnreadFeedback 전달
  VideoResponse-->>VideoService: 영상 목록 응답 생성
Loading

Possibly related issues

  • SLAT-TO/SLAT-TO-BE 이슈 121: 영상 목록의 미읽음 피드백 처리 범위를 직접 변경합니다.

Possibly related PRs

  • SLAT-TO/SLATE-TO-BE#17: VideoResponseVideoService의 미읽음 피드백 응답 처리와 직접 연결됩니다.

Suggested reviewers: guingguing, chazy-d

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning 이슈 #121은 실제 읽지 않은 피드백 개수를 요구하지만, PR은 개수 대신 hasUnreadFeedback 불리언을 반환합니다. 영상 목록 항목의 unreadCommentCount에 실제 읽지 않은 피드백 개수를 연동하거나, 변경된 요구 사항에 맞게 이슈를 갱신하세요.
Out of Scope Changes check ⚠️ Warning 영상 상세 응답의 unreadCommentCount 제거는 이슈 #121의 목록 개수 연동 범위와 직접 관련이 없습니다. 영상 상세 필드 제거를 별도 PR로 분리하거나, 해당 변경을 요구하는 이슈를 추가로 연결하세요.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 영상 목록의 hasUnreadFeedback 구현이라는 주요 변경 사항을 명확하게 설명합니다.
Description check ✅ Passed 필수 섹션과 작업 내용, 관련 이슈, 체크리스트를 모두 작성했습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/main/java/com/slatto/domain/notification/repository/NotificationRepository.java`:
- Around line 127-143: Update findUnreadGroupedNotificationCounts in
NotificationRepository so the query selects targetId alongside the grouped
count, because NotificationService.getUnreadVideoFeedbackCounts reads each row
as a (targetId, count) Object[] pair. Keep the existing filters and grouping
logic, but change the projection to return one tuple per targetId with the count
in the second position so row[0] and row[1] remain valid.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ce838f27-87f5-455c-8743-7ec91a55a4f1

📥 Commits

Reviewing files that changed from the base of the PR and between c1e1a47 and 78762a7.

📒 Files selected for processing (4)
  • src/main/java/com/slatto/domain/notification/repository/NotificationRepository.java
  • src/main/java/com/slatto/domain/notification/service/NotificationService.java
  • src/main/java/com/slatto/domain/video/dto/response/VideoResponse.java
  • src/main/java/com/slatto/domain/video/service/VideoService.java

@chazy-d chazy-d left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

피드백 개선 수고하셨습니다~

@young0206
young0206 merged commit 1c0eab1 into develop Aug 5, 2026
2 checks passed
@young0206
young0206 deleted the feat/121-unread branch August 5, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 새로운 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT: 안 읽은 피드백 개수 조회 로직 추가

2 participants