Skip to content

Conversation

@unifolio0
Copy link
Contributor

@unifolio0 unifolio0 commented Oct 5, 2025

🚩 Jira Ticket

SCRUM-122

🗣️ 리뷰 요구사항 (선택)

Summary by CodeRabbit

  • 신규 기능
    • 예약 알림 범위 확대: ‘예약 확정’, ‘예약 변경’, ‘예약 취소’ 알림이 추가되어 기존 ‘예약 생성’과 함께 앱/이메일/푸시로 수신됩니다.
  • 푸시 알림
    • 웹 푸시 전송 구성 추가로 웹 푸시 기능의 안정적 제공 및 전송 설정이 개선되었습니다.
  • 테스트
    • 푸시 관련 테스트 구성이 추가되어 테스트 환경에서 푸시 동작이 모의(mock)로 검증됩니다.

@unifolio0 unifolio0 self-assigned this Oct 5, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello @unifolio0, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 Pull Request는 예약 내역 변경 시 알림 발송 기능을 확장하기 위한 초기 단계로, 알림 메시지 헤더에서 불필요한 필드를 제거하고, 예약 확인, 업데이트, 취소와 관련된 새로운 알림 유형을 추가합니다. 이는 향후 예약 상태 변화에 따른 다양한 알림을 처리할 수 있는 기반을 마련합니다.

Highlights

  • MessageHeader 필드 제거: MessageHeader 클래스에서 더 이상 사용되지 않는 source 필드가 제거되었습니다.
  • 새로운 알림 유형 추가: NotificationType 열거형에 RESERVATION_CONFIRMED, RESERVATION_UPDATED, RESERVATION_CANCELED 세 가지 새로운 예약 관련 알림 유형이 추가되었습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Oct 5, 2025

Warning

Rate limit exceeded

@unifolio0 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 14 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 2b12d0c and 1156477.

📒 Files selected for processing (1)
  • src/main/java/com/wellmeet/notification/consumer/NotificationSender.java (1 hunks)

Walkthrough

메시지 헤더 DTO에서 source 필드를 제거했고, NotificationType enum에 예약 관련 3개 상수를 추가했으며, Web Push의 프로덕션 설정을 분리한 WebPushConfig와 테스트용 WebPushTestConfig(모킹된 PushService)를 도입하고 WebPushSender 패키지/주입 방식을 조정했습니다.

Changes

Cohort / File(s) Change Summary
DTO 헤더 필드 정리
src/main/java/com/wellmeet/notification/consumer/dto/MessageHeader.java
private String source 필드 제거. 클래스 필드가 messageId, timestamp로 축소됨.
알림 타입 확장
src/main/java/com/wellmeet/notification/consumer/dto/NotificationType.java
enum 상수 추가: RESERVATION_CONFIRMED, RESERVATION_UPDATED, RESERVATION_CANCELED. 기존 RESERVATION_CREATED 뒤에 콤마 추가.
WebPush 프로덕션 설정 및 빈 등록
src/main/java/com/wellmeet/config/WebPushConfig.java
새 Spring 설정 클래스 추가. VapidConfig 주입으로 PushService 빈을 생성·설정하는 pushService() 메서드 추가(GeneralSecurityException 선언). 활성화는 테스트 프로필 제외.
WebPush 발송자 리팩터링
src/main/java/com/wellmeet/notification/webpush/sender/WebPushSender.java
src/main/java/com/wellmeet/notification/webpush/WebPushService.java
WebPushSender 패키지 이동(infrastructure → sender) 및 내부 VapidConfig 기반 초기화 제거. PushService를 final 필드로 주입받도록 변경. WebPushService에서 import 경로 업데이트.
테스트용 WebPush 모킹 및 테스트 컨텍스트 등록
src/test/java/com/wellmeet/config/WebPushTestConfig.java
src/test/java/com/wellmeet/BaseControllerTest.java
src/test/java/com/wellmeet/BaseServiceTest.java
src/test/java/com/wellmeet/WellmeetNotificationApplicationTests.java
WebPushTestConfig 추가: @Bean @Primary PushService로 Mockito 모킹 반환. 주요 테스트 클래스들에 @Import(WebPushTestConfig.class) 추가하여 테스트 컨텍스트에 모킹된 PushService 주입.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant WebPushService as WebPushService
  participant WebPushSender as WebPushSender
  participant PushService as PushServiceBean

  note over PushServiceBean: Production: provided by WebPushConfig\nTest: provided by WebPushTestConfig (mock)
  Client->>WebPushService: 요청 (알림 전송)
  WebPushService->>WebPushSender: build/prepare push message
  WebPushSender->>PushServiceBean: send(pushMessage)
  PushServiceBean-->>WebPushSender: send result / exception
  WebPushSender-->>WebPushService: 결과 반환
  WebPushService-->>Client: 응답
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • ezcolin2

Poem

