fix(api): AI 파싱 타임존 미적용 버그 수정 및 date-fns 제거 (#220)#221
Conversation
- buildParseTodoPrompt에 timezone 파라미터 추가하여 사용자 로컬 시간 반영 - date-fns → dayjs 교체로 날짜 라이브러리 통일 - Controller에 @Timezone() 데코레이터 + @ApiHeader 추가 - 전체 테스트 수정: unit/integration/E2E (신규 prompt spec 11건 포함)
Summary of ChangesHello @dydals3440, 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은 AI 자연어 파싱 기능에서 발생하던 타임존 관련 버그를 수정하고, 날짜/시간 처리 라이브러리를 Highlights
Changelog
Activity
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
|
InMemoryReminderSchedulerAdapter와 TodoReminderJob 간 race condition으로 동일 todo+stage 알림이 2번 발송되는 버그를 ILockProvider 기반 dedup으로 수정. dayjs 플러그인(utc/timezone) 초기화를 dayjs.setup.ts로 중앙화하여 각 파일의 중복 extend 호출 제거.
📋 개요
AI 자연어 파싱 시 서버 UTC 시간을 사용하여 사용자 타임존과 최대 9시간 차이가 발생하는 버그를 수정하고,
date-fns의존성을 제거하여dayjs로 통일합니다.🏷️ 변경 유형
fix- 버그 수정refactor- 코드 리팩토링 (date-fns → dayjs)📦 영향 범위
apps/api- NestJS 백엔드📝 변경 내용
핵심 수정
buildParseTodoPrompt에timezone파라미터 추가 → 사용자 로컬 시간으로 프롬프트 생성date-fns→dayjs+ timezone/utc 플러그인 + ko locale로 교체AiService.parseTodo시그니처에timezone인자 추가AiController에@Timezone()데코레이터 +@ApiHeader(X-Timezone)추가의존성 정리
date-fns의존성 완전 제거 (1곳에서만 사용 중이었음)dayjs로 통일테스트
parse-todo.prompt.spec.ts(11건) - 타임존 변환, 한국어 요일, 프롬프트 구조 검증ai.service.spec.ts(26건),ai.controller.spec.ts(3건)ai.integration-spec.ts(9건, UTC 폴백 테스트 추가)ai.e2e-spec.ts(24건, 타임존 처리 섹션 추가)🧪 테스트
테스트 방법
테스트 결과
✅ 체크리스트
작성자 확인
pnpm check(Biome) 검사를 통과했습니다pnpm test)date-fns참조가apps/api/src/에서 완전 제거됨을 확인🔗 관련 이슈
Closes #220