Skip to content

Commit 27e2f53

Browse files
Revert "fix: update fallback behavior to check batch status instead of forcing navigation after 2 minutes"
This reverts commit 79d5964.
1 parent 79d5964 commit 27e2f53

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

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

10661066

10671067
useEffect(() => {

0 commit comments

Comments
 (0)