깡총 깡총, 필드 하나 훌쩍 없앴네
새 알림 세 개는 둥실 피었고 🌱
푸시 빈은 생산에선 세팅, 테스트에선 흉내내며
토끼는 흙을 만져보며 웃네 — 배포 준비 끝! 🐇

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 (2 passed)
Check name Status Explanation
Title Check ✅ Passed 제목은 “예약 내역 수정 시 알림 발송” 기능을 명확히 전달하여 PR에서 구현된 핵심 변경사항의 일부를 잘 요약하고 있습니다. 변경된 알림 타입 중 수정 이벤트에 초점을 맞추고 있어 실제 변경사항과 관련이 있으나, PR에는 예약 확정 및 취소 알림 기능도 포함되어 있으나 제목에 반영되지 않았습니다. 이로 인해 변경사항의 전체 범위가 제목만 보고는 완전히 파악되기 어려울 수 있습니다.
Description Check ✅ Passed PR 설명은 필수 섹션인 ‘# 🚩 Jira Ticket’과 해당 링크를 정확히 포함하고 있으며, 선택 섹션인 ‘# 🗣️ 리뷰 요구사항 (선택)’도 템플릿 구조에 맞게 존재하므로 저장소의 요구사항을 충족합니다. 리뷰 요구사항 섹션이 비어 있더라도 선택 항목이므로 설명이 크게 불완전하지 않습니다.

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.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 예약 상태 변경(확인, 수정, 취소)에 따른 알림을 발송하기 위해 NotificationType에 새로운 열거형 상수를 추가하고, MessageHeader에서 더 이상 사용되지 않는 source 필드를 제거하는 변경 사항을 포함하고 있습니다. 제출된 코드 변경 자체는 명확하고 올바릅니다.

다만, 관련 코드를 검토하던 중 NotificationSender 클래스의 send 메소드에서 잠재적인 문제를 발견했습니다. notificationHistoryRepository.save(history) 호출이 for 루프 내부에 위치하여, 한 명의 사용자가 여러 알림 채널을 활성화한 경우 알림 기록이 중복으로 저장될 수 있습니다. 이는 데이터 정합성 문제를 일으키거나 런타임 예외를 발생시킬 수 있으므로, save 호출을 루프 밖으로 이동하는 것을 강력히 권장합니다. 이 PR의 범위에 포함되지는 않지만, 새로운 알림 유형이 이 로직을 통해 처리될 것이므로 함께 수정하는 것이 좋아 보입니다.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1de5131 and 2d2be1c.

📒 Files selected for processing (2)
  • src/main/java/com/wellmeet/notification/consumer/dto/MessageHeader.java (0 hunks)
  • src/main/java/com/wellmeet/notification/consumer/dto/NotificationType.java (1 hunks)
💤 Files with no reviewable changes (1)
  • src/main/java/com/wellmeet/notification/consumer/dto/MessageHeader.java

Comment on lines +8 to +11
RESERVATION_CREATED,
RESERVATION_CONFIRMED,
RESERVATION_UPDATED,
RESERVATION_CANCELED,
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

예약 생명주기를 위한 알림 타입 추가가 적절합니다.

새로운 알림 타입들(RESERVATION_CONFIRMED, RESERVATION_UPDATED, RESERVATION_CANCELED)이 PR 목표와 일치하며, 네이밍 컨벤션도 올바르게 적용되었습니다.

다만 코드베이스 전체에서 이 새로운 알림 타입들을 올바르게 처리하는지 확인해 주세요. 특히 알림 소비자(consumer)와 생성자(producer) 쪽에서 모든 타입에 대한 처리 로직이 구현되어 있는지 검증이 필요합니다.

다음 스크립트를 실행하여 새로운 알림 타입의 사용처를 확인하세요:


🏁 Script executed:

#!/bin/bash
# Description: 새로운 NotificationType 상수들이 코드베이스에서 어떻게 사용되는지 확인

echo "=== RESERVATION_CONFIRMED 사용처 ==="
rg -n "RESERVATION_CONFIRMED" --type java -C 3

echo -e "\n=== RESERVATION_UPDATED 사용처 ==="
rg -n "RESERVATION_UPDATED" --type java -C 3

echo -e "\n=== RESERVATION_CANCELED 사용처 ==="
rg -n "RESERVATION_CANCELED" --type java -C 3

echo -e "\n=== NotificationType switch/if 분기 처리 ==="
rg -n "NotificationType\." --type java -A 10 | rg -A 10 "switch|case"

Length of output: 1885


새 알림 타입에 대한 핸들링 로직 구현 필요

새로 추가된 RESERVATION_CONFIRMED, RESERVATION_UPDATED, RESERVATION_CANCELED 타입이 enum에만 정의되어 있으며, 알림 소비자·생성자 코드에서 해당 타입을 처리하는 분기나 핸들러가 없습니다. 각 이벤트에 맞춰 알림 발송·수신 로직을 구현해주세요.

@unifolio0 unifolio0 merged commit 597c5a6 into Team-soft-macaron:develop Oct 5, 2025
2 checks passed
@unifolio0 unifolio0 deleted the SCRUM-122 branch October 5, 2025 03:52
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