From 9eed2f3bef6528b2b6f386746d25eb8d686f827e Mon Sep 17 00:00:00 2001 From: happybell80 Date: Mon, 1 Dec 2025 11:58:59 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=ED=8C=8C=EB=B9=84=EC=BD=98=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EB=B0=8F=20=EC=97=90=EB=9F=AC=20=EB=A1=9C=EA=B9=85?= =?UTF-8?q?=20=EA=B0=9C=EC=84=A0=20=EB=82=B4=EC=9A=A9=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=20(2025-12-01)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../251128_ir_valuation_frontend_setup.md | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/journey/troubleshooting/251128_ir_valuation_frontend_setup.md b/journey/troubleshooting/251128_ir_valuation_frontend_setup.md index d927b41..8e3da2e 100644 --- a/journey/troubleshooting/251128_ir_valuation_frontend_setup.md +++ b/journey/troubleshooting/251128_ir_valuation_frontend_setup.md @@ -92,12 +92,32 @@ curl -X POST http://localhost/rb8001/api/ir-deck/evaluate \ - **UI 컴포넌트 분리**: `components/features/FileMessage.tsx` - 파일 메시지 전용 컴포넌트 - **타입 정의**: `types/message.ts` - Message 인터페이스 확장 (파일 정보 포함) -### UX 개선 -- 파일 업로드를 채팅 메시지 버블로 표시 (진행률 포함) -- 파일 업로드 후 자동 평가 시작 제거, 사용자 입력 대기 -- 사용자 메시지 전송 시 파일과 함께 평가 시작 - ### 교훈 - React 구조 원칙 준수: 계층 분리 (UI → Hooks → Services) - 컴포넌트 단일 책임: 897줄 파일을 기능별로 분리 - 사용자 제어권: 파일 업로드 후 즉시 평가가 아닌 사용자 확인 후 진행 + +## 추가 개선 사항 (2025-11-29) + +### UX 개선 +- 파일 업로드 완료 후 추천 질문 버튼 표시, 파일과 메시지 버블 통합 +- 로딩 상태 통합 (`isEvaluating` + `isLoading`), 파일 없이 채팅 불가 처리 + +### 코드 품질 +- `console.log` 개발 환경 조건 처리, 코드 중복 제거 (`sendMessage` 통합) +- 상수 분리 (`constants/questions.ts`), 변수명 개선 + +### API 스펙 준수 +- 타입 정의 수정: `UploadResponse`(filename, message), `ChatResponse`(answer), `FeedbackResponse` 추가 +- 파일 없이 채팅 시 오류 메시지 표시 + +## 파비콘 추가 및 에러 로깅 개선 (2025-12-01) + +### 변경 사항 +- **파비콘 추가**: `public/favicon.svg` 생성, `index.html:6-7` 링크 추가 +- **로깅 유틸리티**: `src/utils/logger.ts` 생성 (환경별 일관된 로깅) +- **에러 로깅 교체**: `src/pages/ir-valuation.tsx` - `console.error` → `logger.error()` (4곳: 100, 116, 162, 225) + +### 교훈 +- 프로덕션 환경에서도 에러 로그 기록 필요: `logger.error()`는 모든 환경에서 동작 +- 브라우저 기본 요청(favicon.ico)은 미리 처리하여 404 오류 방지