fix: 진행 페이지 리로드 시 무한 로딩 + 동시 검사 수 상한 수정

- 리로드 시 API에서 현재 상태를 조회하여 스토어 복원 (initFromApi)
- SITE_CONCURRENCY 서버 상한 4→8로 변경 (사용자 설정 8이 제대로 동작)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jungwoo choi
2026-02-13 17:50:14 +09:00
parent 1e50b72fd8
commit 3d03c47aaa
3 changed files with 32 additions and 1 deletions

View File

@ -1,7 +1,9 @@
"use client";
import { useEffect } from "react";
import { useSiteInspectionStore } from "@/stores/useSiteInspectionStore";
import { useSiteInspectionSSE } from "@/hooks/useSiteInspectionSSE";
import { useSiteInspectionResult } from "@/lib/queries";
import { Progress } from "@/components/ui/progress";
import { Card, CardContent } from "@/components/ui/card";
import { ErrorState } from "@/components/common/ErrorState";
@ -36,8 +38,18 @@ export function SiteCrawlProgress({
discoveredPages,
aggregateScores,
errorMessage,
initFromApi,
} = useSiteInspectionStore();
// API에서 현재 상태 조회 (리로드 시 스토어 복원용)
const { data: apiResult } = useSiteInspectionResult(siteInspectionId);
useEffect(() => {
if (apiResult && status === "idle") {
initFromApi(apiResult);
}
}, [apiResult, status, initFromApi]);
// SSE 연결
useSiteInspectionSSE(siteInspectionId);