Skip to content

fix: 오늘의 브리핑 정책 우선순위 보정 - #141

Merged
guingguing merged 3 commits into
developfrom
feature/140-briefing-policy-sync
Aug 7, 2026
Merged

fix: 오늘의 브리핑 정책 우선순위 보정#141
guingguing merged 3 commits into
developfrom
feature/140-briefing-policy-sync

Conversation

@guingguing

@guingguing guingguing commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🔗 관련 이슈 (Related Issue)

Closes #140

📝 작업 내용

오늘의 브리핑 조회 API가 최신 정책서 기준과 일치하도록 브리핑 타입, 문구, 우선순위 정렬 기준을 보정했습니다.

오늘의 브리핑은 별도 테이블을 만들지 않고 기존 schedule, notification 데이터를 조합해 조회합니다.

주요 변경 사항

  • 여러 날 일정의 마감 당일 브리핑 타입 추가
  • 하루짜리 일정 당일은 마감이 아니라 오늘 일정으로 노출
  • 정책서 기준 브리핑 우선순위 정렬 보정
  • 알림 기반 브리핑 후보 조회 정렬 기준 보정
  • Swagger 설명 보강

구현 API

GET /api/v1/briefings/today

브리핑 우선순위

우선순위 type 설명
1 TODAY_SCHEDULE 오늘 진행 중인 담당 일정
2 SCHEDULE_DUE_TODAY 여러 날 일정의 마감 당일
3 SCHEDULE_START_REMINDER D-1, D-3 일정 시작 알림
4 RECRUITMENT_APPLIED 새로운 지원자 알림
5 SCHEDULE_CREATED 새로운 일정 등록 알림
6 NOTICE_CREATED 공지 등록 알림
7 FILE_UPLOADED 파일 등록 알림
8 VIDEO_FEEDBACK_COMMENTED 새로운 피드백 알림

일정 브리핑 문구 기준

  • 하루짜리 일정 당일: [{프로젝트명}] 오늘 [{일정명}] 일정이 있어요
  • 여러 날 일정 중 마지막 날이 아닌 진행일: [{프로젝트명}] 오늘 [{일정명}] 일정이 있어요
  • 여러 날 일정의 마지막 날: [{프로젝트명}] 오늘 [{일정명}] 마감이에요
  • 일정 시작 D-3 / D-1: [{프로젝트명}] [{일정명}] 시작까지 D-{N}

조회 기준

  • 현재 로그인한 사용자 기준으로 조회합니다.
  • 일정 브리핑은 개인 일정과 프로젝트 일정을 모두 포함하되, 프로젝트 일정은 현재 사용자가 일정 담당자인 경우만 포함합니다.
  • 알림 기반 브리핑은 최근 24시간 이내 생성/갱신된 알림을 기준으로 조회합니다.
  • 응답은 최대 3건까지 반환합니다.
  • 브리핑이 없으면 빈 목록을 반환합니다.
  • 클릭 시 상세 화면으로 직접 이동하지 않고 알림센터로 이동하는 전제입니다.

✅ PR 체크리스트

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

테스트

  • ./gradlew test

Summary by CodeRabbit

  • 새 기능

    • 오늘의 브리핑이 일정 마감일, 시작 알림 및 최근 24시간 주요 알림을 우선순위에 따라 조합해 최대 3건 제공합니다.
  • 개선 사항

    • 당일 마감 일정이 일반 일정과 구분되어 브리핑에 표시됩니다.
    • 브리핑 알림 유형의 우선순위가 조정되어 중요도가 더 정확하게 반영됩니다.

@guingguing guingguing self-assigned this Aug 6, 2026
@guingguing guingguing linked an issue Aug 6, 2026 that may be closed by this pull request
7 tasks
@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: 4a39c8c1-0710-46df-a339-f3d4870c1c24

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

오늘의 브리핑이 여러 날 일정의 마감 당일을 SCHEDULE_DUE_TODAY로 분류합니다. 일정 문구 조건을 공통 판별 메서드로 변경합니다. 알림 후보 우선순위와 API 설명을 최신 정책에 맞게 갱신합니다.

Changes

오늘의 브리핑 정책

