Skip to content

feat: 시간이 지난 Alarm은 다시 받기 해도 안 보이기#75

Merged
wlgusqkr merged 1 commit intodevfrom
feat/#74
Jan 23, 2026
Merged

feat: 시간이 지난 Alarm은 다시 받기 해도 안 보이기#75
wlgusqkr merged 1 commit intodevfrom
feat/#74

Conversation

@wlgusqkr
Copy link
Contributor

Related issue 🛠

어떤 변경사항이 있었나요?

  • 🐛 BugFix Something isn't working
  • 💻 CrossBrowsing Browser compatibility
  • 🌏 Deploy Deploy
  • 🎨 Design Markup & styling
  • 📃 Docs Documentation writing and editing (README.md, Swagger, etc.)
  • ✨ Feature Feature
  • 🔨 Refactor Code refactoring
  • ⚙️ Setting Development environment setup
  • ✅ Test Test related

Work Description ✏️

작업 내용을 작성해주세요.

  • 작업 내용

Uncompleted Tasks 😅

  • Task1

To Reviewers 📢

리뷰어가 알면 좋은 내용을 작성해주세요.

@wlgusqkr wlgusqkr linked an issue Jan 23, 2026 that may be closed by this pull request
@gemini-code-assist
Copy link

Summary of Changes

Hello @wlgusqkr, 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!

이 PR은 알람 관리를 개선하기 위한 새로운 기능을 도입합니다. 사용자가 구독에 대한 알람 설정을 토글할 때, 해당 토글 시점 이전에 생성된 알람은 더 이상 표시되지 않도록 합니다. 이는 사용자에게 더 깔끔하고 관련성 높은 알람 기록을 제공하여, 설정 변경 후 오래된 알림을 보지 않도록 합니다.

Highlights

  • 새로운 필드 추가: Subscription 엔티티와 데이터베이스에 lastAlarmToggleAt 필드를 추가하여 알람 활성화 상태가 마지막으로 변경된 시점을 기록합니다.
  • 알람 조회 로직 개선: 알람 조회 시 lastAlarmToggleAt을 기준으로 오래된 알람을 필터링하도록 쿼리 로직을 수정하여, 사용자가 알람 설정을 변경한 시점 이전에 생성된 알람은 더 이상 표시되지 않도록 합니다.
  • 알람 토글 시점 기록: updateIsAlarmEnabled 메서드를 수정하여 알람 활성화 상태가 변경될 때 lastAlarmToggleAt을 현재 시간으로 자동 업데이트하도록 했습니다.
  • 단위 테스트 추가: 새로운 알람 필터링 로직의 정확성을 보장하기 위해 lastAlarmToggleAt의 동작과 isAlarmEnabled 상태에 따른 알람 조회에 대한 포괄적인 단위 테스트를 추가했습니다.
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.

@github-actions
Copy link

Test Results

16 tests   16 ✅  2s ⏱️
 8 suites   0 💤
 8 files     0 ❌

Results for commit 4a903b2.

@wlgusqkr wlgusqkr merged commit 5d4c59f into dev Jan 23, 2026
2 checks passed
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

This pull request introduces a new column last_alarm_toggle_at to the subscriptions table to record the last time the alarm was toggled. The code changes modify the Subscription entity to include this new field and update the updateIsAlarmEnabled method to set the lastAlarmToggleAt field when the alarm is enabled or disabled. The AlarmDynamicRepositoryImpl is updated to filter alarms based on the lastAlarmToggleAt timestamp, ensuring that only alarms created after the last toggle are retrieved. Additionally, tests are added to verify that alarms are filtered correctly based on the lastAlarmToggleAt field. The reviewer suggested using LocalDateTime.now(java.time.ZoneOffset.UTC) instead of LocalDateTime.now() to avoid potential timezone issues.

if (alarmEnabled != null) {
if (alarmEnabled != null && this.isAlarmEnabled != alarmEnabled) {
this.isAlarmEnabled = alarmEnabled;
this.lastAlarmToggleAt = LocalDateTime.now();

Choose a reason for hiding this comment

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

high

LocalDateTime.now()는 시스템의 기본 시간대를 사용합니다. 서버가 다른 시간대에서 실행될 경우 예기치 않은 동작을 유발할 수 있습니다. 시간대 문제를 방지하려면 LocalDateTime.now(ZoneOffset.UTC)와 같이 UTC를 명시적으로 사용하는 것이 좋습니다. 이 변경을 적용하려면 java.time.ZoneOffset을 import해야 합니다.

Suggested change
this.lastAlarmToggleAt = LocalDateTime.now();
this.lastAlarmToggleAt = LocalDateTime.now(java.time.ZoneOffset.UTC);

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] 시간이 지난 Alarm은 다시 받기 해도 안 보이기

1 participant