From 05322000f3739a1a07c96666c6712c8a2738113d Mon Sep 17 00:00:00 2001 From: arkon Date: Mon, 19 Jan 2026 15:03:45 +0100 Subject: [PATCH] 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 --- src/web/public/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/web/public/app.js b/src/web/public/app.js index 62293fd0..52032860 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -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;