Skip to content

feat: 피드백 기능 프론트엔드 구현 및 API 연동#1640

Merged
woowahan-neo merged 20 commits intomainfrom
feature/integrate-ai-feedback-qna
Mar 10, 2025
Merged

feat: 피드백 기능 프론트엔드 구현 및 API 연동#1640
woowahan-neo merged 20 commits intomainfrom
feature/integrate-ai-feedback-qna

Conversation

@jaeyeonling
Copy link
Contributor

@jaeyeonling jaeyeonling commented Mar 3, 2025

이 풀 리퀘스트(PR)에는 DataLoaderApplicationListener 클래스의 주요 변경 사항, 재시도(retry) 설정 추가, 일부 의존성 업데이트, 그리고 피드백 기능의 프론트엔드 구현 및 API 연동이 포함됩니다. 주요 변경 사항은 아래와 같이 정리됩니다.


✅ 의존성 업데이트 (Dependency Update)

  • backend/build.gradlespring-retry 의존성 추가하여 재시도(retry) 메커니즘 지원

DataLoaderApplicationListener 개선 사항 (Enhancements to DataLoaderApplicationListener)

  • 새로운 데이터 로딩 기능을 지원하기 위해 DataLoaderApplicationListener.java다양한 리포지토리(repository) 의존성 추가import 재구성
  • 외래 키 체크 (foreign key checks) 관련 오타 수정
  • Organization, OrganizationGroup, OrganizationGroupMember, OrganizationGroupSession, Question, Answer, AnswerFeedback 데이터를 로드하기 위한 새로운 데이터 삽입 메서드 추가
  • Organization, OrganizationGroup, OrganizationGroupMember, OrganizationGroupSession, Question, Answer, AnswerFeedback을 위한 새로운 더미(dummy) 데이터 추가 및 enum 업데이트

✅ 설정 추가 (Configuration Addition)

  • 재시도(retry) 기능을 활성화하기 위해 RetryConfig.java 클래스 추가 (spring-retry 사용)

✅ 코드 정리 (Minor Code Cleanup)

  • AnswerFeedbackService.java에서 사용되지 않는 import 제거리스트 핸들링을 위한 필요한 import 추가

✅ 피드백 기능 프론트엔드 구현 및 API 연동 (Feedback Feature Frontend Implementation & API Integration)

  • 프론트엔드에서 피드백 데이터를 불러오고 표시하는 기능 추가
  • 답변(Answer)에 대한 피드백을 등록하고 수정할 수 있도록 API 연동
  • FeedbackBody UI 개선 및 스타일 적용
  • 프론트엔드와 백엔드의 피드백 처리 로직 연결

📌 요약 및 영향 (Summary & Impact)

  • DataLoaderApplicationListener가 개선되어 새로운 엔터티 데이터를 로드할 수 있고, 트랜잭션 무결성을 보장
  • RetryConfig 추가로 재시도(retry) 기능 활성화
  • AnswerFeedbackService 코드 정리
  • 프론트엔드에서 피드백 기능을 사용할 수 있도록 API와 연동 및 UI 적용

이 PR을 통해 데이터 로딩 기능이 강화되었으며, 재시도(retry) 기능이 추가되었고, 프론트엔드에서 피드백 기능을 활용할 수 있도록 개선되었습니다. 🚀

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.

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 visible column has been added to the AnswerFeedback entity and table, allowing for control over feedback visibility. A query was added to the AnswerFeedbackRepository to find recent visible feedback by member and question IDs.
  • Study Log Integration: The StudylogService has been updated to incorporate feedback data by utilizing AnswerFeedbackService to retrieve feedback information. The StudylogResponse and AnswerResponse DTOs were modified to include feedback details.
  • Temporary Feedback Controller: A TempFeedbackController was created to simulate feedback events, which is likely for testing or demonstration purposes. It publishes AnswerUpdatedEvent events for a range of answer IDs.
  • AnswerFeedbackService: The AnswerFeedbackService was 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 @EventListener import.
    • Added a check to prevent processing empty answer content or mission goals.
    • Added findRecentByMemberIdAndQuestionIds method to retrieve recent feedback.
    • Added logging for saved AnswerFeedback.
  • backend/src/main/java/wooteco/prolog/session/domain/AnswerFeedback.java
    • Added a visible column to control feedback visibility.
    • Added constructors to initialize the visible field.
    • Added getter methods for strengths, improvementPoints and additionalLearning.
  • 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 AnswerUpdatedEvent events.
  • backend/src/main/java/wooteco/prolog/studylog/application/StudylogService.java
    • Added AnswerFeedbackService dependency.
    • Modified retrieveStudylogById to fetch and include feedback data.
    • Modified toStudylogResponse to include feedback in the response.
    • Removed unused imports.
  • 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 of methods to include AnswerFeedback data in the response.
  • backend/src/main/resources/db/migration/prod/V14__alter_table_answer_feedback.sql
    • Added a visible column to the answer_feedback table.
  • backend/src/test/java/wooteco/prolog/session/domain/repository/AnswerFeedbackRepositoryTest.java
    • Added a test case to verify the findRecentByMemberIdAndQuestionIds method.
  • 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

  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.

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 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.

@woowahan-neo woowahan-neo changed the title Feature/integrate ai feedback qna feat: 피드백 기능 프론트엔드 구현 및 API 연동 Mar 10, 2025
@woowahan-neo woowahan-neo merged commit ca1c720 into main Mar 10, 2025
1 check failed
@woowahan-neo woowahan-neo deleted the feature/integrate-ai-feedback-qna branch March 10, 2025 09:37
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.

3 participants