diff --git a/apps/frontend/src/main/agent/agent-queue.ts b/apps/frontend/src/main/agent/agent-queue.ts index a2157588..11122ddb 100644 --- a/apps/frontend/src/main/agent/agent-queue.ts +++ b/apps/frontend/src/main/agent/agent-queue.ts @@ -19,9 +19,6 @@ import { transformIdeaFromSnakeCase, transformSessionFromSnakeCase } from '../ip import { transformRoadmapFromSnakeCase } from '../ipc-handlers/roadmap/transformers'; import type { RawIdea } from '../ipc-handlers/ideation/types'; import { getPathDelimiter } from '../platform'; -import { readSettingsFile } from '../settings-utils'; -import { debounce } from '../utils/debounce'; -import { writeFileWithRetry } from '../utils/atomic-file'; /** Maximum length for status messages displayed in progress UI */ const STATUS_MESSAGE_MAX_LENGTH = 200; diff --git a/apps/frontend/src/main/index.ts b/apps/frontend/src/main/index.ts index 4e438940..6df4ae9e 100644 --- a/apps/frontend/src/main/index.ts +++ b/apps/frontend/src/main/index.ts @@ -52,11 +52,9 @@ import { readSettingsFile } from './settings-utils'; import { setupErrorLogging } from './app-logger'; import { initSentryMain } from './sentry'; import { preWarmToolCache } from './cli-tool-manager'; -import { initializeClaudeProfileManager, getClaudeProfileManager } from './claude-profile-manager'; -import { isProfileAuthenticated } from './claude-profile/profile-utils'; +import { initializeClaudeProfileManager } from './claude-profile-manager'; import { isMacOS, isWindows } from './platform'; -import { ptyDaemonClient } from './terminal/pty-daemon-client'; -import type { AppSettings, AuthFailureInfo } from '../shared/types'; +import type { AppSettings } from '../shared/types'; // ───────────────────────────────────────────────────────────────────────────── // Window sizing constants diff --git a/apps/frontend/src/main/ipc-handlers/claude-code-handlers.ts b/apps/frontend/src/main/ipc-handlers/claude-code-handlers.ts index e1470ab9..02c8ff13 100644 --- a/apps/frontend/src/main/ipc-handlers/claude-code-handlers.ts +++ b/apps/frontend/src/main/ipc-handlers/claude-code-handlers.ts @@ -890,8 +890,8 @@ function checkProfileAuthentication(configDir: string): AuthCheckResult { } } - // On Linux and Windows, also check .credentials.json (Claude CLI stores tokens here) - if ((isLinux() || isWindows()) && existsSync(credentialsJsonPath)) { + // On Linux, also check .credentials.json (Claude CLI may store tokens here) + if (isLinux() && existsSync(credentialsJsonPath)) { const content = readFileSync(credentialsJsonPath, 'utf-8'); const data = JSON.parse(content); diff --git a/apps/frontend/src/main/ipc-handlers/github/release-handlers.ts b/apps/frontend/src/main/ipc-handlers/github/release-handlers.ts index b4f2ada7..35ba66a2 100644 --- a/apps/frontend/src/main/ipc-handlers/github/release-handlers.ts +++ b/apps/frontend/src/main/ipc-handlers/github/release-handlers.ts @@ -19,7 +19,8 @@ import { getWhichCommand } from '../../platform'; */ function checkGhCli(): { installed: boolean; error?: string } { try { - execFileSync(getWhichCommand(), ['gh'], { encoding: 'utf-8', stdio: 'pipe' }); + const checkCmd = `${getWhichCommand()} gh`; + execSync(checkCmd, { encoding: 'utf-8', stdio: 'pipe' }); return { installed: true }; } catch { return { diff --git a/apps/frontend/src/main/ipc-handlers/github/utils/subprocess-runner.ts b/apps/frontend/src/main/ipc-handlers/github/utils/subprocess-runner.ts index 5206c02e..42bdcafd 100644 --- a/apps/frontend/src/main/ipc-handlers/github/utils/subprocess-runner.ts +++ b/apps/frontend/src/main/ipc-handlers/github/utils/subprocess-runner.ts @@ -20,7 +20,6 @@ import type { AuthFailureInfo, BillingFailureInfo } from '../../../../shared/typ import { parsePythonCommand } from '../../../python-detector'; import { detectAuthFailure, detectBillingFailure } from '../../../rate-limit-detector'; import { getClaudeProfileManager } from '../../../claude-profile-manager'; -import { getOperationRegistry, type OperationType } from '../../../claude-profile/operation-registry'; import { isWindows, isMacOS } from '../../../platform'; const execAsync = promisify(exec); diff --git a/apps/frontend/src/main/platform/paths.ts b/apps/frontend/src/main/platform/paths.ts index 3019c6c6..e15c9c67 100644 --- a/apps/frontend/src/main/platform/paths.ts +++ b/apps/frontend/src/main/platform/paths.ts @@ -298,14 +298,11 @@ export function getOllamaInstallCommand(): string { /** * Get the command to find executables in PATH * - * Windows: Full path to where.exe (C:\Windows\System32\where.exe) - * Using full path ensures it works even when System32 isn't in PATH, - * which can happen in restricted environments or when Electron doesn't - * inherit the full system PATH. + * Windows: where.exe * Unix: which */ export function getWhichCommand(): string { - return isWindows() ? getWhereExePath() : 'which'; + return isWindows() ? 'where.exe' : 'which'; } /** diff --git a/tests/test_spec_pipeline.py b/tests/test_spec_pipeline.py index db312d1e..0b2b4c47 100644 --- a/tests/test_spec_pipeline.py +++ b/tests/test_spec_pipeline.py @@ -19,7 +19,8 @@ import atexit from pathlib import Path from unittest.mock import MagicMock, patch -pytestmark = pytest.mark.slow +# Add auto-claude directory to path for imports +sys.path.insert(0, str(Path(__file__).parent.parent / "apps" / "backend")) # Add auto-claude directory to path for imports sys.path.insert(0, str(Path(__file__).parent.parent / "apps" / "backend"))