fix: load pipeline stats in syncFileStatus and handle missing pipeline data

Problem:
- syncFileStatus() doesn't load pipeline progress data
- Files stuck in 'processing' without percentage display
- pollPipelineProgress() not started when pipeline data missing

Solution:
1. Add loadPipelineStats() call in syncFileStatus() for processing files
2. Start pollPipelineProgress() even when pipeline data is missing
3. Ensure progress bar always has data to display

Impact:
- Progress bar now shows percentage during deep scan
- Files no longer stuck in 'processing' state indefinitely
- Better handling of edge cases when API data is missing

Related: Core team needs to verify get_pipeline_stats API accuracy
This commit is contained in:
2026-07-25 01:36:28 +08:00
parent 58e614cb5c
commit c347c200b2
3 changed files with 5 additions and 14 deletions

13
dist/index.html vendored
View File

@@ -1,13 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Momentry Studio</title>
<script type="module" crossorigin src="/assets/index-XYmskk93.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-D8U_cUr3.css">
</head>
<body>
<div id="app"></div>
</body>
</html>

View File

@@ -886,6 +886,10 @@ export async function syncFileStatus(fileUuid: string): Promise<any> {
delete fileProgressCache.value[fileUuid] delete fileProgressCache.value[fileUuid]
} }
f.status = newStatus f.status = newStatus
if (newStatus === 'processing') {
await loadPipelineStats(fileUuid, true)
}
} }
} }

View File

@@ -786,7 +786,7 @@ async function loadFiles() {
} else if (pipeline && pipeline.overall_progress >= 1.0) { } else if (pipeline && pipeline.overall_progress >= 1.0) {
f.status = 'completed' f.status = 'completed'
} else if (!pipeline && f.status === 'processing') { } else if (!pipeline && f.status === 'processing') {
f.status = 'registered' pollPipelineProgress(f.file_uuid)
} }
await loadFileStats(f.file_uuid, true) await loadFileStats(f.file_uuid, true)