diff --git a/CLAUDE.md b/CLAUDE.md index 3496f7fd09..735ca0de9b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,13 +2,13 @@ This file provides guidance to Claude Code when working with this repository. -Auto Claude is an autonomous multi-agent coding framework that plans, builds, and validates software for you. It's a monorepo with a Python backend (CLI + agent logic) and an Electron/React frontend (desktop UI). +Aperant (formerly Auto Claude) is an autonomous multi-agent coding framework that plans, builds, and validates software for you. It's a monorepo with a Python backend (CLI + agent logic) and an Electron/React frontend (desktop UI). > **Deep-dive reference:** [ARCHITECTURE.md](shared_docs/ARCHITECTURE.md) | **Frontend contributing:** [apps/frontend/CONTRIBUTING.md](apps/frontend/CONTRIBUTING.md) ## Product Overview -Auto Claude is a desktop application (+ CLI) where users describe a goal and AI agents autonomously handle planning, implementation, and QA validation. All work happens in isolated git worktrees so the main branch stays safe. +Aperant is a desktop application (+ CLI) where users describe a goal and AI agents autonomously handle planning, implementation, and QA validation. All work happens in isolated git worktrees so the main branch stays safe. **Core workflow:** User creates a task → Spec creation pipeline assesses complexity and writes a specification → Planner agent breaks it into subtasks → Coder agent implements (can spawn parallel subagents) → QA reviewer validates → QA fixer resolves issues → User reviews and merges. @@ -25,7 +25,7 @@ Auto Claude is a desktop application (+ CLI) where users describe a goal and AI - **Memory System** — Graphiti-based knowledge graph retains insights across sessions - **Isolated Workspaces** — Git worktree isolation for every build; AI-powered semantic merge - **Flexible Authentication** — Use a Claude Code subscription (OAuth) or API profiles with any Anthropic-compatible endpoint (e.g., Anthropic API, z.ai for GLM models) -- **Multi-Account Swapping** — Register multiple Claude accounts; when one hits a rate limit, Auto Claude automatically switches to an available account +- **Multi-Account Swapping** — Register multiple Claude accounts; when one hits a rate limit, Aperant automatically switches to an available account - **Cross-Platform** — Native desktop app for Windows, macOS, and Linux with auto-updates ## Critical Rules diff --git a/apps/frontend/src/main/terminal/claude-integration-handler.ts b/apps/frontend/src/main/terminal/claude-integration-handler.ts index 52f1dc7b54..26bc204d91 100644 --- a/apps/frontend/src/main/terminal/claude-integration-handler.ts +++ b/apps/frontend/src/main/terminal/claude-integration-handler.ts @@ -540,17 +540,16 @@ export function handleOAuthToken( console.warn('[ClaudeIntegration] Profile credentials verified via Keychain (not caching token):', profileId); - // Set flag to watch for Claude's ready state (onboarding complete) - terminal.awaitingOnboardingComplete = true; - - // needsOnboarding: true tells the UI to show "complete setup" message - // instead of "success" - user should finish Claude's onboarding before closing + // Credentials verified - close the auth terminal immediately. + // claude /login exits after OAuth completes and does not continue as an interactive + // session, so the welcome screen never appears and waiting for it would leave the + // window open forever. safeSendToRenderer(getWindow, IPC_CHANNELS.TERMINAL_OAUTH_TOKEN, { terminalId: terminal.id, profileId, email: emailFromOutput || keychainCreds.email || profile?.email, success: true, - needsOnboarding: true, + needsOnboarding: false, detectedAt: new Date().toISOString() } as OAuthTokenEvent); } else { @@ -561,17 +560,12 @@ export function handleOAuthToken( if (hasCredentials) { console.warn('[ClaudeIntegration] Profile credentials verified (no Keychain token):', profileId); - // Set flag to watch for Claude's ready state (onboarding complete) - terminal.awaitingOnboardingComplete = true; - - // needsOnboarding: true tells the UI to show "complete setup" message - // instead of "success" - user should finish Claude's onboarding before closing safeSendToRenderer(getWindow, IPC_CHANNELS.TERMINAL_OAUTH_TOKEN, { terminalId: terminal.id, profileId, email: emailFromOutput || profile?.email, success: true, - needsOnboarding: true, + needsOnboarding: false, detectedAt: new Date().toISOString() } as OAuthTokenEvent); } else { diff --git a/apps/frontend/src/renderer/components/settings/AuthTerminal.tsx b/apps/frontend/src/renderer/components/settings/AuthTerminal.tsx index 5ffee7a377..a1722177ee 100644 --- a/apps/frontend/src/renderer/components/settings/AuthTerminal.tsx +++ b/apps/frontend/src/renderer/components/settings/AuthTerminal.tsx @@ -252,6 +252,14 @@ export function AuthTerminal({ debugLog('Setting status to success (no onboarding needed)', { terminalId }); setStatus('success'); onAuthSuccess?.(info.email); + // Auto-close after a brief delay to show success UI + successTimeoutRef.current = setTimeout(() => { + if (isCreatedRef.current) { + window.electronAPI.destroyTerminal(terminalId).catch(console.error); + isCreatedRef.current = false; + } + onClose(); + }, 1500); } } else { debugLog('OAuth failed', { terminalId, message: info.message });