From c2177b659e257ace49002d6edf5d1619186a9bba Mon Sep 17 00:00:00 2001 From: arkon Date: Mon, 19 Jan 2026 02:40:03 +0100 Subject: [PATCH] fix: remove New Session panel entirely - Remove New Session slide-up panel from HTML - Remove createNewSession, hideNewSessionPanel, createSessionFromPanel functions - Remove Ctrl+N keyboard shortcut - Remove "New Session" from help modal - Clean up loadQuickStartCases and closeAllPanels references Co-Authored-By: Claude Opus 4.5 --- src/web/public/app.js | 59 --------------------------------------- src/web/public/index.html | 25 ----------------- 2 files changed, 84 deletions(-) diff --git a/src/web/public/app.js b/src/web/public/app.js index f38470b0..5cb5c766 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -149,12 +149,6 @@ class ClaudemanApp { this.quickStart(); } - // Ctrl/Cmd + N - new session - if ((e.ctrlKey || e.metaKey) && e.key === 'n') { - e.preventDefault(); - this.createNewSession(); - } - // Ctrl/Cmd + W - close active session if ((e.ctrlKey || e.metaKey) && e.key === 'w') { e.preventDefault(); @@ -637,7 +631,6 @@ class ClaudemanApp { this.cases = cases; const select = document.getElementById('quickStartCase'); - const newSessionSelect = document.getElementById('newSessionCase'); // Build options let options = ''; @@ -648,7 +641,6 @@ class ClaudemanApp { }); select.innerHTML = options; - newSessionSelect.innerHTML = options; // Auto-select first case and update directory display if (cases.length > 0) { @@ -767,56 +759,6 @@ class ClaudemanApp { } } - // ========== New Session ========== - - createNewSession() { - document.getElementById('newSessionPanel').classList.add('open'); - } - - hideNewSessionPanel() { - document.getElementById('newSessionPanel').classList.remove('open'); - } - - async createSessionFromPanel() { - const caseName = document.getElementById('newSessionCase').value; - const customDir = document.getElementById('newSessionDir').value.trim(); - - this.hideNewSessionPanel(); - - try { - if (customDir) { - // Create session with custom directory - const createRes = await fetch('/api/sessions', { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ workingDir: customDir }) - }); - const createData = await createRes.json(); - if (!createData.success) throw new Error(createData.error); - - // Start interactive - await fetch(`/api/sessions/${createData.session.id}/interactive`, { - method: 'POST' - }); - - this.selectSession(createData.session.id); - } else { - // Use quick-start with case - const res = await fetch('/api/quick-start', { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ caseName }) - }); - const data = await res.json(); - if (!data.success) throw new Error(data.error); - - this.selectSession(data.sessionId); - } - } catch (err) { - this.showToast('Failed to create session: ' + err.message, 'error'); - } - } - // ========== Directory Input ========== toggleDirInput() { @@ -1432,7 +1374,6 @@ class ClaudemanApp { this.closeAppSettings(); this.cancelCloseSession(); document.getElementById('respawnPanel').classList.remove('open'); - document.getElementById('newSessionPanel').classList.remove('open'); document.getElementById('taskPanel').classList.remove('open'); document.getElementById('processPanel').classList.remove('open'); } diff --git a/src/web/public/index.html b/src/web/public/index.html index 5411facb..ebf185ae 100644 --- a/src/web/public/index.html +++ b/src/web/public/index.html @@ -175,30 +175,6 @@ - -
-
- New Session - -
-
-
- - -
-
- - -
-
- - -
-
-
-