Skip to content

[#250][fe][assistant] 피드백 조회 화면 추가#255

Merged
HanaHww2 merged 2 commits intodevfrom
feat/#250
Oct 22, 2025
Merged

[#250][fe][assistant] 피드백 조회 화면 추가#255
HanaHww2 merged 2 commits intodevfrom
feat/#250

Conversation

@HanaHww2
Copy link
Copy Markdown
Contributor

@HanaHww2 HanaHww2 commented Oct 21, 2025

#️⃣연관된 이슈

변경 타입

  • 신규 기능 추가/수정
  • 버그 수정
  • 리팩토링
  • 설정
  • 비기능 (주석 등 기능에 영향을 주지 않음)

변경 내용

  • as-is
  • to-be(변경 후 설명을 여기에 작성)
    • 피드백 조회 화면 추가
    • 에러 객체에 code 정보 추가

체크리스트

  • 코드가 제대로 동작하는지 확인했습니다.
  • 관련 테스트를 추가했습니다.
  • 문서(코드, 주석, README 등)를 업데이트했습니다.

코멘트

image

Summary by CodeRabbit

  • 새로운 기능

    • 날짜를 기반으로 피드백을 조회하고 표시하는 기능 추가
    • 캘린더로 특정 날짜의 피드백을 조회하는 일일 피드백 뷰 추가
  • 개선사항

    • 피드백 요청 시 에러 처리 강화 및 사용자 친화적 메시지 제공
    • 초과 사용량 관련 에러 메시지 추가
  • 리팩토링

    • 에러 처리 유틸리티 개선으로 더 나은 에러 정보 제공

@HanaHww2 HanaHww2 self-assigned this Oct 21, 2025
@HanaHww2 HanaHww2 added ✨ feature 기능 구현 🎨 frontend 프론트 마크업 및 스타일링 labels Oct 21, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Oct 21, 2025

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.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

개요

이 변경사항은 날짜별 피드백을 조회하고 표시하는 새로운 기능을 추가합니다. API 계층에 getFeedbacks(date) 엔드포인트를 추가하고, 서비스 계층에서 이를 래핑하며, 새로운 Vue 컴포저블 useFeedbackList에서 피드백 데이터를 메시지 형식으로 변환합니다. DailyFeedbackView 컴포넌트는 주간/월간 날짜 선택기를 통해 사용자가 날짜를 선택하면 해당 날짜의 피드백을 조회하고 메시지 형식으로 표시합니다. 또한 에러 처리 로직을 개선하여 API 에러 코드를 캡처하고 사용자 친화적 메시지를 제공합니다.

시퀀스 다이어그램

sequenceDiagram
    participant User
    participant DailyFeedbackView as DailyFeedbackView.vue
    participant useFeedbackList as useFeedbackList Composable
    participant Service as assistantService
    participant API as api.js
    participant Backend

    User->>DailyFeedbackView: 날짜 선택
    DailyFeedbackView->>useFeedbackList: selectedDate 변경 감지
    useFeedbackList->>useFeedbackList: fetchFeedbacksAsMessageForm(date) 실행
    useFeedbackList->>Service: getFeedbacks(date)
    Service->>API: getFeedbacksApi(date)
    API->>Backend: GET /v1/assistants/feedbacks/daily/${date}
    Backend-->>API: feedbacks 데이터 반환
    API-->>Service: axios 응답 반환
    Service-->>useFeedbackList: res.data 반환

    alt 성공 (피드백 있음)
        useFeedbackList->>useFeedbackList: user/system 메시지 교대로 구성
        useFeedbackList->>DailyFeedbackView: messages 배열 업데이트
        DailyFeedbackView->>User: Messages 컴포넌트 렌더링
    else 성공 (피드백 없음)
        useFeedbackList->>useFeedbackList: nomessages 메시지 설정
        DailyFeedbackView->>User: 콘텐츠 없음 메시지 표시
    else 에러 (INVALID_REQUEST)
        useFeedbackList->>useFeedbackList: 에러 메시지 설정
        DailyFeedbackView->>User: 에러 메시지 표시
    end
Loading

예상 코드 리뷰 노력

🎯 3 (Moderate) | ⏱️ ~20-25 minutes

분석:

  • 복잡도: 새로운 기능 구현이지만 기존 패턴 준수 (API → Service → Composable → Component)
  • 범위: 7개 파일 수정으로 중간 정도의 파일 산포도
  • 다양성: 이질적인 변경사항 (API 추가, 서비스 레이어, Vue 컴포저블, 컴포넌트, 에러 처리, 상수)
  • 로직 밀도: useFeedbackList 컴포저블에서 상태 관리, 감시자(watcher), 날짜 파싱, 메시지 포매팅이 포함됨
  • 편집 특성: 대부분 신규 추가이며 기존 기능 수정 최소화

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning 이 PR에는 피드백 조회 화면 추가 범위를 벗어나는 변경사항들이 포함되어 있습니다. errorUtils.js의 변경사항은 에러 객체에 code 속성을 추가하는 시스템 전반적인 리팩토링이며, useFeedbackForm.js의 에러 처리 개선도 일일 피드백 조회 화면 구현 자체와는 별개의 일반적 개선사항입니다. PR 설명에서 "리팩토링"을 언급하고 있지만, 연결된 이슈 #250은 피드백 조회 화면 추가만을 명시하고 있어 이러한 광범위한 에러 처리 개선이 범위 내인지 명확하지 않습니다. errorUtils.js와 useFeedbackForm.js의 변경사항을 범위 내 변경사항으로 포함시킬 것인지 검토해야 합니다. 만약 에러 객체에 code 정보 추가가 피드백 조회 기능에 필수적이라면 그 이유를 명시하거나, 이러한 리팩토링이 별도의 이슈로 분리되어야 하는지 검토를 권장합니다.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues Check ✅ Passed 연결된 이슈 #250은 "피드백 조회 화면(데일리)" 구현을 요청하고 있으며, 제출된 PR의 변경사항들이 이 목표를 충족합니다. DailyFeedbackView.vue 컴포넌트, useFeedbackList 컴포지션, getFeedbacks API 함수, 그리고 관련 상수 및 에러 처리 개선이 모두 일일 피드백 조회 기능을 제공합니다. 다만 이슈 #250에는 구체적인 요구사항이 TODO 항목으로만 표기되어 상세한 검증에 제한이 있으나, PR 설명과 구현 내용을 종합하면 주요 목표가 달성되었습니다.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed PR 제목 "[#250][fe][assistant] 피드백 조회 화면 추가"는 변경 사항의 핵심 내용과 완벽하게 일치합니다. 원본 요약에서 확인할 수 있듯이 이 PR의 주요 변경사항은 DailyFeedbackView.vue 컴포넌트를 추가하여 일일 피드백을 조회할 수 있는 화면을 구현한 것이며, 이를 지원하는 API, 서비스 레이어, 컴포저블 함수들이 함께 추가되었습니다. 제목은 이러한 주요 기능 추가를 명확하고 간결하게 설명하고 있으며, 에러 처리 개선 사항 같은 보조적인 변경사항을 포함하지 않는 것은 지시사항에서 명시된 대로 적절합니다. 팀원이 히스토리를 훑어볼 때 이 PR의 주요 변경사항을 명확하게 이해할 수 있습니다.

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 10

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f714827 and ba6be08.

📒 Files selected for processing (7)
  • front/src/features/assistant/api.js (1 hunks)
  • front/src/features/assistant/assistantService.js (1 hunks)
  • front/src/features/assistant/constants.js (1 hunks)
  • front/src/features/assistant/useFeedbackForm.js (2 hunks)
  • front/src/features/assistant/useFeedbackList.js (1 hunks)
  • front/src/features/assistant/views/DailyFeedbackView.vue (1 hunks)
  • front/src/shared/utils/errorUtils.js (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (5)
front/src/features/assistant/useFeedbackForm.js (1)
front/src/features/assistant/constants.js (2)
  • REQ_ERR_MESSAGES (44-46)
  • REQ_ERR_MESSAGES (44-46)
front/src/features/assistant/api.js (1)
front/src/features/assistant/assistantService.js (2)
  • getFeedbacks (21-27)
  • getFeedbacks (21-27)
front/src/features/assistant/assistantService.js (2)
front/src/features/assistant/api.js (2)
  • getFeedbacks (11-13)
  • getFeedbacks (11-13)
front/src/shared/utils/errorUtils.js (1)
  • wrapApi (41-49)
front/src/shared/utils/errorUtils.js (1)
front/src/features/auth/password.js (1)
  • message (11-12)
front/src/features/assistant/useFeedbackList.js (3)
front/src/features/assistant/constants.js (2)
  • LIST_ERR_MESSAGES (39-42)
  • LIST_ERR_MESSAGES (39-42)
front/src/features/assistant/assistantService.js (5)
  • res (12-12)
  • res (17-17)
  • res (23-23)
  • getFeedbacks (21-27)
  • getFeedbacks (21-27)
front/src/features/assistant/api.js (2)
  • getFeedbacks (11-13)
  • getFeedbacks (11-13)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test
🔇 Additional comments (5)
front/src/features/assistant/useFeedbackForm.js (1)

3-3: LGTM — 에러 메시지 사전 의존성 주입.

에러코드 기반 메시지 확장을 위해 REQ_ERR_MESSAGES를 가져오는 변경은 타당합니다.

front/src/features/assistant/useFeedbackList.js (2)

64-71: 초기 데이터 로딩을 명시적으로 처리하세요.

onMounted에서 selectedDate를 설정하지만 fetchFeedbacksAsMessageForm을 직접 호출하지 않고 watch에만 의존하고 있습니다.

다음 사항을 확인하세요:

  • selectedDate가 이미 해당 값으로 설정되어 있으면 watch가 트리거되지 않아 데이터가 로드되지 않을 수 있습니다.
  • 초기 렌더링 시 데이터 로딩이 항상 발생하는지 검증이 필요합니다.

명시적으로 fetch를 호출하는 것을 고려하세요:

   onMounted(() => {
     const routeDate = route.params.date
     if (routeDate) {
       selectedDate.value = parseYMD(routeDate)
       router.replace({ name: 'daily-feedback-list' })
+      fetchFeedbacksAsMessageForm(selectedDate.value)
+    } else {
+      fetchFeedbacksAsMessageForm(selectedDate.value)
     }
   })

45-45: XSS 취약점 우려는 부당합니다. 적절한 위협 완화가 이미 구현되어 있습니다.

검증 결과, txt 필드는 v-html로 렌더링되기 전에 parseMdToHtmlAndSanitize() 함수를 통해 처리됩니다. 이 함수는 DOMPurify.sanitize()를 사용하여 모든 HTML을 정제하므로, 사용자 입력은 위험한 스크립트나 이벤트 핸들러로부터 안전합니다. 따라서 현재 구현은 XSS 공격으로부터 보호되어 있습니다.

front/src/shared/utils/errorUtils.js (2)

23-23: code가 undefined일 때의 동작을 확인하세요.

모든 에러 경로에서 e.code = code를 할당하고 있습니다. code가 응답에 없는 경우 undefined가 할당됩니다.

의도된 동작인지 확인하세요:

  • 현재: e.code는 항상 존재하며, 값이 없으면 undefined입니다.
  • 대안: code가 존재할 때만 설정하여 속성 자체가 없도록 할 수 있습니다.

code가 존재할 때만 설정하려면:

   const e = new Error(dataMsg || fallbackMessage)
   e.fieldErrors = fieldErrors
-  e.code = code
+  if (code) e.code = code
   return e

모든 에러 경로에 동일하게 적용하세요. 그러나 일관성을 위해 현재 방식(항상 설정)도 유효한 선택입니다.

Also applies to: 31-31, 37-37


41-49: 변경 사항이 적절합니다.

wrapApi 함수의 포맷팅 변경은 코드 가독성을 유지하면서 일관된 스타일을 따릅니다.

@HanaHww2 HanaHww2 changed the title [#250[fe]][assistant] 피드백 조회 화면 추가 [#250][fe][assistant] 피드백 조회 화면 추가 Oct 21, 2025
Copy link
Copy Markdown
Member

@letsgilit letsgilit left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 👍👍👍

Copy link
Copy Markdown
Contributor

@cchoijjinyoung cchoijjinyoung left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

@HanaHww2 HanaHww2 merged commit c0aab7b into dev Oct 22, 2025
1 check passed
@HanaHww2 HanaHww2 deleted the feat/#250 branch October 22, 2025 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feature 기능 구현 🎨 frontend 프론트 마크업 및 스타일링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[assistant] 피드백 조회 화면(데일리)

3 participants