Skip to content

fix: 피드백 빨간점 읽음 처리 (#131) - #132

Merged
young0206 merged 2 commits into
developfrom
feat/131-unread
Aug 7, 2026
Merged

fix: 피드백 빨간점 읽음 처리 (#131)#132
young0206 merged 2 commits into
developfrom
feat/131-unread

Conversation

@young0206

@young0206 young0206 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🔗 관련 이슈 (Related Issue)

Closes #131

📝 작업 내용

  • 사용자와 영상을 기준으로 미읽은 VIDEO_FEEDBACK_COMMENTED 알림을 읽음 처리하는 쿼리를 추가했
    습니다.

  • 영상 피드백 알림 읽음 처리 서비스 로직을 추가했습니다.

  • 영상 상세 조회 시 해당 영상의 피드백 알림이 읽음 처리되도록 연동했습니다.

  • 삭제된 알림, 이미 읽은 알림, 다른 사용자 및 다른 영상의 알림은 처리 대상에서 제외했습니다.

✅ PR 체크리스트

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

Summary by CodeRabbit

  • 새 기능
    • 영상 상세 정보를 확인하면 해당 영상의 미읽은 피드백 댓글 알림이 자동으로 읽음 처리됩니다.
    • 특정 영상과 관련된 피드백 알림을 일괄적으로 읽음 처리할 수 있습니다.

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

coderabbitai Bot commented Aug 6, 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: f29fb8aa-86fb-444d-bf5c-86ea6ddbb490

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

영상 상세 조회 시 해당 영상의 미읽은 VIDEO_FEEDBACK_COMMENTED 알림을 일괄 읽음 처리합니다. 저장소 조건부 업데이트, 서비스 검증, 트랜잭션 연동을 추가했습니다.

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로 미읽음·미삭제 알림을 필터링합니다. 대상 알림의 isReadreadAt을 갱신합니다.
영상 상세 조회 연동
src/main/java/com/slatto/domain/video/service/VideoService.java
getVideo@Transactional을 추가합니다. 영상 상세 정보 반환 전에 해당 영상의 피드백 알림 읽음 처리를 호출합니다.

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

Possibly related issues

Possibly related PRs

  • SLAT-TO/SLATE-TO-BE#87: NotificationRepositoryNotificationService의 알림 상태 처리와 관련됩니다.
  • SLAT-TO/SLATE-TO-BE#123: 영상 피드백 댓글 알림을 생성하며, 본 변경은 해당 알림을 읽음 처리합니다.
  • SLAT-TO/SLATE-TO-BE#124: 영상 피드백 알림의 미읽음 상태 처리와 관련되며, 본 변경은 읽음 상태를 갱신합니다.

Suggested reviewers: guingguing

Sequence Diagram(s)

sequenceDiagram
  participant VideoService
  participant NotificationService
  participant NotificationRepository
  VideoService->>NotificationService: 영상 피드백 알림 읽음 처리 호출
  NotificationService->>NotificationRepository: 사용자·영상 기준 일괄 업데이트
  NotificationRepository-->>NotificationService: 변경된 알림 수 반환
  NotificationService-->>VideoService: 영상 상세 정보 반환
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목은 영상 피드백 알림의 읽음 처리라는 주요 변경 사항을 명확하게 설명합니다.
Description check ✅ Passed 설명은 관련 이슈, 작업 내용, 체크리스트를 포함하며 구현 내용과 테스트 여부를 명확하게 기록합니다.
Linked Issues check ✅ Passed Repository 쿼리, 서비스 로직, 영상 상세 조회 연동이 이슈 #131의 모든 개발 목표를 충족합니다.
Out of Scope Changes 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 106-117: 수정 쿼리의 `@Modifying` 설정에서 clearAutomatically 옵션을 제거하고
flushAutomatically는 유지하세요. 이렇게 NotificationRepository의 읽음 처리 후에도
VideoRepository.findByIdAndProjectId()가 반환한 video의 lazy project가 DTO 생성 시점까지
초기화될 수 있도록 기존 영속성 컨텍스트를 보존하세요.
🪄 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: f16d5a80-94b1-487b-b22f-f9c7bf7b3fe2

📥 Commits

Reviewing files that changed from the base of the PR and between 31b8cc9 and e6617ce.

📒 Files selected for processing (3)
  • 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/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.

수고하셨습니다~ 쿼리가 V004의 idx_notification_group_lookup (user_id, type, target_type, target_id, is_read)를 조건 순서까지 정확히 타고가서 인덱스 추가 없이 붙은 점이 좋은것 같습니다.

@young0206
young0206 merged commit 394099c into develop Aug 7, 2026
2 checks passed
@young0206
young0206 deleted the feat/131-unread branch August 7, 2026 01:55
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