diff --git a/renderer/app.js b/renderer/app.js index 4e2ade4..358b3ba 100644 --- a/renderer/app.js +++ b/renderer/app.js @@ -1315,7 +1315,7 @@ function getSelectedJobLinks() { async function startUpload() { if (uploading) return; // Wait for any running health check to finish (e.g. startup auto-check) - while (healthCheckRunning) await new Promise(r => setTimeout(r, 100)); + for (let _hcWait = 0; healthCheckRunning && _hcWait < 300; _hcWait++) await new Promise(r => setTimeout(r, 100)); // max 30s uploading = true; // set immediately to prevent double-click race updateQueueActionButtons(); @@ -1386,7 +1386,7 @@ async function startUpload() { async function startSelectedUpload() { if (uploading) return; - while (healthCheckRunning) await new Promise(r => setTimeout(r, 100)); + for (let _hcWait = 0; healthCheckRunning && _hcWait < 300; _hcWait++) await new Promise(r => setTimeout(r, 100)); // max 30s uploading = true; // set immediately to prevent double-click race updateQueueActionButtons(); @@ -1567,6 +1567,7 @@ function handleProgress(data) { function handleBatchDone(summary) { uploading = false; applySummaryResults(summary); + _deletedJobIds.clear(); // Free memory — stale IDs no longer needed after batch completes // Reset aborted jobs back to queued so they can be restarted for (const job of queueJobs) {