From 4678e78b95cc1d2fdbac01cc849384da037d1c4c Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 18 Jan 2026 22:32:45 +0100 Subject: [PATCH] feat(ui): add confirmation for long timed runs - Add confirmation dialog for runs 30+ minutes - Show duration in human-readable format (hours/minutes) - Replace alert with toast for empty prompt warning Co-Authored-By: Claude Opus 4.5 --- src/web/public/app.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/web/public/app.js b/src/web/public/app.js index 8a8ff196..ed80a5cb 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -773,10 +773,20 @@ class ClaudemanApp { } if (!prompt) { - alert('Please enter a prompt'); + this.showToast('Please enter a prompt', 'warning'); return; } + // Confirm for long runs (over 30 minutes) + if (duration >= 30) { + const hours = Math.floor(duration / 60); + const mins = duration % 60; + const timeStr = hours > 0 ? `${hours}h ${mins}m` : `${mins} minutes`; + if (!confirm(`Start a ${timeStr} timed run? This will use API credits for the duration.`)) { + return; + } + } + this.setRunning(true); this.terminal.writeln(''); this.terminal.writeln(`\x1b[1;36m─── Starting: ${prompt.substring(0, 60)}${prompt.length > 60 ? '...' : ''} ───\x1b[0m`);