Repository navigation
[ai-meal] AI 식단 생성 결과 undefined 표시 수정 - #93
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 PR 요약
undefined건으로 표시되던 문제를 수정하였습니다. 백엔드의 비동기 작업 응답(id,status)에 맞게 상태를 폴링하고, 완료 후 실제 식단 수를 집계해 표시하도록 변경하였습니다.📋 작업 내용
POST /meals/ai-generations응답 타입을 실제 스펙(AiGenerationResponse { id, status })에 맞게 수정하였습니다. 기존에는 응답에 존재하지 않는month,totalMeals필드를 그대로 화면에 표시하여undefined건으로 렌더링되었습니다.GET /meals/ai-generations/{id}상태 조회 API(getAiGenerationApi)를 추가하고,generate()가 2초 간격(최대 90초)으로SUCCEEDED/FAILED까지 폴링하도록 변경하였습니다.GET /diets에서 해당 월의 식단 개수를 집계하여생성된 식단 수로 표시하도록 하였습니다.409응답 시, 기존 식단이 있으면 해당 요약을 표시하고 아직 생성 중이면 안내 문구를 표시하도록 하였습니다.다시 생성·reset실행 시 이전 폴링 루프가 상태를 덮어쓰지 않도록 시퀀스 가드를 추가하였습니다.🤝 리뷰 시 참고사항
EvaluationPanel이 사용하는budgetInfo·validationErrors는 optional로 유지하여 기존 폴백(?? {},?? []) 동작이 그대로 유지됩니다.