diff --git a/src/web/public/app.js b/src/web/public/app.js index 908fd8e8..edfbafe2 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -507,10 +507,12 @@ class ClaudemanApp { async loadState() { try { const res = await fetch('/api/status'); + if (!res.ok) throw new Error(`HTTP ${res.status}`); const data = await res.json(); this.handleInit(data); } catch (err) { console.error('Failed to load state:', err); + this.showToast('Failed to load state: ' + err.message, 'error'); } } @@ -518,10 +520,12 @@ class ClaudemanApp { async loadCases() { try { const res = await fetch('/api/cases'); + if (!res.ok) throw new Error(`HTTP ${res.status}`); this.cases = await res.json(); this.renderCases(); } catch (err) { console.error('Failed to load cases:', err); + this.showToast('Failed to load cases', 'error'); } } @@ -1184,12 +1188,17 @@ class ClaudemanApp { `; + // Extract short working directory name + const workingDir = s.workingDir || ''; + const shortDir = workingDir.split('/').pop() || workingDir; + return `