diff --git a/src/web/public/app.js b/src/web/public/app.js index aa60ae8b..7d28bac1 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -1561,6 +1561,35 @@ class ClaudemanApp { } } + async killAllSessions() { + const count = this.screenSessions?.length || 0; + if (count === 0) { + alert('No sessions to kill'); + return; + } + + const confirmed = confirm(`Kill all ${count} session(s)? This cannot be undone.`); + if (!confirmed) return; + + try { + const res = await fetch('/api/sessions', { method: 'DELETE' }); + const data = await res.json(); + if (data.success) { + // Clear local state + this.sessions.clear(); + this.screenSessions = []; + this.activeSessionId = null; + this.renderSessionTabs(); + this.renderScreenSessions(); + this.terminal.clear(); + this.terminal.reset(); + } + } catch (err) { + console.error('Failed to kill all sessions:', err); + alert('Failed to kill sessions: ' + err.message); + } + } + renderScreenSessions() { const body = document.getElementById('screenSessionsBody'); diff --git a/src/web/public/index.html b/src/web/public/index.html index ce51ceb9..a76c7259 100644 --- a/src/web/public/index.html +++ b/src/web/public/index.html @@ -133,6 +133,7 @@
Monitor
+
diff --git a/src/web/public/styles.css b/src/web/public/styles.css index f51024c9..08121ed1 100644 --- a/src/web/public/styles.css +++ b/src/web/public/styles.css @@ -697,6 +697,15 @@ body { background: var(--bg-hover); } +.btn-danger-sm { + color: #ff6b6b; +} + +.btn-danger-sm:hover { + color: #fff; + background: #dc3545; +} + .form-row { margin-bottom: 0.75rem; } @@ -890,7 +899,8 @@ body { .close-option { display: flex; flex-direction: column; - align-items: flex-start; + align-items: center; + text-align: center; padding: 0.75rem 1rem; background: var(--bg-hover); border: 1px solid var(--border);