Skip to content

refactor: 팝업 노출 판정 로직 엔티티 캡슐화 및 DTO 시간 주입(Clock) 단일화 적용 - #33

Merged
chaeyylee merged 1 commit into
mainfrom
fix/mission-popup-timer
Jul 11, 2026
Merged

refactor: 팝업 노출 판정 로직 엔티티 캡슐화 및 DTO 시간 주입(Clock) 단일화 적용#33
chaeyylee merged 1 commit into
mainfrom
fix/mission-popup-timer

Conversation

@chaeyylee

@chaeyylee chaeyylee commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • 버그 수정
    • 오늘의 미션 팝업 노출 여부가 동일한 기준 시각을 사용하도록 개선되었습니다.
    • 미션이 배정된 후 마감 전이며, 진행 가능한 상태일 때만 팝업이 표시됩니다.
    • 미션 상태 조회 및 팝업 표시 기록 과정에서도 팝업 노출 조건이 일관되게 적용됩니다.
    • 시간 경계에서 팝업이 잘못 표시되거나 누락되는 문제를 줄였습니다.

@chaeyylee chaeyylee self-assigned this Jul 11, 2026
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 252bfa59-4852-4528-bb80-170a7dd56624

📥 Commits

Reviewing files that changed from the base of the PR and between 5d87e7e and ffe36ad.

📒 Files selected for processing (3)
  • src/main/java/com/example/hackathon/domain/mission/dto/response/MissionTodayResponse.java
  • src/main/java/com/example/hackathon/domain/mission/entity/UserMissionLog.java
  • src/main/java/com/example/hackathon/domain/mission/service/MissionService.java

📝 Walkthrough

Walkthrough

미션 팝업 필요 여부 판단을 UserMissionLog로 이동하고, MissionService에서 계산한 동일한 현재 시각을 로그 처리와 MissionTodayResponse 변환에 전달하도록 변경했습니다.

Changes

미션 팝업 처리 흐름

Layer / File(s) Summary
도메인 팝업 판정 메서드
src/main/java/com/example/hackathon/domain/mission/entity/UserMissionLog.java
assignedAt 이후이면서 deadlineAt 이전이고 상태가 ASSIGNED 또는 CONFIRMED인 경우 팝업 필요 여부를 반환하는 isPopupRequired(now)를 추가했습니다.
서비스 현재 시각 및 응답 연결
src/main/java/com/example/hackathon/domain/mission/service/MissionService.java, src/main/java/com/example/hackathon/domain/mission/dto/response/MissionTodayResponse.java
미션 조회에서 하나의 now 값을 로그 처리와 응답 생성에 전달하고, 팝업 판정을 엔티티 메서드로 위임하도록 변경했습니다. 기존 서비스 헬퍼와 DTO 내부의 중복 판정을 제거했습니다.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 팝업 노출 판정을 엔티티로 이동하고 DTO에 현재 시간 주입을 단일화한 변경을 잘 요약합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mission-popup-timer

Comment @coderabbitai help to get the list of available commands.

@chaeyylee
chaeyylee merged commit f342be3 into main Jul 11, 2026
2 checks passed
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