Skip to content

Commit 79d5964

Browse files
fix: update fallback behavior to check batch status instead of forcing navigation after 2 minutes
1 parent bda0369 commit 79d5964

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/frontend/src/pages/modernizationPage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,16 +1052,16 @@ useEffect(() => {
10521052
updateSummaryStatus();
10531053
}
10541054

1055-
// Ultimate fallback: If on page for 2+ minutes with no completion, force navigation
1055+
// Ultimate fallback: If on page for 2+ minutes with no completion, check batch status instead of force-navigating
10561056
const timeSincePageLoad = Date.now() - pageLoadTime;
10571057
if (timeSincePageLoad > 120000 && !allFilesCompleted && nonSummaryFiles.length > 0) {
1058-
console.log("Page loaded for 2+ minutes without completion, forcing navigation to batch view");
1059-
navigate(`/batch-view/${batchId}`);
1058+
console.log("Page loaded for 2+ minutes without completion, checking batch status");
1059+
updateSummaryStatus();
10601060
}
10611061
}, 5000); // Check every 5 seconds
10621062

10631063
return () => clearInterval(checkInactivity);
1064-
}, [lastActivityTime, files, allFilesCompleted, updateSummaryStatus, pageLoadTime, navigate, batchId]);
1064+
}, [lastActivityTime, files, allFilesCompleted, updateSummaryStatus, pageLoadTime, batchId]);
10651065

10661066

10671067
useEffect(() => {

0 commit comments

Comments
 (0)