Conversation
There was a problem hiding this comment.
Hello @jaeyeonling, 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!
Summary of Changes
This pull request focuses on improving the feedback functionality and integrating it with the study log system. The key changes include adding visibility to feedback, creating a temporary feedback controller, and updating the study log service to include feedback data. The goal is to create a more structured feedback system that is better integrated with study logs.
Highlights
- Feedback Visibility: A
visiblecolumn has been added to theAnswerFeedbackentity and table, allowing for control over feedback visibility. A query was added to theAnswerFeedbackRepositoryto find recent visible feedback by member and question IDs. - Study Log Integration: The
StudylogServicehas been updated to incorporate feedback data by utilizingAnswerFeedbackServiceto retrieve feedback information. TheStudylogResponseandAnswerResponseDTOs were modified to include feedback details. - Temporary Feedback Controller: A
TempFeedbackControllerwas created to simulate feedback events, which is likely for testing or demonstration purposes. It publishesAnswerUpdatedEventevents for a range of answer IDs. - AnswerFeedbackService: The
AnswerFeedbackServicewas updated to handle cases where answer content or mission goals are empty, preventing null pointer exceptions. A method was added to find recent feedback by member ID and question IDs.
Changelog
Click here to see the changelog
- backend/src/main/java/wooteco/prolog/session/application/AnswerFeedbackService.java
- Removed unnecessary
@EventListenerimport. - Added a check to prevent processing empty answer content or mission goals.
- Added
findRecentByMemberIdAndQuestionIdsmethod to retrieve recent feedback. - Added logging for saved AnswerFeedback.
- Removed unnecessary
- backend/src/main/java/wooteco/prolog/session/domain/AnswerFeedback.java
- Added a
visiblecolumn to control feedback visibility. - Added constructors to initialize the
visiblefield. - Added getter methods for strengths, improvementPoints and additionalLearning.
- Added a
- backend/src/main/java/wooteco/prolog/session/domain/Question.java
- Added a constructor to create a Question object.
- backend/src/main/java/wooteco/prolog/session/domain/repository/AnswerFeedbackRepository.java
- Added a query to find recent visible feedback by member ID and question IDs.
- backend/src/main/java/wooteco/prolog/session/ui/TempFeedbackController.java
- Created a temporary controller to simulate feedback events by publishing
AnswerUpdatedEventevents.
- Created a temporary controller to simulate feedback events by publishing
- backend/src/main/java/wooteco/prolog/studylog/application/StudylogService.java
- Added
AnswerFeedbackServicedependency. - Modified
retrieveStudylogByIdto fetch and include feedback data. - Modified
toStudylogResponseto include feedback in the response. - Removed unused imports.
- Added
- backend/src/main/java/wooteco/prolog/studylog/application/dto/AnswerResponse.java
- Added nullable fields for strengths, improvementPoints and additionalLearning.
- Added methods to create AnswerResponse objects with and without AnswerFeedback data.
- backend/src/main/java/wooteco/prolog/studylog/application/dto/StudylogResponse.java
- Modified
ofmethods to includeAnswerFeedbackdata in the response.
- Modified
- backend/src/main/resources/db/migration/prod/V14__alter_table_answer_feedback.sql
- Added a
visiblecolumn to theanswer_feedbacktable.
- Added a
- backend/src/test/java/wooteco/prolog/session/domain/repository/AnswerFeedbackRepositoryTest.java
- Added a test case to verify the
findRecentByMemberIdAndQuestionIdsmethod.
- Added a test case to verify the
- backend/src/test/java/wooteco/prolog/studylog/application/StudylogServiceTest.java
- Added AnswerFeedbackService mock.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| 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 issue 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 is currently in preview and 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 to provide feedback.
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.
Did you know?
The term 'debugging' is said to have originated in 1947 when a moth was found stuck in a relay of the Harvard Mark II computer, causing it to malfunction.
Footnotes
-
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. ↩
There was a problem hiding this comment.
Code Review
This pull request introduces several changes to improve the feedback functionality and integrate it with the study log system. The changes include adding feedback visibility, creating a temporary feedback controller, and updating the study log service. Overall, the changes seem well-structured and aim to enhance the user experience. However, there are a few areas that could benefit from further review and potential improvement.
Merge Readiness
The pull request introduces significant changes to the feedback system and its integration with study logs. While the changes appear to be well-structured and address the intended goals, a thorough review is recommended before merging. I am unable to approve this pull request, and recommend that others review and approve this code before merging.
이 풀 리퀘스트(PR)에는
DataLoaderApplicationListener클래스의 주요 변경 사항, 재시도(retry) 설정 추가, 일부 의존성 업데이트, 그리고 피드백 기능의 프론트엔드 구현 및 API 연동이 포함됩니다. 주요 변경 사항은 아래와 같이 정리됩니다.✅ 의존성 업데이트 (Dependency Update)
backend/build.gradle에spring-retry의존성 추가하여 재시도(retry) 메커니즘 지원✅
DataLoaderApplicationListener개선 사항 (Enhancements toDataLoaderApplicationListener)DataLoaderApplicationListener.java에 다양한 리포지토리(repository) 의존성 추가 및 import 재구성Organization,OrganizationGroup,OrganizationGroupMember,OrganizationGroupSession,Question,Answer,AnswerFeedback데이터를 로드하기 위한 새로운 데이터 삽입 메서드 추가Organization,OrganizationGroup,OrganizationGroupMember,OrganizationGroupSession,Question,Answer,AnswerFeedback을 위한 새로운 더미(dummy) 데이터 추가 및 enum 업데이트✅ 설정 추가 (Configuration Addition)
RetryConfig.java클래스 추가 (spring-retry사용)✅ 코드 정리 (Minor Code Cleanup)
AnswerFeedbackService.java에서 사용되지 않는 import 제거 및 리스트 핸들링을 위한 필요한 import 추가✅ 피드백 기능 프론트엔드 구현 및 API 연동 (Feedback Feature Frontend Implementation & API Integration)
FeedbackBodyUI 개선 및 스타일 적용📌 요약 및 영향 (Summary & Impact)
DataLoaderApplicationListener가 개선되어 새로운 엔터티 데이터를 로드할 수 있고, 트랜잭션 무결성을 보장RetryConfig추가로 재시도(retry) 기능 활성화AnswerFeedbackService코드 정리이 PR을 통해 데이터 로딩 기능이 강화되었으며, 재시도(retry) 기능이 추가되었고, 프론트엔드에서 피드백 기능을 활용할 수 있도록 개선되었습니다. 🚀