diff --git a/public/index.html b/public/index.html
index 75a173a..5518eab 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2818,11 +2818,13 @@
console.log(`Error: ${data.stderr}`);
}
- // Show terminal notification
- if (data.success) {
- showTerminalNotification('Command completed successfully', 'success');
- } else {
- showTerminalNotification('Command execution failed', 'error');
+ // Show terminal notification only for manual executions
+ if (!data.is_automated) {
+ if (data.success) {
+ showTerminalNotification('Command completed successfully', 'success');
+ } else {
+ showTerminalNotification('Command execution failed', 'error');
+ }
}
// If viewing execution details, refresh that specific execution
diff --git a/server.js b/server.js
index 9d3a278..dfc7405 100644
--- a/server.js
+++ b/server.js
@@ -260,7 +260,9 @@ wss.on('connection', (ws) => {
// For non-workflow executions, update status immediately
// For workflow executions, the workflow engine will update status
- const [execution] = await pool.query('SELECT workflow_id FROM executions WHERE id = ?', [execution_id]);
+ const [execution] = await pool.query('SELECT workflow_id, started_by FROM executions WHERE id = ?', [execution_id]);
+ const startedBy = execution.length > 0 ? (execution[0].started_by || '') : '';
+ const isAutomated = startedBy.startsWith('gandalf:') || startedBy.startsWith('scheduler:');
if (execution.length > 0 && !execution[0].workflow_id) {
// Only update status for quick commands (no workflow_id)
const finalStatus = success ? 'completed' : 'failed';
@@ -274,7 +276,8 @@ wss.on('connection', (ws) => {
worker_id: worker_id,
success: success,
stdout: stdout,
- stderr: stderr
+ stderr: stderr,
+ is_automated: isAutomated,
});
console.log(`Command result received for execution ${execution_id}: ${success ? 'success' : 'failed'}`);