Conversation
Summary of ChangesHello @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
Using Gemini Code AssistThe 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
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 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
|
Test Results16 tests 16 ✅ 2s ⏱️ Results for commit 4a903b2. |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
LocalDateTime.now()는 시스템의 기본 시간대를 사용합니다. 서버가 다른 시간대에서 실행될 경우 예기치 않은 동작을 유발할 수 있습니다. 시간대 문제를 방지하려면 LocalDateTime.now(ZoneOffset.UTC)와 같이 UTC를 명시적으로 사용하는 것이 좋습니다. 이 변경을 적용하려면 java.time.ZoneOffset을 import해야 합니다.
| this.lastAlarmToggleAt = LocalDateTime.now(); | |
| this.lastAlarmToggleAt = LocalDateTime.now(java.time.ZoneOffset.UTC); |
Related issue 🛠
어떤 변경사항이 있었나요?
Work Description ✏️
작업 내용을 작성해주세요.
Uncompleted Tasks 😅
To Reviewers 📢
리뷰어가 알면 좋은 내용을 작성해주세요.