Fix all-workers-offline silent success bug, noisy logging, UX polish

server.js:
- Fix bug: when all targeted workers disconnect before step runs, results[] was empty
  and results.every() returned true vacuously (silent false success). Now tracks sentCount
  and fails with 'no_workers' log if nothing was actually dispatched
- Remove per-message console.log on every WebSocket message (high noise)
- Only log a warning for failed commands (not every success)

index.html:
- loadSchedules() catch now shows error message in scheduleList (was silent)
- abortExecution() shows server's error message from JSON body instead of generic string
  (e.g. "Execution is not running" instead of "Failed to abort execution")

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 13:48:35 -04:00
parent 8ff3700601
commit 18a6b642d1
2 changed files with 18 additions and 5 deletions

View File

@@ -1376,6 +1376,7 @@
document.getElementById('scheduleList').innerHTML = html;
} catch (error) {
console.error('Error loading schedules:', error);
document.getElementById('scheduleList').innerHTML = '<div class="empty" style="color:var(--terminal-red);">⚠ Failed to load schedules</div>';
}
}
@@ -2369,7 +2370,8 @@
closeModal('viewExecutionModal');
refreshData();
} else {
alert('Failed to abort execution');
const err = await response.json().catch(() => ({}));
alert(err.error || 'Failed to abort execution');
}
} catch (error) {
console.error('Error aborting execution:', error);