Layer / File(s) Summary
일정 마감 브리핑 유형 분류
src/main/java/com/slatto/domain/notification/enums/TodayBriefingType.java, src/main/java/com/slatto/domain/notification/service/TodayBriefingService.java
여러 날 일정의 종료일이 오늘이면 SCHEDULE_DUE_TODAY를 사용합니다. 그 외 일정은 TODAY_SCHEDULE을 사용합니다. 마감 문구 판별은 isScheduleDueToday를 사용합니다.
알림 우선순위 및 API 설명 반영
src/main/java/com/slatto/domain/notification/repository/NotificationRepository.java, src/main/java/com/slatto/domain/notification/controller/TodayBriefingController.java
알림 후보 우선순위를 1씩 조정합니다. API 설명에 일정 마감, 시작 알림, 최근 24시간 주요 알림의 조합 정책을 반영합니다.

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

Possibly related PRs

Suggested labels: fix

Suggested reviewers: sangwon02, chazy-d, young0206

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목은 오늘의 브리핑 정책 우선순위 보정이라는 실제 주요 변경 사항을 간결하게 설명합니다.
Description check ✅ Passed 관련 이슈, 작업 내용, 체크리스트, API, 정책 기준, 테스트 실행 내용을 모두 포함합니다.
Linked Issues check ✅ Passed [이슈 #140] 일정 타입과 문구, 우선순위, 알림 후보 정렬, Swagger 설명 변경이 요구사항과 일치합니다.
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

🧹 Nitpick comments (1)
src/main/java/com/slatto/domain/notification/service/TodayBriefingService.java (1)

189-198: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

새 분류 규칙을 회귀 테스트로 고정하세요.

다음 경우를 테스트에 추가하세요.

  • 같은 날짜의 일정: TODAY_SCHEDULE, 일정이 있어요
  • 오늘 종료하는 다일 일정: SCHEDULE_DUE_TODAY, 마감이에요
  • 다른 날짜에 종료하는 다일 일정: TODAY_SCHEDULE, 일정이 있어요

전체 결과의 우선순위와 최대 3건 제한도 함께 검증하세요.

🤖 Prompt for 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.

In
`@src/main/java/com/slatto/domain/notification/service/TodayBriefingService.java`
around lines 189 - 198, TodayBriefingService의 getTodayScheduleBriefingType 분류
규칙에 대한 회귀 테스트를 추가하세요. 같은 날짜 일정은 TODAY_SCHEDULE와 “일정이 있어요”, 오늘 종료하는 다일 일정은
SCHEDULE_DUE_TODAY와 “마감이에요”, 다른 날짜에 종료하는 다일 일정은 TODAY_SCHEDULE와 “일정이 있어요”가 되도록
검증하고, 여러 일정이 섞인 경우 전체 결과의 우선순위와 최대 3건 제한도 함께 확인하세요.
🤖 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/service/TodayBriefingService.java`:
- Around line 189-198: Clarify the deadline calculation used by
isScheduleEndDate and align it with the intended definition that the final
working time, not merely the endAt calendar date, determines the deadline. If
the deadline should differ from endAt, use the existing or appropriate
deadlineAt value; otherwise adjust the comparison so schedules ending at the
next day’s 00:00 are not classified as due today.

---

Nitpick comments:
In
`@src/main/java/com/slatto/domain/notification/service/TodayBriefingService.java`:
- Around line 189-198: TodayBriefingService의 getTodayScheduleBriefingType 분류 규칙에
대한 회귀 테스트를 추가하세요. 같은 날짜 일정은 TODAY_SCHEDULE와 “일정이 있어요”, 오늘 종료하는 다일 일정은
SCHEDULE_DUE_TODAY와 “마감이에요”, 다른 날짜에 종료하는 다일 일정은 TODAY_SCHEDULE와 “일정이 있어요”가 되도록
검증하고, 여러 일정이 섞인 경우 전체 결과의 우선순위와 최대 3건 제한도 함께 확인하세요.
🪄 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: a7364282-83a2-41ed-8077-75bfbfbb0318

📥 Commits

Reviewing files that changed from the base of the PR and between 2f3136d and 6ca6142.

📒 Files selected for processing (4)
  • src/main/java/com/slatto/domain/notification/controller/TodayBriefingController.java
  • src/main/java/com/slatto/domain/notification/enums/TodayBriefingType.java
  • src/main/java/com/slatto/domain/notification/repository/NotificationRepository.java
  • src/main/java/com/slatto/domain/notification/service/TodayBriefingService.java

Comment on lines +189 to +198
private TodayBriefingType getTodayScheduleBriefingType(Schedule schedule, LocalDate today) {
if (isScheduleDueToday(schedule, today)) {
return TodayBriefingType.SCHEDULE_DUE_TODAY;
}
return TodayBriefingType.TODAY_SCHEDULE;
}

private boolean isScheduleDueToday(Schedule schedule, LocalDate today) {
return isMultiDaySchedule(schedule) && isScheduleEndDate(schedule, today);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 10 \
  'findBriefingAssignedSchedulesBetween|findBriefingAssignedSchedulesStartingBetween' \
  --glob '*.java'

rg -n -C 8 \
  'getEndAt\(\)|setEndAt\(|endAt' \
  --glob '*.java'

Repository: SLAT-TO/SLATE-TO-BE

Length of output: 157


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Repository files around notification/schema:"
git ls-files | sed -n '1,200p'

echo
echo "Find TodayBriefingService:"
fd -a 'TodayBriefingService\.java$' . || true

echo
echo "Find Schedule-related files:"
fd -ai 'Schedule.*\.java$|.*Schedule.*\.java$' . || true

echo
echo "Search for briefing schedule methods broadly:"
rg -n -C 8 'BriefingAssignedSchedules|findBriefing|AssignedSchedules|SCHEDULE_DUE_TODAY|TODAY_SCHEDULE|isScheduleDueToday|isScheduleEndDate|isMultiDaySchedule' . || true

Repository: SLAT-TO/SLATE-TO-BE

Length of output: 38145


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "TodayBriefingService relevant section:"
sed -n '60,220p' src/main/java/com/slatto/domain/notification/service/TodayBriefingService.java

echo
echo "ScheduleRepository relevant queries:"
sed -n '25,106p' src/main/java/com/slatto/domain/schedule/repository/ScheduleRepository.java

echo
echo "Schedule entity:"
sed -n '1,220p' src/main/java/com/slatto/domain/schedule/entity/Schedule.java

echo
echo "Schedule DTOs with dates:"
for f in \
  src/main/java/com/slatto/domain/schedule/dto/ScheduleCreateRequest.java \
  src/main/java/com/slatto/domain/schedule/dto/ScheduleUpdateRequest.java \
  src/main/java/com/slatto/domain/schedule/dto/ScheduleDailyResponse.java \
  src/main/java/com/slatto/domain/schedule/dto/ScheduleCalendarResponse.java \
  src/main/java/com/slatto/domain/schedule/dto/ScheduleResponse.java
do
  if [ -f "$f" ]; then
    echo "--- $f"
    sed -n '1,220p' "$f"
  fi
done

Repository: SLAT-TO/SLATE-TO-BE

Length of output: 21550


마감일 계산에서 endAt 포함 여부를 명시하세요.

findBriefingAssignedSchedulesBetweens.endAt >= :startAt로 종료 시각이 시작 시각 포함입니다. isScheduleEndDate()schedule.getEndAt().toLocalDate().isEqual(date)로 비교하므로, 다음날 00:00에 끝나는 장기 일정도 오늘 마감으로 분류됩니다. 마감일 정의가 최종 작업 시간이 포함되는 endAt 기준이라면 이 값은 정리하고, 별도 deadlineAt을 사용하세요.

🤖 Prompt for 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.

In
`@src/main/java/com/slatto/domain/notification/service/TodayBriefingService.java`
around lines 189 - 198, Clarify the deadline calculation used by
isScheduleEndDate and align it with the intended definition that the final
working time, not merely the endAt calendar date, determines the deadline. If
the deadline should differ from endAt, use the existing or appropriate
deadlineAt value; otherwise adjust the comparison so schedules ending at the
next day’s 00:00 are not classified as due today.

@guingguing
guingguing merged commit 303ef60 into develop Aug 7, 2026
2 checks passed
@guingguing
guingguing deleted the feature/140-briefing-policy-sync branch August 11, 2026 10:33
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.

FEAT: 오늘의 브리핑 정책 기준 반영

3 participants