fix(ui): remove Node.js process references from browser code

process.env.HOME and process.cwd() don't exist in browsers.
Replaced with proper error handling when case path is missing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-19 15:03:45 +01:00
co-authored by Claude Opus 4.5
parent d412096649
commit 05322000f3
+4 -2
View File
@@ -839,7 +839,8 @@ class ClaudemanApp {
if (!createCaseData.success) throw new Error(createCaseData.error || 'Failed to create case');
}
const workingDir = caseData.path || `${process.env.HOME}/claudeman-cases/${caseName}`;
const workingDir = caseData.path;
if (!workingDir) throw new Error('Case path not found');
let firstSessionId = null;
// Find the highest existing w-number for this case to avoid duplicates
@@ -928,7 +929,8 @@ class ClaudemanApp {
// Get the case path
const caseRes = await fetch(`/api/cases/${caseName}`);
const caseData = await caseRes.json();
const workingDir = caseData.path || process.cwd();
const workingDir = caseData.path;
if (!workingDir) throw new Error('Case path not found');
// Find the highest existing s-number for shells to avoid duplicates
let startNumber = 1;