fix: Renewal Agent 재조회 시 입력 상태가 초기화되는 문제 수정 - #375
Merged
Conversation
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.
개요
Renewal Agent가
scenario=ask_hr응답을 정상적으로 반환한 뒤에도, 업무 상세 페이지의 Task 재조회 과정에서RenewalExecutionModal이 언마운트되면서 Agent 결과와 입력 상태가 초기화되는 문제를 수정합니다.기존에는 Renewal 실행 성공 후
onApplied()에서refetchTask()가 호출되면taskStatus가 일시적으로loading으로 변경되고,CaseDetailPage가 전체 로딩 화면을 반환했습니다.이 과정에서 열려 있던
RenewalExecutionModal이 언마운트되어 내부의result,instruction,slotAnswers상태가 사라졌고, 재조회 완료 후 다시 처음의요청 내용입력 화면으로 돌아가는 문제가 있었습니다.문제 상황
Renewal Agent 실행 결과가 다음과 같이 정상적으로 반환되는 경우에도:
{ "task_status": "NEEDS_INFO", "scenario": "ask_hr", "missing_slots": [ "wage", "working_hours", "job_description", "work_location", "contract_period" ] }사용자는 아래 추가 정보를 입력할 화면으로 이동하지 못했습니다.
실제 흐름은 다음과 같았습니다.
원인
useApiQuery는 refetch 시 기존data를 유지하면서status만loading으로 변경합니다.하지만
CaseDetailPage에서는 기존 Task 데이터 존재 여부와 관계없이taskStatus === 'loading'이면 전체 페이지를 로딩 화면으로 교체하고 있었습니다.따라서 최초 로딩뿐 아니라 백그라운드 refetch에서도 페이지 하위 컴포넌트가 모두 언마운트되었습니다.
변경 내용
핵심 변경 방향:
기대 동작
수정 후 흐름:
검증 항목
ask_hr를 반환하면 USER_INPUT 필드가 표시되는지refetchTask()중에도RenewalExecutionModal이 유지되는지result,instruction,slotAnswers가 refetch 과정에서 초기화되지 않는지답변 제출하고 다시 실행버튼이 유지되고 정상 동작하는지현재 local 상 AI repo가 연결되어 있지 않아, local 테스트는 진행하지 못했습니다.
배포 링크 상에서 직접 검증 후, 문제 시 revert하거나 수정 PR을 다시 올릴 예정입니다.
영향 범위
Client의
CaseDetailPage로딩 처리와 Renewal Agent Modal 유지 동작에 한정된 수정입니다.Server/AI API 계약 및 Renewal 실행 로직은 변경하지 않습니다.