-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: add Microsoft Foundry (Azure AI) support for API Profiles #826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat: add Microsoft Foundry (Azure AI) support for API Profiles #826
Conversation
- Add comprehensive branching strategy documentation - Explain main, develop, feature, fix, release, and hotfix branches - Clarify that all PRs should target develop (not main) - Add release process documentation for maintainers - Update PR process to branch from develop - Expand table of contents with new sections
* refactor: restructure project to Apps/frontend and Apps/backend - Move auto-claude-ui to Apps/frontend with feature-based architecture - Move auto-claude to Apps/backend - Switch from pnpm to npm for frontend - Update Node.js requirement to v24.12.0 LTS - Add pre-commit hooks for lint, typecheck, and security audit - Add commit-msg hook for conventional commits - Fix CommonJS compatibility issues (postcss.config, postinstall scripts) - Update README with comprehensive setup and contribution guidelines - Configure ESLint to ignore .cjs files - 0 npm vulnerabilities Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * feat(refactor): clean code and move to npm * feat(refactor): clean code and move to npm * chore: update to v2.7.0, remove Docker deps (LadybugDB is embedded) * feat: v2.8.0 - update workflows and configs for Apps/ structure, npm * fix: resolve Python lint errors (F401, I001) * fix: update test paths for Apps/backend structure * fix: add missing facade files and update paths for Apps/backend structure - Fix ruff lint error I001 in auto_claude_tools.py - Create missing facade files to match upstream (agent, ci_discovery, critique, etc.) - Update test paths from auto-claude/ to Apps/backend/ - Update .pre-commit-config.yaml paths for Apps/ structure - Add pytest to pre-commit hooks (skip slow/integration/Windows-incompatible tests) - Fix Unicode encoding in test_agent_architecture.py for Windows Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * feat: improve readme * fix: new path * fix: correct release workflow and docs for Apps/ restructure - Fix ARM64 macOS build: pnpm → npm, auto-claude-ui → Apps/frontend - Fix artifact upload paths in release.yml - Update Node.js version to 24 for consistency - Update CLI-USAGE.md with Apps/backend paths - Update RELEASE.md with Apps/frontend/package.json paths 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: rename Apps/ to apps/ and fix backend path resolution - Rename Apps/ folder to apps/ for consistency with JS/Node conventions - Update all path references across CI/CD workflows, docs, and config files - Fix frontend Python path resolver to look for 'backend' instead of 'auto-claude' - Update path-resolver.ts to correctly find apps/backend in development mode This completes the Apps restructure from PR AndyMik90#122 and prepares for v2.8.0 release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(electron): correct preload script path from .js to .mjs electron-vite builds the preload script as ESM (index.mjs) but the main process was looking for CommonJS (index.js). This caused the preload to fail silently, making the app fall back to browser mock mode with fake data and non-functional IPC handlers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * - Introduced `dev:debug` script to enable debugging during development. - Added `dev:mcp` script for running the frontend in MCP mode. These enhancements streamline the development process for frontend developers. * refactor(memory): make Graphiti memory mandatory and remove Docker dependency Memory is now a core component of Auto Claude rather than optional: - Python 3.12+ is required for the backend (not just memory layer) - Graphiti is enabled by default in .env.example - Removed all FalkorDB/Docker references (migrated to embedded LadybugDB) - Deleted guides/DOCKER-SETUP.md and docker-handlers.ts - Updated onboarding UI to remove "optional" language - Updated all documentation to reflect LadybugDB architecture 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * feat: add cross-platform Windows support for npm scripts - Add scripts/install-backend.js for cross-platform Python venv setup - Auto-detects Python 3.12 (py -3.12 on Windows, python3.12 on Unix) - Handles platform-specific venv paths - Add scripts/test-backend.js for cross-platform pytest execution - Update package.json to use Node.js scripts instead of shell commands - Update CONTRIBUTING.md with correct paths and instructions: - apps/backend/ and apps/frontend/ paths - Python 3.12 requirement (memory system now required) - Platform-specific install commands (winget, brew, apt) - npm instead of pnpm - Quick Start section with npm run install:all 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * remove doc * fix(frontend): correct Ollama detector script path after apps restructure The Ollama status check was failing because memory-handlers.ts was looking for ollama_model_detector.py at auto-claude/ but the script is now at apps/backend/ after the directory restructure. This caused "Ollama not running" to display even when Ollama was actually running and accessible. * chore: bump version to 2.7.2 Downgrade version from 2.8.0 to 2.7.2 as the Apps/ restructure is better suited as a patch release rather than a minor release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * chore: update package-lock.json for Windows compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * docs(contributing): add hotfix workflow and update paths for apps/ structure Add Git Flow hotfix workflow documentation with step-by-step guide and ASCII diagram showing the branching strategy. Update all paths from auto-claude/auto-claude-ui to apps/backend/apps/frontend and migrate package manager references from pnpm to npm to match the new project structure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(ci): remove duplicate ARM64 build from Intel runner The Intel runner was building both x64 and arm64 architectures, while a separate ARM64 runner also builds arm64 natively. This caused duplicate ARM64 builds, wasting CI resources. Now each runner builds only its native architecture: - Intel runner: x64 only - ARM64 runner: arm64 only 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Alex Madera <[email protected]> Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <[email protected]>
…Mik90#141) * feat(ollama): add real-time download progress tracking for model downloads Implement comprehensive download progress tracking with: - NDJSON parsing for streaming progress data from Ollama API - Real-time speed calculation (MB/s, KB/s, B/s) with useRef for delta tracking - Time remaining estimation based on download speed - Animated progress bars in OllamaModelSelector component - IPC event streaming from main process to renderer - Proper listener management with cleanup functions Changes: - memory-handlers.ts: Parse NDJSON from Ollama stderr, emit progress events - OllamaModelSelector.tsx: Display progress bars with speed and time remaining - project-api.ts: Implement onDownloadProgress listener with cleanup - ipc.ts types: Define onDownloadProgress listener interface - infrastructure-mock.ts: Add mock implementation for browser testing This allows users to see real-time feedback when downloading Ollama models, including percentage complete, current download speed, and estimated time remaining. * test: add focused test coverage for Ollama download progress feature Add unit tests for the critical paths of the real-time download progress tracking: - Progress calculation tests (52 tests): Speed/time/percentage calculations with comprehensive edge case coverage (zero speeds, NaN, Infinity, large numbers) - NDJSON parser tests (33 tests): Streaming JSON parsing from Ollama, buffer management for incomplete lines, error handling All 562 unit tests passing with clean dependencies. Tests focus on critical mathematical logic and data processing - the most important paths that need verification. Test coverage: ✅ Speed calculation and formatting (B/s, KB/s, MB/s) ✅ Time remaining calculations (seconds, minutes, hours) ✅ Percentage clamping (0-100%) ✅ NDJSON streaming with partial line buffering ✅ Invalid JSON handling ✅ Real Ollama API responses ✅ Multi-chunk streaming scenarios * docs: add comprehensive JSDoc docstrings for Ollama download progress feature - Enhanced OllamaModelSelector component with detailed JSDoc * Documented component props, behavior, and usage examples * Added docstrings to internal functions (checkInstalledModels, handleDownload, handleSelect) * Explained progress tracking algorithm and useRef usage - Improved memory-handlers.ts documentation * Added docstring to main registerMemoryHandlers function * Documented all Ollama-related IPC handlers (check-status, list-embedding-models, pull-model) * Added JSDoc to executeOllamaDetector helper function * Documented interface types (OllamaStatus, OllamaModel, OllamaEmbeddingModel, OllamaPullResult) * Explained NDJSON parsing and progress event structure - Enhanced test file documentation * Added docstrings to NDJSON parser test utilities with algorithm explanation * Documented all calculation functions (speed, time, percentage) * Added detailed comments on formatting and bounds-checking logic - Improved overall code maintainability * Docstring coverage now meets 80%+ threshold for code review * Clear explanation of progress tracking implementation details * Better context for future maintainers working with download streaming * feat: add batch task creation and management CLI commands - Handle batch task creation from JSON files - Show status of all specs in project - Cleanup tool for completed specs - Full integration with new apps/backend structure - Compatible with implementation_plan.json workflow * test: add batch task test file and testing checklist - batch_test.json: Sample tasks for testing batch creation - TESTING_CHECKLIST.md: Comprehensive testing guide for Ollama and batch tasks - Includes UI testing steps, CLI testing steps, and edge cases - Ready for manual and automated testing * chore: update package-lock.json to match v2.7.2 * test: update checklist with verification results and architecture validation * docs: add comprehensive implementation summary for Ollama + Batch features * docs: add comprehensive Phase 2 testing guide with checklists and procedures * docs: add NEXT_STEPS guide for Phase 2 testing * fix: resolve merge conflict in project-api.ts from Ollama feature cherry-pick * fix: remove duplicate Ollama check status handler registration * test: update checklist with Phase 2 bug findings and fixes --------- Co-authored-by: ray <[email protected]>
Implemented promise queue pattern in PythonEnvManager to handle concurrent initialization requests. Previously, multiple simultaneous requests (e.g., startup + merge) would fail with "Already initializing" error. Also fixed parsePythonCommand() to handle file paths with spaces by checking file existence before splitting on whitespace. Changes: - Added initializationPromise field to queue concurrent requests - Split initialize() into public and private _doInitialize() - Enhanced parsePythonCommand() with existsSync() check Co-authored-by: Joris Slagter <[email protected]>
) Removes the legacy 'auto-claude' path from the possiblePaths array in agent-process.ts. This path was from before the monorepo restructure (v2.7.2) and is no longer needed. The legacy path was causing spec_runner.py to be looked up at the wrong location: - OLD (wrong): /path/to/auto-claude/auto-claude/runners/spec_runner.py - NEW (correct): /path/to/apps/backend/runners/spec_runner.py This aligns with the new monorepo structure where all backend code lives in apps/backend/. Fixes AndyMik90#147 Co-authored-by: Joris Slagter <[email protected]>
* fix: Linear API authentication and GraphQL types - Remove Bearer prefix from Authorization header (Linear API keys are sent directly) - Change GraphQL variable types from String! to ID! for teamId and issue IDs - Improve error handling to show detailed Linear API error messages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: Radix Select empty value error in Linear import modal Use '__all__' sentinel value instead of empty string for "All projects" option, as Radix Select does not allow empty string values. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * feat: add CodeRabbit configuration file Introduce a new .coderabbit.yaml file to configure CodeRabbit settings, including review profiles, automatic review options, path filters, and specific instructions for different file types. This enhances the code review process by providing tailored guidelines for Python, TypeScript, and test files. * fix: correct GraphQL types for Linear team queries Linear API uses different types for different queries: - team(id:) expects String! - issues(filter: { team: { id: { eq: } } }) expects ID! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: refresh task list after Linear import Call loadTasks() after successful Linear import to update the kanban board without requiring a page reload. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * cleanup * cleanup * fix: address CodeRabbit review comments for Linear integration - Fix unsafe JSON parsing: check response.ok before parsing JSON to handle non-JSON error responses (e.g., 503 from proxy) gracefully - Use ID! type instead of String! for teamId in LINEAR_GET_PROJECTS query for GraphQL type consistency - Remove debug console.log (ESLint config only allows warn/error) - Refresh task list on partial import success (imported > 0) instead of requiring full success - Fix pre-existing TypeScript and lint issues blocking commit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * version sync logic * lints for develop branch * chore: update CI workflow to include develop branch - Modified the CI configuration to trigger on pushes and pull requests to both main and develop branches, enhancing the workflow for development and integration processes. * fix: update project directory auto-detection for apps/backend structure The project directory auto-detection was checking for the old `auto-claude/` directory name but needed to check for `apps/backend/`. When running from `apps/backend/`, the directory name is `backend` not `auto-claude`, so the check would fail and `project_dir` would incorrectly remain as `apps/backend/` instead of resolving to the project root (2 levels up). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: use GraphQL variables instead of string interpolation in LINEAR_GET_ISSUES Replace direct string interpolation of teamId and linearProjectId with proper GraphQL variables. This prevents potential query syntax errors if IDs contain special characters like double quotes, and aligns with the variable-based approach used elsewhere in the file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(ui): correct logging level and await loadTasks on import complete - Change console.warn to console.log for import success messages (warn is incorrect severity for normal completion) - Make onImportComplete callback async and await loadTasks() to prevent potential unhandled promise rejections Applies CodeRabbit review feedback across 3 LinearTaskImportModal usages. * fix(hooks): use POSIX-compliant find instead of bash glob The pre-commit hook uses #!/bin/sh but had bash-specific ** glob pattern for staging ruff-formatted files. The ** pattern only works in bash with globstar enabled - in POSIX sh it expands literally and won't match subdirectories, causing formatted files in nested directories to not be staged. --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
…_progress When a user drags a running task back to Planning (or any other column), the process was not being stopped, leaving a "ghost" process that prevented deletion with "Cannot delete a running task" error. Now the task process is automatically killed when status changes away from in_progress, ensuring the process state stays in sync with the UI.
* feat: add UI scale feature * refactor: extract UI scale bounds to shared constants * fix: duplicated import
…90#154) * fix: analyzer Python compatibility and settings integration Fixes project index analyzer failing with TypeError on Python type hints. Changes: - Added 'from __future__ import annotations' to all analysis modules - Fixed project discovery to support new analyzer JSON format - Read Python path directly from settings.json instead of pythonEnvManager - Added stderr/stdout logging for analyzer debugging Resolves 'Discovered 0 files' and 'TypeError: unsupported operand type' issues. * auto-claude: subtask-1-1 - Hide status badge when execution phase badge is showing When a task has an active execution (planning, coding, etc.), the execution phase badge already displays the correct state with a spinner. The status badge was also rendering, causing duplicate/confusing badges (e.g., both "Planning" and "Pending" showing at the same time). This fix wraps the status badge in a conditional that only renders when there's no active execution, eliminating the redundant badge display. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(ipc): remove unused pythonEnvManager parameter and fix ES6 import Address CodeRabbit review feedback: - Remove unused pythonEnvManager parameter from registerProjectContextHandlers and registerContextHandlers (the code reads Python path directly from settings.json instead) - Replace require('electron').app with proper ES6 import for consistency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * chore(lint): fix import sorting in analysis module Run ruff --fix to resolve I001 lint errors after merging develop. All 23 files in apps/backend/analysis/ now have properly sorted imports. --------- Co-authored-by: Joris Slagter <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]>
* fix(core): add task persistence, terminal handling, and HTTP 300 fixes Consolidated bug fixes from PRs AndyMik90#168, AndyMik90#170, AndyMik90#171: - Task persistence (AndyMik90#168): Scan worktrees for tasks on app restart to prevent loss of in-progress work and wasted API credits. Tasks in .worktrees/*/specs are now loaded and deduplicated with main. - Terminal buttons (AndyMik90#170): Fix "Open Terminal" buttons silently failing on macOS by properly awaiting createTerminal() Promise. Added useTerminalHandler hook with loading states and error display. - HTTP 300 errors (AndyMik90#171): Handle branch/tag name collisions that cause update failures. Added validation script to prevent conflicts before releases and user-friendly error messages with manual download links. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(platform): add path resolution, spaces handling, and XDG support This commit consolidates multiple bug fixes from community PRs: - PR AndyMik90#187: Path resolution fix - Update path detection to find apps/backend instead of legacy auto-claude directory after v2.7.2 restructure - PR AndyMik90#182/AndyMik90#155: Python path spaces fix - Improve parsePythonCommand() to handle quoted paths and paths containing spaces without splitting - PR AndyMik90#161: Ollama detection fix - Add new apps structure paths for ollama_model_detector.py script discovery - PR AndyMik90#160: AppImage support - Add XDG Base Directory compliant paths for Linux sandboxed environments (AppImage, Flatpak, Snap). New files: - config-paths.ts: XDG path utilities - fs-utils.ts: Filesystem utilities with fallback support - PR AndyMik90#159: gh CLI PATH fix - Add getAugmentedEnv() utility to include common binary locations (Homebrew, snap, local) in PATH for child processes. Fixes gh CLI not found when app launched from Finder/Dock. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address CodeRabbit/Cursor review comments on PR AndyMik90#185 Fixes from code review: - http-client.ts: Use GITHUB_CONFIG instead of hardcoded owner in HTTP 300 error message - validate-release.js: Fix substring matching bug in branch detection that could cause false positives (e.g., v2.7 matching v2.7.2) - bump-version.js: Remove unnecessary try-catch wrapper (exec() already exits on failure) - execution-handlers.ts: Capture original subtask status before mutation for accurate logging - fs-utils.ts: Add error handling to safeWriteFile with proper logging Dismissed as trivial/not applicable: - config-paths.ts: Exhaustive switch check (over-engineering) - env-utils.ts: PATH priority documentation (existing comments sufficient) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address additional CodeRabbit review comments (round 2) Fixes from second round of code review: - fs-utils.ts: Wrap test file cleanup in try-catch for Windows file locking - fs-utils.ts: Add error handling to safeReadFile for consistency with safeWriteFile - http-client.ts: Use GITHUB_CONFIG in fetchJson (missed in first round) - validate-release.js: Exclude symbolic refs (origin/HEAD -> origin/main) from branch check - python-detector.ts: Return cleanPath instead of pythonPath for empty input edge case Dismissed as trivial/not applicable: - execution-handlers.ts: Redundant checkSubtasksCompletion call (micro-optimization) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
* chore: update README version to 2.7.1 Updated the version badge and download links in the README to reflect the new release version 2.7.1, ensuring users have the correct information for downloading the latest builds. * feat(releases): add beta release system with user opt-in Implements a complete beta release workflow that allows users to opt-in to receiving pre-release versions. This enables testing new features before they're included in stable releases. Changes: - Add beta-release.yml workflow for creating beta releases from develop - Add betaUpdates setting with UI toggle in Settings > Updates - Add update channel support to electron-updater (beta vs latest) - Extract shared settings-utils.ts to reduce code duplication - Add prepare-release.yml workflow for automated release preparation - Document beta release process in CONTRIBUTING.md and RELEASE.md Users can enable beta updates in Settings > Updates, and maintainers can trigger beta releases via the GitHub Actions workflow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * workflow update --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
* chore: update README version to 2.7.1 Updated the version badge and download links in the README to reflect the new release version 2.7.1, ensuring users have the correct information for downloading the latest builds. * feat(releases): add beta release system with user opt-in Implements a complete beta release workflow that allows users to opt-in to receiving pre-release versions. This enables testing new features before they're included in stable releases. Changes: - Add beta-release.yml workflow for creating beta releases from develop - Add betaUpdates setting with UI toggle in Settings > Updates - Add update channel support to electron-updater (beta vs latest) - Extract shared settings-utils.ts to reduce code duplication - Add prepare-release.yml workflow for automated release preparation - Document beta release process in CONTRIBUTING.md and RELEASE.md Users can enable beta updates in Settings > Updates, and maintainers can trigger beta releases via the GitHub Actions workflow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * workflow update * ci(github): update Discord link and redirect feature requests to discussions Update Discord invite link to correct URL (QhRnz9m5HE) across all GitHub templates and workflows. Redirect feature requests from issue template to GitHub Discussions for better community engagement. Changes: - config.yml: Add feature request link to Discussions, fix Discord URL - question.yml: Update Discord link in pre-question guidance - welcome.yml: Update Discord link in first-time contributor message --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
- Change branch reference from main to develop - Fix contribution guide link to use full URL - Remove hyphen from "Auto Claude" in welcome message
…tup (AndyMik90#180 AndyMik90#167) (AndyMik90#208) This fixes critical bug where macOS users with default Python 3.9.6 couldn't use Auto-Claude because claude-agent-sdk requires Python 3.10+. Root Cause: - Auto-Claude doesn't bundle Python, relies on system Python - python-detector.ts accepted any Python 3.x without checking minimum version - macOS ships with Python 3.9.6 by default (incompatible) - GitHub Actions runners didn't explicitly set Python version Changes: 1. python-detector.ts: - Added getPythonVersion() to extract version from command - Added validatePythonVersion() to check if >= 3.10.0 - Updated findPythonCommand() to skip Python < 3.10 with clear error messages 2. python-env-manager.ts: - Import and use findPythonCommand() (already has version validation) - Simplified findSystemPython() to use shared validation logic - Updated error message from "Python 3.9+" to "Python 3.10+" with download link 3. .github/workflows/release.yml: - Added Python 3.11 setup to all 4 build jobs (macOS Intel, macOS ARM64, Windows, Linux) - Ensures consistent Python version across all platforms during build Impact: - macOS users with Python 3.9 now see clear error with download link - macOS users with Python 3.10+ work normally - CI/CD builds use consistent Python 3.11 - Prevents "ModuleNotFoundError: dotenv" and dependency install failures Fixes AndyMik90#180, AndyMik90#167 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.5 <[email protected]>
* feat: Add OpenRouter as LLM/embedding provider Add OpenRouter provider support for Graphiti memory integration, enabling access to multiple LLM providers through a single API. Changes: Backend: - Created openrouter_llm.py: OpenRouter LLM provider using OpenAI-compatible API - Created openrouter_embedder.py: OpenRouter embedder provider - Updated config.py: Added OpenRouter to provider enums and configuration - New fields: openrouter_api_key, openrouter_base_url, openrouter_llm_model, openrouter_embedding_model - Validation methods updated for OpenRouter - Updated factory.py: Added OpenRouter to LLM and embedder factories - Updated provider __init__.py files: Exported new OpenRouter functions Frontend: - Updated project.ts types: Added 'openrouter' to provider type unions - GraphitiProviderConfig extended with OpenRouter fields - Updated GraphitiStep.tsx: Added OpenRouter to provider arrays - LLM_PROVIDERS: 'Multi-provider aggregator' - EMBEDDING_PROVIDERS: 'OpenAI-compatible embeddings' - Added OpenRouter API key input field with show/hide toggle - Link to https://openrouter.ai/keys - Updated env-handlers.ts: OpenRouter .env generation and parsing - Template generation for OPENROUTER_* variables - Parsing from .env files with proper type casting Documentation: - Updated .env.example with OpenRouter section - Configuration examples - Popular model recommendations - Example configuration (AndyMik90#6) Fixes AndyMik90#92 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> * refactor: address CodeRabbit review comments for OpenRouter - Add globalOpenRouterApiKey to settings types and store updates - Initialize openrouterApiKey from global settings - Update documentation to include OpenRouter in provider lists - Add OpenRouter handling to get_embedding_dimension() method - Add openrouter to provider cleanup list - Add OpenRouter to get_available_providers() function - Clarify Legacy comment for openrouterLlmModel These changes complete the OpenRouter integration by ensuring proper settings persistence and provider detection across the application. * fix: apply ruff formatting to OpenRouter code - Break long error message across multiple lines - Format provider list with one item per line - Fixes lint CI failure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.5 <[email protected]>
…Mik90#209) Implements distributed file-based locking for spec number coordination across main project and all worktrees. Previously, parallel spec creation could assign the same number to different specs (e.g., 042-bmad-task and 042-gitlab-integration both using number 042). The fix adds SpecNumberLock class that: - Acquires exclusive lock before calculating spec numbers - Scans ALL locations (main project + worktrees) for global maximum - Creates spec directories atomically within the lock - Handles stale locks via PID-based detection with 30s timeout Applied to both Python backend (spec_runner.py flow) and TypeScript frontend (ideation conversion, GitHub/GitLab issue import). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <[email protected]>
* fix(ideation): add missing event forwarders for status sync - Add event forwarders in ideation-handlers.ts for progress, log, type-complete, type-failed, complete, error, and stopped events - Fix ideation-type-complete to load actual ideas array from JSON files instead of emitting only the count Resolves UI getting stuck at 0/3 complete during ideation generation. * fix(ideation): fix UI not updating after actions - Fix getIdeationSummary to count only active ideas (exclude dismissed/archived) This ensures header stats match the visible ideas count - Add transformSessionFromSnakeCase to properly transform session data from backend snake_case to frontend camelCase on ideation-complete event - Transform raw session before emitting ideation-complete event Resolves header showing stale counts after dismissing/deleting ideas. * fix(ideation): improve type safety and async handling in ideation type completion - Replace synchronous readFileSync with async fsPromises.readFile in ideation-type-complete handler - Wrap async file read in IIFE with proper error handling to prevent unhandled promise rejections - Add type validation for IdeationType with VALID_IDEATION_TYPES set and isValidIdeationType guard - Add validateEnabledTypes function to filter out invalid type values and log dropped entries - Handle ENOENT separately * fix(ideation): improve generation state management and error handling - Add explicit isGenerating flag to prevent race conditions during async operations - Implement 5-minute timeout for generation with automatic cleanup and error state - Add ideation-stopped event emission when process is intentionally killed - Replace console.warn/error with proper ideation-error events in agent-queue - Add resetGeneratingTypes helper to transition all generating types to a target state - Filter out dismissed/ * refactor(ideation): improve event listener cleanup and timeout management - Extract event handler functions in ideation-handlers.ts to enable proper cleanup - Return cleanup function from registerIdeationHandlers to remove all listeners - Replace single generationTimeoutId with Map to support multiple concurrent projects - Add clearGenerationTimeout helper to centralize timeout cleanup logic - Extract loadIdeationType IIFE to named function for better error context - Enhance error logging with projectId, * refactor: use async file read for ideation and roadmap session loading - Replace synchronous readFileSync with async fsPromises.readFile - Prevents blocking the event loop during file operations - Consistent with async pattern used elsewhere in the codebase - Improved error handling with proper event emission * fix(agent-queue): improve roadmap completion handling and error reporting - Add transformRoadmapFromSnakeCase to convert backend snake_case to frontend camelCase - Transform raw roadmap data before emitting roadmap-complete event - Add roadmap-error emission for unexpected errors during completion - Add roadmap-error emission when project path is unavailable - Remove duplicate ideation-type-complete emission from error handler (event already emitted in loadIdeationType) - Update error log message
Adds 'from __future__ import annotations' to spec/discovery.py for Python 3.9+ compatibility with type hints. This completes the Python compatibility fixes that were partially applied in previous commits. All 26 analysis and spec Python files now have the future annotations import. Related: AndyMik90#128 Co-authored-by: Joris Slagter <[email protected]>
…#241) * fix: resolve Python detection and backend packaging issues - Fix backend packaging path (auto-claude -> backend) to match path-resolver.ts expectations - Add future annotations import to config_parser.py for Python 3.9+ compatibility - Use findPythonCommand() in project-context-handlers to prioritize Homebrew Python - Improve Python detection to prefer Homebrew paths over system Python on macOS This resolves the following issues: - 'analyzer.py not found' error due to incorrect packaging destination - TypeError with 'dict | None' syntax on Python < 3.10 - Wrong Python interpreter being used (system Python instead of Homebrew Python 3.10+) Tested on macOS with packaged app - project index now loads successfully. * refactor: address PR review feedback - Extract findHomebrewPython() helper to eliminate code duplication between findPythonCommand() and getDefaultPythonCommand() - Remove hardcoded version-specific paths (python3.12) and rely only on generic Homebrew symlinks for better maintainability - Remove unnecessary 'from __future__ import annotations' from config_parser.py since backend requires Python 3.12+ where union types are native These changes make the code more maintainable, less fragile to Python version changes, and properly reflect the project's Python 3.12+ requirement.
…#250) * feat(github): add GitHub automation system for issues and PRs Implements comprehensive GitHub automation with three major components: 1. Issue Auto-Fix: Automatically creates specs from labeled issues - AutoFixButton component with progress tracking - useAutoFix hook for config and queue management - Backend handlers for spec creation from issues 2. GitHub PRs Tool: AI-powered PR review sidebar - New sidebar tab (Cmd+Shift+P) alongside GitHub Issues - PRList/PRDetail components for viewing PRs - Review system with findings by severity - Post review comments to GitHub 3. Issue Triage: Duplicate/spam/feature-creep detection - Triage handlers with label application - Configurable detection thresholds Also adds: - Debug logging (DEBUG=true) for all GitHub handlers - Backend runners/github module with orchestrator - AI prompts for PR review, triage, duplicate/spam detection - dev:debug npm script for development with logging 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(github-runner): resolve import errors for direct script execution Changes runner.py and orchestrator.py to handle both: - Package import: `from runners.github import ...` - Direct script: `python runners/github/runner.py` Uses try/except pattern for relative vs direct imports. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(github): correct argparse argument order for runner.py Move --project global argument before subcommand so argparse can correctly parse it. Fixes "unrecognized arguments: --project" error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * logs when debug mode is on * refactor(github): extract service layer and fix linting errors Major refactoring to improve maintainability and code quality: Backend (Python): - Extracted orchestrator.py (2,600 → 835 lines, 68% reduction) into 7 service modules: - prompt_manager.py: Prompt template management - response_parsers.py: AI response parsing - pr_review_engine.py: PR review orchestration - triage_engine.py: Issue triage logic - autofix_processor.py: Auto-fix workflow - batch_processor.py: Batch issue handling - Fixed 18 ruff linting errors (F401, C405, C414, E741): - Removed unused imports (BatchValidationResult, AuditAction, locked_json_write) - Optimized collection literals (set([n]) → {n}) - Removed unnecessary list() calls - Renamed ambiguous variable 'l' to 'label' throughout Frontend (TypeScript): - Refactored IPC handlers (19% overall reduction) with shared utilities: - autofix-handlers.ts: 1,042 → 818 lines - pr-handlers.ts: 648 → 543 lines - triage-handlers.ts: 437 lines (no duplication) - Created utils layer: logger, ipc-communicator, project-middleware, subprocess-runner - Split github-store.ts into focused stores: issues, pr-review, investigation, sync-status - Split ReviewFindings.tsx into focused components All imports verified, type checks passing, linting clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
…ndyMik90#250)" (AndyMik90#251) This reverts commit 348de6d.
* Add multilingual support and i18n integration - Implemented i18n framework using `react-i18next` for translation management. - Added support for English and French languages with translation files. - Integrated language selector into settings. - Updated all text strings in UI components to use translation keys. - Ensured smooth language switching with live updates. * Migrate remaining hard-coded strings to i18n system - TaskCard: status labels, review reasons, badges, action buttons - PhaseProgressIndicator: execution phases, progress labels - KanbanBoard: drop zone, show archived, tooltips - CustomModelModal: dialog title, description, labels - ProactiveSwapListener: account switch notifications - AgentProfileSelector: phase labels, custom configuration - GeneralSettings: agent framework option Added translation keys for en/fr locales in tasks.json, common.json, and settings.json for complete i18n coverage. * Add i18n support to dialogs and settings components - AddFeatureDialog: form labels, validation messages, buttons - AddProjectModal: dialog steps, form fields, actions - RateLimitIndicator: rate limit notifications - RateLimitModal: account switching, upgrade prompts - AdvancedSettings: updates and notifications sections - ThemeSettings: theme selection labels - Updated dialogs.json locales (en/fr) * Fix truncated 'ready' message in dialogs locales * Fix backlog terminology in i18n locales Change "Planning"/"Planification" to standard PM term "Backlog" * Migrate settings navigation and integration labels to i18n - AppSettings: nav items, section titles, buttons - IntegrationSettings: Claude accounts, auto-switch, API keys labels - Added settings nav/projectSections/integrations translation keys - Added buttons.saving to common translations * Migrate AgentProfileSettings and Sidebar init dialog to i18n - AgentProfileSettings: migrate phase config labels, section title, description, and all hardcoded strings to settings namespace - Sidebar: migrate init dialog strings to dialogs namespace with common buttons from common namespace - Add new translation keys for agent profile settings and update dialog * Migrate AppSettings navigation labels to i18n - Add useTranslation hook to AppSettings.tsx - Replace hardcoded section labels with dynamic translations - Add projectSections translations for project settings nav - Add rerunWizardDescription translation key * Add explicit typing to notificationItems array Import NotificationSettings type and use keyof to properly type the notification item keys, removing manual type assertion.
…AndyMik90#266) * ci: implement enterprise-grade PR quality gates and security scanning * ci: implement enterprise-grade PR quality gates and security scanning * fix:pr comments and improve code * fix: improve commit linting and code quality * Removed the dependency-review job (i added it) * fix: address CodeRabbit review comments - Expand scope pattern to allow uppercase, underscores, slashes, dots - Add concurrency control to cancel duplicate security scan runs - Add explanatory comment for Bandit CLI flags - Remove dependency-review job (requires repo settings) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * docs: update commit lint examples with expanded scope patterns Show slashes and dots in scope examples to demonstrate the newly allowed characters (api/users, package.json) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * chore: remove feature request issue template Feature requests are directed to GitHub Discussions via the issue template config.yml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address security vulnerabilities in service orchestrator - Fix port parsing crash on malformed docker-compose entries - Fix shell injection risk by using shlex.split() with shell=False Prevents crashes when docker-compose.yml contains environment variables in port mappings (e.g., '${PORT}:8080') and eliminates shell injection vulnerabilities in subprocess execution. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
…90#252) * feat(github): add GitHub automation system for issues and PRs Implements comprehensive GitHub automation with three major components: 1. Issue Auto-Fix: Automatically creates specs from labeled issues - AutoFixButton component with progress tracking - useAutoFix hook for config and queue management - Backend handlers for spec creation from issues 2. GitHub PRs Tool: AI-powered PR review sidebar - New sidebar tab (Cmd+Shift+P) alongside GitHub Issues - PRList/PRDetail components for viewing PRs - Review system with findings by severity - Post review comments to GitHub 3. Issue Triage: Duplicate/spam/feature-creep detection - Triage handlers with label application - Configurable detection thresholds Also adds: - Debug logging (DEBUG=true) for all GitHub handlers - Backend runners/github module with orchestrator - AI prompts for PR review, triage, duplicate/spam detection - dev:debug npm script for development with logging 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(github-runner): resolve import errors for direct script execution Changes runner.py and orchestrator.py to handle both: - Package import: `from runners.github import ...` - Direct script: `python runners/github/runner.py` Uses try/except pattern for relative vs direct imports. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(github): correct argparse argument order for runner.py Move --project global argument before subcommand so argparse can correctly parse it. Fixes "unrecognized arguments: --project" error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * logs when debug mode is on * refactor(github): extract service layer and fix linting errors Major refactoring to improve maintainability and code quality: Backend (Python): - Extracted orchestrator.py (2,600 → 835 lines, 68% reduction) into 7 service modules: - prompt_manager.py: Prompt template management - response_parsers.py: AI response parsing - pr_review_engine.py: PR review orchestration - triage_engine.py: Issue triage logic - autofix_processor.py: Auto-fix workflow - batch_processor.py: Batch issue handling - Fixed 18 ruff linting errors (F401, C405, C414, E741): - Removed unused imports (BatchValidationResult, AuditAction, locked_json_write) - Optimized collection literals (set([n]) → {n}) - Removed unnecessary list() calls - Renamed ambiguous variable 'l' to 'label' throughout Frontend (TypeScript): - Refactored IPC handlers (19% overall reduction) with shared utilities: - autofix-handlers.ts: 1,042 → 818 lines - pr-handlers.ts: 648 → 543 lines - triage-handlers.ts: 437 lines (no duplication) - Created utils layer: logger, ipc-communicator, project-middleware, subprocess-runner - Split github-store.ts into focused stores: issues, pr-review, investigation, sync-status - Split ReviewFindings.tsx into focused components All imports verified, type checks passing, linting clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> * fixes during testing of PR * feat(github): implement PR merge, assign, and comment features - Add auto-assignment when clicking "Run AI Review" - Implement PR merge functionality with squash method - Add ability to post comments on PRs - Display assignees in PR UI - Add Approve and Merge buttons when review passes - Update backend gh_client with pr_merge, pr_comment, pr_assign methods - Create IPC handlers for new PR operations - Update TypeScript interfaces and browser mocks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> * Improve PR review AI * fix(github): use temp files for PR review posting to avoid shell escaping issues When posting PR reviews with findings containing special characters (backticks, parentheses, quotes), the shell command was interpreting them as commands instead of literal text, causing syntax errors. Changed both postPRReview and postPRComment handlers to write the body content to temporary files and use gh CLI's --body-file flag instead of --body with inline content. This safely handles ALL special characters without escaping issues. Fixes shell errors when posting reviews with suggested fixes containing code snippets. * fix(i18n): add missing GitHub PRs translation and document i18n requirements Fixed missing translation key for GitHub PRs feature that was causing "items.githubPRs" to display instead of the proper translated text. Added comprehensive i18n guidelines to CLAUDE.md to ensure all future frontend development follows the translation key pattern instead of using hardcoded strings. Also fixed missing deletePRReview mock function in browser-mock.ts to resolve TypeScript compilation errors. Changes: - Added githubPRs translation to en/navigation.json - Added githubPRs translation to fr/navigation.json - Added Development Guidelines section to CLAUDE.md with i18n requirements - Documented translation file locations and namespace usage patterns - Added deletePRReview mock function to browser-mock.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> * fix ui loading * Github PR fixes * improve claude.md * lints/tests * fix(github): handle PRs exceeding GitHub's 20K line diff limit - Add PRTooLargeError exception for large PR detection - Update pr_diff() to catch and raise PRTooLargeError for HTTP 406 errors - Gracefully handle large PRs by skipping full diff and using individual file patches - Add diff_truncated flag to PRContext to track when diff was skipped - Large PRs will now review successfully using per-file diffs instead of failing Fixes issue with PR AndyMik90#252 which has 100+ files exceeding the 20,000 line limit. * fix: implement individual file patch fetching for large PRs The PR review was getting stuck for large PRs (>20K lines) because when we skipped the full diff due to GitHub API limits, we had no code to analyze. The individual file patches were also empty, leaving the AI with just file names and metadata. Changes: - Implemented _get_file_patch() to fetch individual patches via git diff - Updated PR review engine to build composite diff from file patches when diff_truncated is True - Added missing 'state' field to PRContext dataclass - Limits composite diff to first 50 files for very large PRs - Shows appropriate warnings when using reconstructed diffs This allows AI review to proceed with actual code analysis even when the full PR diff exceeds GitHub's limits. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> * 1min reduction * docs: add GitHub Sponsors funding configuration Enable the Sponsor button on the repository by adding FUNDING.yml with the AndyMik90 GitHub Sponsors profile. * feat(github-pr): add orchestrating agent for thorough PR reviews Implement a new Opus 4.5 orchestrating agent that performs comprehensive PR reviews regardless of size. Key changes: - Add orchestrator_reviewer.py with strategic review workflow - Add review_tools.py with subagent spawning capabilities - Add pr_orchestrator.md prompt emphasizing thorough analysis - Add pr_security_agent.md and pr_quality_agent.md subagent prompts - Integrate orchestrator into pr_review_engine.py with config flag - Fix critical bug where findings were extracted but not processed (indentation issue in _parse_orchestrator_output) The orchestrator now correctly identifies issues in PRs that were previously approved as "trivial". Testing showed 7 findings detected vs 0 before the fix. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * i18n * fix(github-pr): restrict pr_reviewer to read-only permissions The PR review agent was using qa_reviewer agent type which has Bash access, allowing it to checkout branches and make changes during review. Created new pr_reviewer agent type with BASE_READ_TOOLS only (no Bash, no writes, no auto-claude tools). This prevents the PR review from accidentally modifying code or switching branches during analysis. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(github-pr): robust category mapping and JSON parsing for PR review The orchestrator PR review was failing to extract findings because: 1. AI generates category names like 'correctness', 'consistency', 'testing' that aren't in our ReviewCategory enum - added flexible mapping 2. JSON sometimes embedded in markdown code blocks (```json) which broke parsing - added code block extraction as first parsing attempt Changes: - Add _CATEGORY_MAPPING dict to map AI categories to valid enum values - Add _map_category() helper function with fallback to QUALITY - Add severity parsing with fallback to MEDIUM - Add markdown code block detection (```json) before raw JSON parsing - Add _extract_findings_from_data() helper to reduce code duplication - Apply same fixes to review_tools.py for subagent parsing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(pr-review): improve post findings UX with batch support and feedback - Fix post findings failing on own PRs by falling back from REQUEST_CHANGES to COMMENT when GitHub returns 422 error - Change status badge to show "Reviewed" instead of "Commented" until findings are actually posted to GitHub - Add success notification when findings are posted (auto-dismisses after 3s) - Add batch posting support: track posted findings, show "Posted" badge, allow posting remaining findings in additional batches - Show loading state on button while posting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(github): resolve stale timestamp and null author bugs - Fix stale timestamp in batch_issues.py: Move updated_at assignment BEFORE to_dict() serialization so the saved JSON contains the correct timestamp instead of the old value - Fix AttributeError in context_gatherer.py: Handle null author/user fields when GitHub API returns null for deleted/suspended users instead of an empty object 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(security): address all high and medium severity PR review findings HIGH severity fixes: - Command Injection in autofix-handlers.ts: Use execFileSync with args array - Command Injection in pr-handlers.ts (3 locations): Use execFileSync + validation - Command Injection in triage-handlers.ts: Use execFileSync + label validation - Token Exposure in bot_detection.py: Pass token via GH_TOKEN env var MEDIUM severity fixes: - Environment variable leakage in subprocess-runner.ts: Filter to safe vars only - Debug logging in subprocess-runner.ts: Only log in development mode - Delimiter escape bypass in sanitize.py: Use regex pattern for variations - Insecure file permissions in trust.py: Use os.open with 0o600 mode - No file locking in learning.py: Use FileLock + atomic_write utilities - Bare except in confidence.py: Log error with specific exception info - Fragile module import in pr_review_engine.py: Import at module level - State transition validation in models.py: Enforce can_transition_to() 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * PR followup * fix(security): add usedforsecurity=False to MD5 hash calls MD5 is used for generating unique IDs/cache keys, not for security purposes. Adding usedforsecurity=False resolves Bandit B324 warnings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(security): address all high-priority PR review findings Fixes 5 high-priority issues from Auto Claude PR Review: 1. orchestrator_reviewer.py: Token budget tracking now increments total_tokens from API response usage data 2. pr_review_engine.py: Async exceptions now re-raise RuntimeError instead of silently returning empty results 3. batch_issues.py: IssueBatch.save() now uses locked_json_write for atomic file operations with file locking 4. project-middleware.ts: Added validateProjectPath() to prevent path traversal attacks (checks absolute, no .., exists, is dir) 5. orchestrator.py: Exception handling now logs full traceback and preserves exception type/context in error messages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(security): address all high-priority PR review findings Fixes 5 high-priority issues from Auto Claude PR Review: 1. orchestrator_reviewer.py: Token budget tracking now increments total_tokens from API response usage data 2. pr_review_engine.py: Async exceptions now re-raise RuntimeError instead of silently returning empty results 3. batch_issues.py: IssueBatch.save() now uses locked_json_write for atomic file operations with file locking 4. project-middleware.ts: Added validateProjectPath() to prevent path traversal attacks (checks absolute, no .., exists, is dir) 5. orchestrator.py: Exception handling now logs full traceback and preserves exception type/context in error messages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * feat(ui): add PR status labels to list view Add secondary status badges to the PR list showing review state at a glance: - "Changes Requested" (warning) - PRs with blocking issues (critical/high) - "Ready to Merge" (green) - PRs with only non-blocking suggestions - "Ready for Follow-up" (blue) - PRs with new commits since last review The "Ready for Follow-up" badge uses a cached new commits check from the store, only shown after the detail view confirms new commits via SHA comparison. This prevents false positives from PR updatedAt timestamp changes (which can happen from comments, labels, etc). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * PR labels * auto-claude: Initialize subtask-based implementation plan - Workflow type: feature - Phases: 3 - Subtasks: 6 - Ready for autonomous implementation --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
…yMik90#272) Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 4.0.15 to 4.0.16. - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Commits](https://github.com/vitest-dev/vitest/commits/v4.0.16/packages/vitest) --- updated-dependencies: - dependency-name: vitest dependency-version: 4.0.16 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@electron/rebuild](https://github.com/electron/rebuild) from 3.7.2 to 4.0.2. - [Release notes](https://github.com/electron/rebuild/releases) - [Commits](electron/rebuild@v3.7.2...v4.0.2) --- updated-dependencies: - dependency-name: "@electron/rebuild" dependency-version: 4.0.2 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andy <[email protected]>
Co-authored-by: danielfrey63 <[email protected]> Co-authored-by: Andy <[email protected]>
* fix(planning): accept bug_fix workflow_type alias * style(planning): ruff format * fix: refatored common logic * fix: remove ruff errors * fix: remove duplicate _normalize_workflow_type method Remove the incorrectly placed duplicate method inside ContextLoader class. The module-level function is the correct implementation being used. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: danielfrey63 <[email protected]> Co-authored-by: Andy <[email protected]> Co-authored-by: AndyMik90 <[email protected]> Co-authored-by: Claude Opus 4.5 <[email protected]>
…ow (AndyMik90#276) When dry_run=true, the workflow skipped creating the version tag but build jobs still tried to checkout that non-existent tag, causing all 4 platform builds to fail with "git failed with exit code 1". Now build jobs checkout develop branch for dry runs while still using the version tag for real releases. Closes: GitHub Actions run #20464082726
…ndyMik90#786) * feat: add terminal copy/paste keyboard shortcuts for Windows/Linux Implement smart copy/paste keyboard shortcuts in terminal emulator: - Smart CTRL+C: copies selected text or sends ^C interrupt if no selection - CTRL+V paste: pastes clipboard contents on Windows/Linux - Linux CTRL+SHIFT+C/V: alternative copy/paste shortcuts for Linux - Platform detection: correctly identifies Windows/Linux/macOS - Preserves all existing shortcuts (Ctrl+T, Ctrl+W, Ctrl+1-9, etc.) Implementation details: - Added platform detection constants (isMac, isWindows, isLinux) - Smart copy handler checks xterm.hasSelection() before copying - Uses xterm.paste() for proper encoding handling - Includes error handling for clipboard API failures - Handler ordering preserves all existing keyboard shortcuts Tests added: - Unit tests for keyboard event handlers (9/19 passing) - Integration tests for xterm.js + clipboard API - E2E tests for copy/paste flows (platform-specific) Fixes AndyMik90#38 - Terminal copy/paste not working on Windows 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * fix: resolve test failures for terminal copy/paste functionality - Fixed global XTerm mock setup to not interfere with test-specific mocks - Fixed 19 failing tests in useXterm.test.ts by adding proper DOM rendering - Fixed 7 failing tests in terminal-copy-paste.test.ts with same pattern - Added missing Mock type import for TypeScript compatibility Test Changes: - Replaced arrow functions with regular functions for mock constructors - Added ResizeObserver mock for browser API compatibility - Created wrapper components with proper DOM rendering - Used render() with act() instead of just renderHook() - Fixed type assertions (vi.Mock → Mock) All tests now pass (1297 passed, 6 skipped) Typecheck passes Lint passes (warnings only) * refactor: fix linting issues in terminal copy/paste test files E2E Test Changes (terminal-copy-paste.e2e.ts): - Removed unused imports (_android from Playwright, writeFileSync from fs) - Added global Navigator declaration for clipboard typing - Replaced (window as any) with typed navigator.clipboard calls - Removed dead helper functions (getCopyShortcutModifier, getPasteShortcutModifier) - Replaced relative Electron path with absolute path using __dirname - Renamed caught error 'e' to '_error' to satisfy lint rules Integration Test Changes (terminal-copy-paste.test.ts): - Removed unused renderHook import - Added process.platform restoration in afterEach cleanup - Fixed console error spy to safely coerce args[0] with String() Unit Test Changes (useXterm.test.ts): - Created reusable _createXTermMock factory function - Updated test to use TestWrapper pattern consistently - Added process.platform restoration in afterEach - Fixed test assertion (hasSelection: false) for Windows CTRL+SHIFT+C test All tests pass (1297 passed, 6 skipped) Typecheck passes Lint passes (warnings only) * fix: replace process.platform with navigator.platform for renderer compatibility Critical fix for runtime error: "process is not defined" in browser/renderer process. Core Changes (useXterm.ts): - Replaced process.platform (Node.js global) with navigator.platform (browser API) - Platform detection now uses: navigator.platform.toLowerCase() - isMac: navigatorPlatform.includes('mac') - isWindows: navigatorPlatform.includes('win') - isLinux: navigatorPlatform.includes('linux') Test Updates: - Integration tests: Updated to mock navigator.platform instead of process.platform - Added beforeEach/afterEach for proper cleanup - Removed redundant inline cleanup code - Added platform mocks where needed for Windows/Linux paste handler tests - Unit tests: Updated all process.platform references to navigator.platform - Changed originalPlatform to originalNavigatorPlatform - Updated afterEach to restore navigator.platform - Changed platform values: 'win32' → 'Win32', 'darwin' → 'MacIntel', 'linux' → 'Linux' - Removed unused _createXTermMock helper function E2E Test Improvements: - console.log → console.warn for clipboard accessibility message - Improved interrupt signal assertion: toMatch(/\^C|[$#>]\s*$/) All tests pass (1297 passed, 6 skipped) Typecheck passes Lint passes (warnings only) * fix: prevent double-paste by calling event.preventDefault() Fixed issue where pasted text appeared twice in the terminal. Root cause: When Ctrl+V was pressed: 1. Browser's default paste behavior was triggered 2. Our handler also called xterm.paste() Fix: Added event.preventDefault() to both paste handlers: - CTRL+V (Windows/Linux) - CTRL+SHIFT+V (Linux alternative) This prevents the browser's default paste behavior, ensuring only xterm.paste() handles the pasting operation once. Tests still pass (26 passed) * fix: resolve unreachable Linux handlers and improve test reliability Critical Fix (useXterm.ts): - Fixed unreachable CTRL+SHIFT+C/V handlers for Linux - Root cause: Regular CTRL+C/V handlers checked isMod && key, which matched even when SHIFT was pressed, preventing Linux-specific handlers from ever executing - Fix: Reordered checks to handle Linux shortcuts BEFORE regular shortcuts and added !event.shiftKey to regular copy/paste handlers E2E Test Improvements (terminal-copy-paste.e2e.ts): - Replaced fixed sleeps (waitForTimeout) with condition-based waits - Removed try/catch + test.skip anti-pattern, replaced with upfront precondition checks Unit Test Improvements (useXterm.test.ts): - Replaced trivial platform detection tests with comprehensive behavior tests - Added 4 new tests verifying platform-specific keyboard handling Test Results: 1298 passed, 6 skipped * refactor: extract XTerm mock setup into helper function Extract repeated XTerm mock setup code into a reusable setupMockXterm() helper function. This reduces test boilerplate from ~100 lines to ~20 lines per test while maintaining identical test coverage and behavior. Changes: - Added setupMockXterm() helper function that handles all mock initialization - Refactored all 20+ tests in useXterm.test.ts to use the helper - Significantly improved code readability and maintainability * fix(e2e): replace invalid toMatch() with toContainText() in terminal test Replace invalid Playwright locator assertion `toMatch()` with valid `toContainText()` assertion. The `toMatch()` method does not exist for Playwright locators; `toContainText()` is the correct matcher for checking text content with regex patterns. * refactor: extract copy/paste helpers and fix CTRL+SHIFT+C behavior Address PR review feedback: 1. [MEDIUM] Extract copy/paste helper functions - Added handleCopyToClipboard() helper to eliminate duplicate copy logic - Added handlePasteFromClipboard() helper to eliminate duplicate paste logic - Both handlers now use shared helper functions 2. [MEDIUM] Fix CTRL+SHIFT+C without selection on Linux - Changed from returning true (let event pass through) to returning false (consume event) - CTRL+SHIFT+C won't send proper interrupt signal, so consuming is correct behavior 3. [LOW] Add comment for isMac variable - Added comment explaining isMac is declared for documentation purposes Related: AndyMik90#38-terminal-copy-paste-is-not-working-on-windows * refactor: remove unused isMac variable Remove the unused isMac variable since it's not referenced in any conditional logic. The code already excludes macOS by only enabling custom paste handlers for Windows and Linux (isWindows || isLinux). Related: AndyMik90#38-terminal-copy-paste-is-not-working-on-windows * fix(e2e): remove non-existent electron.executablePath() API call Remove the executablePath parameter from electron.launch() to match the pattern used in other E2E tests (flows.e2e.ts, electron-helper.ts). * refactor(terminal): fix platform detection and clarify comments - Replace deprecated navigator.platform with navigator.userAgentData.platform with fallback to navigator.platform for older browsers - Add TypeScript type augmentation for NavigatorUAData interface - Fix misleading comment in handleCopyToClipboard to clarify return value semantics (true = copy attempted, false = no selection) - Add requestAnimationFrame mock to useXterm test for jsdom environment Fixes review findings for terminal copy/paste feature. --------- Co-authored-by: StillKnotKnown <[email protected]> Co-authored-by: Claude <[email protected]> Co-authored-by: Andy <[email protected]>
…yMik90#808) * fix(a11y): restore missing aria-label attributes on icon buttons Adds aria-label attributes to icon-only buttons for screen reader accessibility: - ChatHistorySidebar: New conversation, save/cancel edit, menu buttons - IdeaDetailPanel: Close panel button - IdeationHeader: Clear selection, select all, show/hide dismissed, configure, add more, dismiss all, regenerate buttons - GitHub/GitLab IssueDetail: External link buttons - GitLab MRDetail: External link button - KanbanBoard: Toggle show archived button - AdvancedSettings: Dismiss downgrade button - DevToolsSettings: Browse folder buttons - IntegrationSettings: Save/cancel rename, refresh, expand/collapse, rename, delete buttons Also adds corresponding i18n translation keys for en and fr locales. Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(i18n): use translation keys for tooltip content Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(i18n): use translation keys for IdeaCard and IdeationHeader tooltips Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
Prevents spec creation failures when tool results exceed the default 1MB buffer limit during discovery/research phases. Related: AndyMik90#813 Co-authored-by: StillKnotKnown <[email protected]>
* feat: add PR creation workflow for task worktrees Adds the ability to push a worktree branch and create a GitHub Pull Request directly from the Auto-Claude UI, instead of manually merging changes locally. ## User Flow 1. User completes a task build in an isolated worktree 2. Instead of clicking "Merge", user can click "Create PR" button 3. A dialog shows source branch → target branch (default: develop) 4. User confirms, system pushes branch and creates GitHub PR via `gh` CLI 5. PR URL is displayed and can be opened in browser ## Changes ### Backend (Python) - Added `push_branch()` with timeout (120s) for git push - Added `create_pull_request()` with timeout (60s) for gh CLI - Added `push_and_create_pr()` orchestrator - Added `--create-pr` CLI argument with handler - Added BRANCH and LINK icons with unique ASCII fallbacks ### Frontend (TypeScript) - Added `WorktreeCreatePRResult` type - Added `TASK_WORKTREE_CREATE_PR` IPC channel - Added IPC handler with 2-min timeout and EAFP pattern - Added `createWorktreePR` preload API method - Created reusable `CreatePRDialog` component - Integrated PR button in `WorkspaceStatus` - Added i18n translations (EN + FR) ## Code Review Fixes (from PR AndyMik90#606) - All subprocess calls have timeouts (TimeoutExpired handled) - EAFP pattern for file existence checks (no TOCTOU) - IPC handler has timeout with process cleanup - Icon ASCII fallbacks are unique (`[BR]` for BRANCH, `[L]` for LINK) - All user-facing strings use i18n translation keys - Translations added to BOTH en/*.json AND fr/*.json - CreatePRDialog component is reusable - Proper typed objects (no type assertions) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address PR review comments and add PR status persistence Review comment fixes: - Fix NameError: use args.base_branch instead of undefined base_branch (main.py) - Add JSON output for frontend IPC consumption (main.py) - Narrow exception handling in _extract_spec_summary to (OSError, UnicodeDecodeError) - Narrow exception handling in _get_existing_pr_url to subprocess-specific exceptions - Add debug logging for exception cases in worktree.py - Add 'exit' event handler to IPC handler for robustness (worktree-handlers.ts) Additional improvements: - Persist PR status to both main and worktree locations - Add CreatePR button to Worktrees page with i18n support - Add CreatePRDialog tests (11 test cases) - Fix i18n compliance for all new strings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(a11y): use button instead of anchor for PR link action Addresses review comment: anchor elements should only be used for navigation, not for triggering actions. Using a button improves accessibility for screen readers and keyboard users. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: address nitpick review comments Backend (worktree.py): - Add TypedDict types (PushBranchResult, PullRequestResult) for better type safety - Add retry logic with exponential backoff (3 attempts) for transient network failures - Retries on: connection errors, network issues, timeouts, reset connections Frontend: - Fix checkbox accessibility: add explicit id/htmlFor for draft PR checkbox - Normalize return type in TaskDetailModal.handleCreatePR to include all fields - Add message field to WorktreeCreatePRResult for consistency with other result types 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: remove duplicate JSON output in create-pr command The JSON was being printed twice: 1. In workspace_commands.py handle_create_pr_command() 2. In main.py after calling handle_create_pr_command() This caused JSON.parse to fail with "Unexpected non-whitespace character after JSON" when the frontend tried to parse the output. Removed the duplicate print from main.py since workspace_commands.py already handles JSON output for frontend parsing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: make IPC handler debug logging conditional Debug output for MERGE and CREATE_PR handlers now only appears when: - process.env.DEBUG === 'true', OR - process.env.NODE_ENV === 'development' This matches the pattern used elsewhere in the codebase (project-initializer.ts, terminal-name-generator.ts, etc.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address code review feedback on JSON parsing and status persistence - Use non-greedy regex pattern to extract last complete JSON object from stdout, avoiding issues with multiple JSON objects or garbage - Add validation that parsed JSON has expected shape before using (typeof checks for success, pr_url, already_exists, error fields) - Await persistPlanStatus calls instead of fire-and-forget to ensure status is persisted before resolving the IPC handler 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: ensure parent directory exists before writing metadata Add mkdirSync with recursive:true before writeFileSync in updateTaskMetadataPrUrl to prevent write failures when the parent directory doesn't exist. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: add TypedDict for push_and_create_pr return type Add PushAndCreatePRResult TypedDict with all fields (success, pushed, remote, branch, pr_url, already_exists, error) for static type safety. Update push_and_create_pr method signature and return statements to use the TypedDict constructor. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(i18n): use feminine form for PR in French translation Change "PR créé" to "PR créée" to match French grammatical gender (PR is feminine: "la PR"). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(i18n): use translation key for Open PR button Replace hardcoded "Open PR" label with i18n key common:buttons.openPR in Worktrees.tsx. Add translation keys to en/common.json and fr/common.json. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(a11y): use semantic button for PR link in TaskMetadata Replace anchor element with semantic button for better accessibility. Screen readers now properly announce this as an interactive control. The visible URL text provides an accessible label. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(a11y,i18n): use semantic button and i18n for PR status in TaskDetailModal - Replace anchor element with semantic button for PR link - Replace hardcoded "PR Created" with t('tasks:status.prCreated') - Apply fix to both the completion state link and the badge 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(i18n): use translation keys for PR button in WorkspaceStatus Add useTranslation hook and replace hardcoded strings: - "Creating PR..." → t('taskReview:pr.actions.creating') - "Create PR" → t('common:buttons.createPR') 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * test: scope numeric assertions to stats container in CreatePRDialog Use within() to scope commit count and changes assertions to the stats container, avoiding accidental matches elsewhere in the dialog. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: handle success results without prUrl in CreatePRDialog Allow success state to render even without a URL (e.g., from the "no JSON in output, assuming success" fallback). The PR link button is now conditionally rendered only when prUrl is present. This prevents the dialog from showing an empty body when the backend returns { success: true, prUrl: undefined }. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address PR review findings for PR creation feature Backend (worktree.py): - Validate PR URL extraction - set pr_url to None if no valid URL found - Add message field to TypedDicts for informative feedback - Handle missing URL gracefully for existing PRs with message Frontend (worktree-handlers.ts): - Add GIT_BRANCH_REGEX and PR_CREATION_TIMEOUT_MS as module-level constants - Add input validation for targetBranch parameter - Add branch name validation in getTaskBaseBranch - Fix inconsistent JSON regex pattern between success/error paths Tests (CreatePRDialog.test.tsx): - Add test for draft PR checkbox functionality - Add test for 'already exists' PR state - Add test for success without prUrl Constants (task.ts): - Add pr_created to TASK_STATUS_LABELS and TASK_STATUS_COLORS 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: extract helper functions from TASK_WORKTREE_CREATE_PR handler - Extract parsePRJsonOutput() for JSON parsing with snake_case/camelCase - Extract updateTaskStatusAfterPRCreation() for metadata updates - Extract buildCreatePRArgs() for argument construction with validation - Extract initializePythonEnvForPR() for Python environment setup - Add generic withRetry() helper with exponential backoff - Refactor inline updatePlanWithRetry() to use withRetry() helper Addresses HIGH priority review finding about handler complexity and MEDIUM priority finding about duplicated retry logic. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address additional PR review findings Backend (worktree.py): - Update PullRequestResult.pr_url and PushAndCreatePRResult.pr_url to allow None (str | None) for cases where PR was created but URL couldn't be extracted Frontend (CreatePRDialog): - Add data-testid="pr-stats-container" for stable test targeting - Update test to use getByTestId instead of brittle CSS class selector Frontend (TaskDetailModal): - Remove hardcoded English error strings from handleCreatePR - Propagate IPC errors directly, let CreatePRDialog use i18n fallbacks Frontend (TaskMetadata): - Add i18n support for "Pull Request" header label - Add translation keys to en/tasks.json and fr/tasks.json 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: handle success default and retry validation in PR handlers - Default success to false in parsePRJsonOutput to avoid masking failures when the field is missing from the JSON response - Add validation to withRetry to ensure at least one attempt is made by clamping maxRetries to a minimum of 1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(i18n): remove hardcoded error strings from Worktrees handleCreatePR Let CreatePRDialog handle i18n fallback for undefined error values instead of hardcoding 'Failed to create PR' and 'Unknown error'. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: reset isCreating flag when CreatePRDialog opens Prevents stale loading state when reopening the dialog after a previous PR creation attempt. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(test): use os.tmpdir() for cross-platform temp path matching Tests were hardcoded to expect /tmp/ but macOS uses /var/folders/.../T/ for temp files. Now dynamically uses os.tmpdir() for platform-independent path matching. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * style: apply pre-commit auto-fixes - Remove trailing whitespace from 20 files - Fix ruff lint errors in Python files - Apply ruff formatting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address CodeQL and code review findings - Extract escapeForRegex helper in claude-integration-handler.test.ts to deduplicate regex-escaping logic and avoid ReDoS false-positive - Anchor regex pattern in CreatePRDialog.test.tsx to prevent arbitrary host matching (CodeQL security alert) - Remove unused ExternalLink import from TaskCard.tsx - Add defensive window.electronAPI check in CreatePRDialog handleOpenPR to avoid runtime errors in test/misconfigured environments 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address CodeQL and code review findings Frontend: - Fix CodeQL regex anchor issue in CreatePRDialog.test.tsx by using data-testid="pr-link-button" instead of URL regex pattern - Add data-testid to PR link button in CreatePRDialog.tsx - Add defensive window.electronAPI?.openExternal check in TaskCard.tsx Backend: - Add CreatePRResult TypedDict for type-safe return values - Wrap push_and_create_pr call in try/except for clean JSON output on exceptions instead of unhandled tracebacks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * feat: add frontend validation for PR creation form - Add client-side validation for branch names and PR titles - Validate git branch name format (alphanumeric, hyphens, underscores, slashes) - Ensure PR title is not empty - Provide immediate user feedback before backend submission - Add localized error messages in English and French * refactor: improve error handling and import organization in PR creation - Clean up CreatePRResult error structure: separate user-friendly 'message' from technical 'error' field - Move get_existing_build_worktree import to module-level imports for consistency - Remove redundant local import inside handle_create_pr_command function - Improve API clarity by providing both user messages and technical error details * refactor: properly convert PushAndCreatePRResult to CreatePRResult in CLI handler - Convert raw PushAndCreatePRResult to expected CreatePRResult shape - Map fields appropriately: success, pr_url, already_exists, error, message - Maintain type safety by returning declared CreatePRResult instead of raw result - Preserve all essential information while conforming to API contract - Improve code maintainability and type correctness * feat: include push and branch details in CreatePRResult - Add pushed, remote, and branch fields to CreatePRResult type - Include push status, remote name, and branch name in CLI result - Provide complete operation details for frontend consumption - Enhance API with comprehensive PR creation status information - Maintain backward compatibility while adding useful metadata * fix: improve type safety and i18n consistency for task status - Add isValidDropColumn type guard in KanbanBoard.tsx to preserve literal types from TASK_STATUS_COLUMNS instead of using unsafe cast - Replace duplicate CheckCircle2 with GitPullRequest icon in TaskDetailModal PR button for visual consistency with TaskCard - Normalize pr_created i18n key to columns.pr_created namespace - Add pr_created translation keys to en/fr tasks.json columns section - Update all hardcoded status.prCreated references to use mapping 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: remove duplicate PR Created badges and unused import - Remove unused ExternalLink import from TaskDetailModal.tsx - Fix duplicate badge rendering for pr_created status in both TaskCard and TaskDetailModal - Consolidate to single badge showing 'PR Created' for completed PR tasks * refactor: extract status badge variant logic and use i18n for completion text - Extract complex badge variant ternary into getStatusBadgeVariant helper function in TaskDetailModal - Replace hardcoded 'Task completed' with i18n translation t('tasks:status.complete') - Update getStatusBadgeVariant in TaskCard to return 'success' for pr_created status - Use getStatusBadgeVariant consistently instead of hardcoded variant in pr_created conditional * fix: use optional chaining for electronAPI in PR URL button - Update TaskDetailModal PR URL button onClick to use window.electronAPI?.openExternal - Matches the pattern used in TaskCard.tsx handleViewPR function - Prevents runtime errors when electronAPI is undefined * fix: add URL validation for parsed PR URLs Add isValidGitHubUrl() helper to validate PR URLs are valid https://github.com or *.github.com URLs before using them. This improves robustness by filtering out invalid URLs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: extract WorktreeCreatePROptions into named exported type Extract the inline options object from createWorktreePR signature into a reusable named type. Updated all callers and related declarations to use the new type for consistency across components. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: use WorktreeCreatePROptions type and add defensive optional chaining - Update createWorktreePR implementation to use WorktreeCreatePROptions instead of inline type (matches interface declaration) - Add optional chaining for window.electronAPI?.openExternal in Worktrees - Remove unused ExternalLink import from Worktrees component 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address PR review findings for code quality - Extract retry helper functions in worktree.py for DRY network error handling - Fix broad 'http' retry condition to exclude auth errors (401, 403) - Add Windows taskkill fallback for forceful process termination - Import CreatePRResult from worktree.py instead of duplicating TypedDict - Move import to top of worktree.py following Python conventions - Return result object from updateTaskStatusAfterPRCreation for better state tracking - Add PR title validation (printable chars, 256 char max) - Use WorktreeCreatePROptions type consistently in handler 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address PR review findings - dedupe retry logic and support GH Enterprise URLs - Refactor push_branch and create_pull_request to use _with_retry helper instead of duplicated retry loops (addresses code duplication issue) - Update isValidGitHubUrl to accept any HTTPS URL with /pull/\d+ path to support GitHub Enterprise instances with custom domains Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(ui): relax isValidGitHubUrl validation for GH Enterprise support - Remove /pull/\d+ path requirement that was too strict - Only require HTTPS protocol and non-empty hostname - Allows GitHub Enterprise URLs with custom domains to be parsed correctly Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address CodeRabbit feedback for PR creation - Fix undefined base_branch variable in CLI main.py with proper auto-detection - Improve event handling in worktree-handlers.ts with comprehensive exit event support - Fix dynamic retry count in error messages instead of hardcoded '3 attempts' - Use get_git_executable() and handle FileNotFoundError in push_branch method - Move debug_warning import to module level for better performance - Ensure all error messages reflect actual retry counts used * fix: address additional PR review feedback - main.py: Simplify PR creation by passing pr_target directly to handler, letting WorktreeManager._detect_base_branch handle detection internally - worktree.py: Fix _with_retry type signature to match actual tuple return, use get_git_executable() for proper git path resolution, move debug_warning import to top of file - worktree-handlers.ts: Extract duplicated close/exit callback logic into handleCreatePRProcessExit helper function - workspace_commands.py: Remove redundant json import (CodeQL fix) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(test): clear GIT_INDEX_FILE in temp_git_repo fixture Pre-commit sets GIT_INDEX_FILE to a relative path (.git/index.pre-commit) which causes git commands in temp repos to fail with "index file open failed: Not a directory" because the relative path resolves against the main repo instead of the temp repo. The fix saves and clears GIT_INDEX_FILE before creating the temp repo, then restores it in a finally block to ensure cleanup. Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: use proper base branch fallback for PR creation target The worktree status handlers were incorrectly determining baseBranch by checking the current HEAD branch in the main project directory. This caused the PR creation dialog to pre-populate the target branch with the user's current feature branch instead of main/develop. Added getEffectiveBaseBranch() helper that properly determines the base branch using this priority: 1. Task metadata baseBranch (from task_metadata.json) 2. Project settings mainBranch 3. Git detection (main/master branch existence) 4. Fallback to 'main' Fixed three handlers: - TASK_WORKTREE_STATUS - TASK_WORKTREE_DIFF - List worktrees helper Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: Andy <[email protected]>
* fix: automate auto labeling based on comments * resolve comments * fix approved workflow to auto label * enhance yml * fix: improve error handling and align verdicts with backend outputs - Replace broad catch blocks with proper 404-only suppression, log warnings for network/auth/rate-limit errors using core.warning - Update VERDICTS map: rename REJECTED to BLOCKED with 'AC: Blocked' label to match backend outputs - Remove unused RE_REVIEW entry (manual-only, no backend output) - Simplify APPROVED regex by removing unused 🟢 emoji - Remove unconditional CI status reset from require-re-review job to avoid race conditions with update-ci-status job - Add null safety checks (e && e.status) for consistent error handling Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address security vulnerabilities and improve workflow robustness Security fixes: - Remove non-[bot] usernames from TRUSTED_BOT_ACCOUNTS (spoofing vulnerability) - Verify bot account type via comment.user.type === 'Bot' (authorization bypass) - Tighten parseVerdict regex patterns using \s* instead of .* wildcards Robustness improvements: - Throw errors instead of warning on label removal failures (prevents conflicting labels) - Remove try-catch from fetchCheckRuns to let retries handle transient failures - Implement pagination for check runs (>100 checks support) - Implement pagination for PR files (>100 files support) - Update status to 'Checking' when checks are incomplete (prevents stale labels) Documentation: - Document intentional STATUS_LABELS/REVIEW_LABELS duplication across jobs Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: add pagination for check runs in check-status-command job Replace single-page listForRef call with github.paginate to handle repositories with >100 check runs on a single commit. Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: sync REVIEW_LABELS and improve error handling in require-re-review - Add missing 'AC: Reviewed' to REVIEW_LABELS in check-status-command job to match update-review-status job and avoid maintenance confusion - Change removeLabel error handling in require-re-review to throw on non-404 errors, preventing 'AC: Approved' and 'AC: Needs Re-review' from coexisting when label removal fails Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: Andy <[email protected]>
AndyMik90#751) * feat(github): enhance PR merge readiness checks with branch state validation - Added support for checking if a PR branch is behind the base branch, introducing a new warning state for "Branch Out of Date." - Updated the verdict generation logic to classify this state as a soft blocker (NEEDS_REVISION) rather than a hard blocker. - Enhanced the merge readiness interface to include an `isBehind` property for better frontend integration. - Updated relevant services and handlers to accommodate the new branch state checks, ensuring accurate feedback during PR reviews. This improves the user experience by providing clearer guidance on necessary actions for PRs that are not up to date with the base branch. * fix: address PR feedback for branch-behind detection - Fix HIGH: Handle MERGE_WITH_CHANGES verdict when branch is behind - Fix MEDIUM: Extract duplicated reasoning strings to shared constants (BRANCH_BEHIND_BLOCKER_MSG, BRANCH_BEHIND_REASONING in models.py) - Fix LOW: Remove unreachable dead code for branch-behind checks in orchestrator.py and parallel_orchestrator_reviewer.py - Consolidate low-severity suggestions note into the active branch-behind path Co-authored-by: CodeRabbit <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
) * feat: add Claude Code changelog link to version notifiers Add link to Claude Code Changelog in both: - Claude Code CLI status badge popover - App Update Notification dialog The link opens https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md in external browser, allowing users to check what's new in Claude Code. Also converts AppUpdateNotification to use i18n translations. Fixes AndyMik90#817 * refactor: improve AppUpdateNotification code quality - Extract CLAUDE_CODE_CHANGELOG_URL to named constant - Remove unused "common" namespace from useTranslation hook --------- Co-authored-by: StillKnotKnown <[email protected]>
Fixes AndyMik90#684 ## Problem Users reported `ModuleNotFoundError: No module named 'pydantic_core._pydantic_core'` when running the packaged macOS app. This occurred because: 1. pydantic-core includes a compiled C extension (_pydantic_core.so) 2. During packaging, pip could attempt to build from source if no binary wheel found 3. Source builds could fail silently without a C compiler 4. The package would be marked as "installed" but missing the critical extension 5. pydantic_core was not in the critical packages verification list ## Solution This fix implements two changes: 1. **Force binary wheels for pydantic packages** - Added `--only-binary pydantic,pydantic-core` to pip install args - Prevents silent source build failures - Ensures compiled extensions are properly included 2. **Add pydantic_core to critical packages verification** - Added to both download-python.cjs verification checks (lines 712, 815) - Added to python-env-manager.ts verification (line 129) - Ensures packaging fails fast if pydantic_core is missing ## Testing The fix ensures that: - Packaging will fail if pydantic binary wheels aren't available - Both build-time and runtime verification check for pydantic_core - Users won't receive a broken package with missing dependencies 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.5 <[email protected]> Co-authored-by: StillKnotKnown <[email protected]> Co-authored-by: Alex <[email protected]> Co-authored-by: Andy <[email protected]>
…90#803) * feat: Add Sentry environment variables to build process in CI workflows - Integrated SENTRY_DSN, SENTRY_TRACES_SAMPLE_RATE, and SENTRY_PROFILES_SAMPLE_RATE as environment variables in the build steps of both beta-release.yml and release.yml workflows. - This enhancement ensures that Sentry monitoring is properly configured during application builds across different platforms (macOS, Windows, Linux). This change improves error tracking and performance monitoring capabilities for the application. * fix: add Sentry env vars to Package steps The package:* npm scripts internally run electron-vite build, overwriting the previous build that had Sentry configuration. This adds SENTRY_DSN, SENTRY_TRACES_SAMPLE_RATE, and SENTRY_PROFILES_SAMPLE_RATE to all Package steps in both release.yml and beta-release.yml workflows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: Alex <[email protected]>
Add support for Azure AI Foundry as an alternative to Anthropic API in the API Profiles system. Users can now configure Azure-hosted Claude models through the Settings UI. Changes: - Add profile type selector (Anthropic API vs Microsoft Foundry) - Add Foundry-specific fields: Azure Resource Name, Endpoint URL, optional API Key - Support Entra ID authentication (no API key required when using `az login`) - Update backend auth to recognize Foundry credentials - Add environment variable mapping for Foundry: CLAUDE_CODE_USE_FOUNDRY, ANTHROPIC_FOUNDRY_RESOURCE, ANTHROPIC_FOUNDRY_BASE_URL, ANTHROPIC_FOUNDRY_API_KEY - Add model name mappings support for Azure deployments - Add i18n translations (en/fr) - Update OAuth mode clearing to include Foundry variables Closes AndyMik90#823
|
|
📝 WalkthroughWalkthroughAdds Microsoft Foundry (Azure AI Foundry) as an alternative API profile type alongside Anthropic, expanding backend env config and auth resolution, frontend profile types, services, IPC handlers, UI, types, presets, tests, and i18n strings to support Foundry resource, endpoint, and optional API key workflows. Changes
Sequence DiagramsequenceDiagram
participant User
participant UI as ProfileEditDialog
participant Store as SettingsStore
participant IPC as IPC Handler
participant Service as ProfileService
participant Backend as Backend Auth
User->>UI: Select profile type & enter config
UI->>Store: testConnection(baseUrl, apiKey, signal, profileType, foundryResource)
Store->>IPC: PROFILES_TEST_CONNECTION(baseUrl, apiKey, requestId, profileType, foundryResource)
alt profileType == "foundry"
IPC->>Service: testFoundryConnection(baseUrl, apiKey, foundryResource)
Service->>Service: Resolve endpoint (resource → baseUrl) and validate
Service-->>IPC: TestConnectionResult
else
IPC->>Service: testConnection(baseUrl, apiKey)
Service->>Service: Validate baseUrl & apiKey
Service-->>IPC: TestConnectionResult
end
IPC-->>Store: IPC Result
Store-->>UI: Test Result
UI-->>User: Display status
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Thanks for your first PR!
A maintainer will review it soon. Please make sure:
- Your branch is synced with
develop - CI checks pass
- You've followed our contribution guide
Welcome to the Auto Claude community!
Summary of ChangesHello @riccardo-algorime, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the API profile system by integrating Microsoft Foundry (Azure AI) as a new provider for Claude models. It introduces a new profile type, allowing users to configure and manage their Azure-hosted Claude instances directly within the application, complete with flexible authentication options and a dedicated connection testing mechanism. This enhancement provides greater choice and adaptability for users leveraging cloud-based AI services. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces support for Microsoft Foundry (Azure AI Foundry) API profiles, alongside the existing Anthropic API profiles. Key changes include adding new environment variables for Foundry configuration in .env.example and core/auth.py, and updating get_auth_token to prioritize Foundry authentication. The frontend now includes a 'Profile Type' selector in the settings dialog, allowing users to configure Foundry-specific details like Azure Resource Name and Endpoint URL, with corresponding validation logic in profile-service.ts and ProfileEditDialog.tsx. The testConnection IPC handler and related services (profile-service.ts, profile-api.ts, settings-store.ts) have been extended to route connection tests based on profile type, including a new testFoundryConnection function for basic reachability checks. Environment variable mapping in getAPIProfileEnv was updated to correctly set Foundry-specific variables. Review comments highlighted the need to refactor duplicated validation logic in createProfile and updateProfile into a shared helper function, remove debugging console.log statements, and simplify conditional logic for setting foundryResource in profile creation and update functions.
| export async function createProfile(input: CreateProfileInput): Promise<APIProfile> { | ||
| // Validate base URL | ||
| if (!validateBaseUrl(input.baseUrl)) { | ||
| throw new Error('Invalid base URL'); | ||
| const profileType = input.type || 'anthropic'; | ||
|
|
||
| // Validate base URL (required for anthropic, optional for foundry if foundryResource is set) | ||
| if (profileType === 'anthropic') { | ||
| if (!validateBaseUrl(input.baseUrl)) { | ||
| throw new Error('Invalid base URL'); | ||
| } | ||
| } else if (profileType === 'foundry') { | ||
| // Foundry: needs either foundryResource OR baseUrl | ||
| const hasResource = input.foundryResource && input.foundryResource.trim() !== ''; | ||
| const hasBaseUrl = input.baseUrl && input.baseUrl.trim() !== '' && validateBaseUrl(input.baseUrl); | ||
| if (!hasResource && !hasBaseUrl) { | ||
| throw new Error('Either Azure Resource Name or Endpoint URL is required'); | ||
| } | ||
| } | ||
|
|
||
| // Validate API key | ||
| if (!validateApiKey(input.apiKey)) { | ||
| throw new Error('Invalid API key'); | ||
| // Validate API key (required for anthropic, optional for foundry - Entra ID auth) | ||
| if (profileType === 'anthropic') { | ||
| if (!validateApiKey(input.apiKey)) { | ||
| throw new Error('Invalid API key'); | ||
| } | ||
| } | ||
| // For foundry, API key is optional (Entra ID auth supported) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The validation logic for profile inputs is duplicated between createProfile (lines 127-151) and updateProfile (lines 201-225). This violates the DRY (Don't Repeat Yourself) principle and makes maintenance harder, as any change to the validation rules must be applied in two places.
To improve this, you can extract the validation logic into a dedicated helper function. This function can then be called from both createProfile and updateProfile.
Here's an example of how you could refactor this:
function validateProfileInput(input: CreateProfileInput | UpdateProfileInput): void {
const profileType = input.type || 'anthropic';
// Validate base URL (required for anthropic, optional for foundry if foundryResource is set)
if (profileType === 'anthropic') {
if (!validateBaseUrl(input.baseUrl)) {
throw new Error('Invalid base URL');
}
} else if (profileType === 'foundry') {
// Foundry: needs either foundryResource OR baseUrl
const hasResource = input.foundryResource && input.foundryResource.trim() !== '';
const hasBaseUrl = input.baseUrl && input.baseUrl.trim() !== '' && validateBaseUrl(input.baseUrl);
if (!hasResource && !hasBaseUrl) {
throw new Error('Either Azure Resource Name or Endpoint URL is required');
}
}
// Validate API key (required for anthropic, optional for foundry - Entra ID auth)
if (profileType === 'anthropic') {
if (!validateApiKey(input.apiKey)) {
throw new Error('Invalid API key');
}
}
}
export async function createProfile(input: CreateProfileInput): Promise<APIProfile> {
validateProfileInput(input);
// ... rest of the function
}
export async function updateProfile(input: UpdateProfileInput): Promise<APIProfile> {
validateProfileInput(input);
// ... rest of the function
}|
|
||
| // If no active profile (null/empty), return empty object (OAuth mode) | ||
| if (!file.activeProfileId || file.activeProfileId === '') { | ||
| console.log('[getAPIProfileEnv] No active API profile, using OAuth mode'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Foundry resource (only for foundry profiles) | ||
| ...(profileType === 'foundry' && foundryResource.trim() | ||
| ? { foundryResource: foundryResource.trim() } | ||
| : { foundryResource: undefined }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic for setting foundryResource during an update can be simplified for better readability. The current conditional spread is a bit complex.
A more direct approach is to use a single ternary operator. This makes the intent clearer: foundryResource should only be set for 'foundry' profiles, and it should be undefined otherwise or if empty. This also correctly cleans up the foundryResource field if you switch the profile type away from 'foundry'.
A similar simplification can be applied to the creation logic on lines 362-365.
| // Foundry resource (only for foundry profiles) | |
| ...(profileType === 'foundry' && foundryResource.trim() | |
| ? { foundryResource: foundryResource.trim() } | |
| : { foundryResource: undefined }), | |
| foundryResource: profileType === 'foundry' ? (foundryResource.trim() || undefined) : undefined, |
| // Foundry resource (only for foundry profiles) | ||
| ...(profileType === 'foundry' && foundryResource.trim() | ||
| ? { foundryResource: foundryResource.trim() } | ||
| : {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic for conditionally adding foundryResource during profile creation can be made more concise. Instead of a ternary operator that returns an empty object, you can use a logical AND (&&) short-circuit for better readability.
| // Foundry resource (only for foundry profiles) | |
| ...(profileType === 'foundry' && foundryResource.trim() | |
| ? { foundryResource: foundryResource.trim() } | |
| : {}) | |
| ...(profileType === 'foundry' && foundryResource.trim() && { foundryResource: foundryResource.trim() }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
apps/backend/core/auth.py (2)
175-192: Updateget_auth_token_source()to handle Foundry authentication.The function
get_auth_token_source()doesn't check for Foundry environment variables, so it will returnNonewhen Foundry authentication is active. This could cause confusion in logging or debugging scenarios where the auth source needs to be identified.🔧 Proposed fix to add Foundry source detection
def get_auth_token_source() -> str | None: """Get the name of the source that provided the auth token.""" + # Check for Microsoft Foundry first + if os.environ.get("CLAUDE_CODE_USE_FOUNDRY") == "1": + if os.environ.get("ANTHROPIC_FOUNDRY_API_KEY"): + return "ANTHROPIC_FOUNDRY_API_KEY" + return "Microsoft Entra ID (Azure)" + # Check environment variables first for var in AUTH_TOKEN_ENV_VARS: if os.environ.get(var): return var
195-233: Update error message inrequire_auth_token()to mention Foundry authentication.The error message in
require_auth_token()doesn't mention the Microsoft Foundry authentication option, which could confuse users who are trying to configure Azure AI Foundry support.📝 Proposed fix to include Foundry in error guidance
token = get_auth_token() if not token: error_msg = ( "No OAuth token found.\n\n" "Auto Claude requires Claude Code OAuth authentication.\n" "Direct API keys (ANTHROPIC_API_KEY) are not supported.\n\n" + "For Microsoft Foundry (Azure AI), set:\n" + " CLAUDE_CODE_USE_FOUNDRY=1\n" + " ANTHROPIC_FOUNDRY_RESOURCE=your-resource-name\n" + " ANTHROPIC_FOUNDRY_API_KEY=your-key (or use Entra ID)\n\n" ) # Provide platform-specific guidance
🤖 Fix all issues with AI agents
In @apps/backend/.env.example:
- Line 47: The comment instructing users to run "claude config set --global
provider azure" is incorrect; remove that CLI instruction and replace it with
guidance to configure Anthropic Foundry via environment variables instead, e.g.,
set ANTHROPIC_FOUNDRY_API_KEY (the Foundry API key) and the Foundry endpoint
variable (e.g., ANTHROPIC_FOUNDRY_API_BASE or ANTHROPIC_FOUNDRY_API_BASE_URL)
with the appropriate URL, and mention any other required env vars for Foundry
integration.
In @apps/frontend/src/main/services/profile/profile-service.ts:
- Around line 649-659: The catch path can leak the internal timeout when
controller is created: ensure that when using the internally created
AbortController (variable controller) you always clear the timeoutId in the
error path after a thrown fetch; update the function surrounding the fetch call
(referencing endpointUrl, fetch, signal, controller, timeoutId) to call
clearTimeout(timeoutId) in the catch/finally path (or use a single finally
block) so timeoutId is cleared whether fetch resolves or throws.
- Around line 663-676: The condition checking response.status >= 200 &&
response.status < 600 treats any HTTP status (2xx–5xx) as "success", making the
success returns unreachable/incorrect; update the logic in the
profile-service.ts check that inspects response.status so that "success" uses a
true success range (e.g., response.status >= 200 && response.status < 300) and,
if you need to assert endpoint reachability irrespective of success, add a
separate branch for response.status < 600 to return a reachable-but-failed
status; adjust the returns that reference apiKey and the Entra ID message
accordingly so they only occur in the true-success branch while keeping a
distinct message/return for reachable non-success responses.
In @apps/frontend/src/shared/types/profile.ts:
- Around line 30-33: The profile type currently declares apiKey: string but
Foundry profiles can use Entra ID with no apiKey; change the field to optional
(apiKey?: string) in the profile type declaration (near APIProfileType and the
profile interface in profile.ts) and update any downstream consumers to handle
undefined/'' cases (add null/undefined guards where code assumes a non-empty
apiKey). If you prefer to keep it required, instead update the apiKey comment to
explicitly state "May be empty string for Foundry with Entra ID auth" and add
type guards in places that rely on presence; prefer making it optional to match
runtime behavior.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json,!**/package-lock.json
📒 Files selected for processing (15)
apps/backend/.env.exampleapps/backend/core/auth.pyapps/frontend/src/main/agent/env-utils.tsapps/frontend/src/main/ipc-handlers/profile-handlers.tsapps/frontend/src/main/services/profile/index.tsapps/frontend/src/main/services/profile/profile-manager.tsapps/frontend/src/main/services/profile/profile-service.tsapps/frontend/src/preload/api/profile-api.tsapps/frontend/src/renderer/components/settings/ProfileEditDialog.tsxapps/frontend/src/renderer/stores/settings-store.tsapps/frontend/src/shared/constants/api-profiles.tsapps/frontend/src/shared/i18n/locales/en/settings.jsonapps/frontend/src/shared/i18n/locales/fr/settings.jsonapps/frontend/src/shared/types/ipc.tsapps/frontend/src/shared/types/profile.ts
🧰 Additional context used
📓 Path-based instructions (7)
apps/frontend/src/**/*.{ts,tsx,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Always use i18n translation keys for all user-facing text in the frontend instead of hardcoded strings
Files:
apps/frontend/src/renderer/stores/settings-store.tsapps/frontend/src/main/services/profile/profile-manager.tsapps/frontend/src/shared/constants/api-profiles.tsapps/frontend/src/renderer/components/settings/ProfileEditDialog.tsxapps/frontend/src/main/ipc-handlers/profile-handlers.tsapps/frontend/src/shared/types/ipc.tsapps/frontend/src/main/agent/env-utils.tsapps/frontend/src/preload/api/profile-api.tsapps/frontend/src/shared/types/profile.tsapps/frontend/src/main/services/profile/profile-service.tsapps/frontend/src/main/services/profile/index.ts
apps/frontend/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use
useTranslation()hook with namespace prefixes (e.g., 'navigation:items.key') for accessing translation strings in React components
Files:
apps/frontend/src/renderer/stores/settings-store.tsapps/frontend/src/main/services/profile/profile-manager.tsapps/frontend/src/shared/constants/api-profiles.tsapps/frontend/src/renderer/components/settings/ProfileEditDialog.tsxapps/frontend/src/main/ipc-handlers/profile-handlers.tsapps/frontend/src/shared/types/ipc.tsapps/frontend/src/main/agent/env-utils.tsapps/frontend/src/preload/api/profile-api.tsapps/frontend/src/shared/types/profile.tsapps/frontend/src/main/services/profile/profile-service.tsapps/frontend/src/main/services/profile/index.ts
apps/frontend/**/*.{ts,tsx}
⚙️ CodeRabbit configuration file
apps/frontend/**/*.{ts,tsx}: Review React patterns and TypeScript type safety.
Check for proper state management and component composition.
Files:
apps/frontend/src/renderer/stores/settings-store.tsapps/frontend/src/main/services/profile/profile-manager.tsapps/frontend/src/shared/constants/api-profiles.tsapps/frontend/src/renderer/components/settings/ProfileEditDialog.tsxapps/frontend/src/main/ipc-handlers/profile-handlers.tsapps/frontend/src/shared/types/ipc.tsapps/frontend/src/main/agent/env-utils.tsapps/frontend/src/preload/api/profile-api.tsapps/frontend/src/shared/types/profile.tsapps/frontend/src/main/services/profile/profile-service.tsapps/frontend/src/main/services/profile/index.ts
apps/frontend/src/shared/i18n/locales/**/*.json
📄 CodeRabbit inference engine (CLAUDE.md)
apps/frontend/src/shared/i18n/locales/**/*.json: Store translation strings in namespace-organized JSON files atapps/frontend/src/shared/i18n/locales/{lang}/*.jsonfor each supported language
When implementing new frontend features, add translation keys to all language files (minimum: en/.json and fr/.json)
Files:
apps/frontend/src/shared/i18n/locales/fr/settings.jsonapps/frontend/src/shared/i18n/locales/en/settings.json
apps/backend/.env*
📄 CodeRabbit inference engine (CLAUDE.md)
apps/backend/.env*: Enable Electron MCP for E2E testing by settingELECTRON_MCP_ENABLED=truein.envand starting the Electron app withnpm run dev
Configure memory system credentials inapps/backend/.envand validate withgraphiti_config.py
Files:
apps/backend/.env.example
apps/backend/**/*.py
📄 CodeRabbit inference engine (CLAUDE.md)
apps/backend/**/*.py: Always use the Claude Agent SDK (claude-agent-sdkpackage) for all AI interactions, never use the Anthropic API directly
Use thecreate_client()function fromapps/backend/core/client.pyto instantiate Claude SDK clients, not directClaudeSDKClientinitialization
Files:
apps/backend/core/auth.py
⚙️ CodeRabbit configuration file
apps/backend/**/*.py: Focus on Python best practices, type hints, and async patterns.
Check for proper error handling and security considerations.
Verify compatibility with Python 3.12+.
Files:
apps/backend/core/auth.py
apps/backend/core/**/*.py
📄 CodeRabbit inference engine (CLAUDE.md)
Implement dynamic command allowlisting based on detected project stack using
core/security.pyfor bash command validation
Files:
apps/backend/core/auth.py
🧠 Learnings (5)
📚 Learning: 2026-01-04T12:37:52.222Z
Learnt from: StillKnotKnown
Repo: AndyMik90/Auto-Claude PR: 648
File: apps/frontend/src/renderer/components/settings/ModelSearchableSelect.tsx:262-265
Timestamp: 2026-01-04T12:37:52.222Z
Learning: Dropdown components in apps/frontend/src/renderer/components/settings use a fixed max-height (e.g., max-h-60) with internal overflow-y-auto scrolling. This pattern is intentional and prevents dropdowns from extending beyond the viewport; do not add dynamic viewport positioning or clipping-prevention logic for these components. If you add new dropdowns in this area, follow the same fixed-height + internal-scroll approach for consistency.
Applied to files:
apps/frontend/src/renderer/components/settings/ProfileEditDialog.tsx
📚 Learning: 2026-01-04T23:59:45.209Z
Learnt from: MikeeBuilds
Repo: AndyMik90/Auto-Claude PR: 661
File: apps/frontend/src/renderer/components/onboarding/OllamaModelSelector.tsx:176-189
Timestamp: 2026-01-04T23:59:45.209Z
Learning: In the AndyMik90/Auto-Claude repository, pre-existing i18n issues (hardcoded user-facing strings) can be deferred for future i18n cleanup passes. Do not fix such issues in PRs that do not introduce new i18n violations, especially in frontend TSX components (e.g., apps/frontend/**/*.tsx). If a PR adds new i18n violations, address them in that PR.
Applied to files:
apps/frontend/src/renderer/components/settings/ProfileEditDialog.tsx
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/frontend/src/shared/i18n/locales/**/*.json : When implementing new frontend features, add translation keys to all language files (minimum: en/*.json and fr/*.json)
Applied to files:
apps/frontend/src/shared/i18n/locales/fr/settings.jsonapps/frontend/src/shared/i18n/locales/en/settings.json
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Use git worktrees for isolated agent builds with branches following the naming pattern `auto-claude/{spec-name}`
Applied to files:
apps/backend/.env.example
📚 Learning: 2025-12-30T16:38:36.314Z
Learnt from: CR
Repo: AndyMik90/Auto-Claude PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-30T16:38:36.314Z
Learning: Applies to apps/backend/**/*.py : Always use the Claude Agent SDK (`claude-agent-sdk` package) for all AI interactions, never use the Anthropic API directly
Applied to files:
apps/backend/core/auth.py
🧬 Code graph analysis (9)
apps/frontend/src/renderer/stores/settings-store.ts (1)
apps/frontend/src/shared/types/profile.ts (2)
APIProfileType(21-21)TestConnectionResult(80-84)
apps/frontend/src/main/services/profile/profile-manager.ts (2)
apps/frontend/src/main/services/profile/index.ts (1)
APIProfile(37-37)apps/frontend/src/shared/types/profile.ts (1)
APIProfile(27-43)
apps/frontend/src/shared/constants/api-profiles.ts (1)
apps/frontend/src/shared/types/profile.ts (1)
APIProfileType(21-21)
apps/frontend/src/renderer/components/settings/ProfileEditDialog.tsx (2)
apps/frontend/src/shared/types/profile.ts (1)
APIProfileType(21-21)apps/frontend/src/main/services/profile/profile-service.ts (1)
testConnection(379-570)
apps/frontend/src/main/ipc-handlers/profile-handlers.ts (3)
apps/frontend/src/shared/types/profile.ts (2)
APIProfileType(21-21)TestConnectionResult(80-84)apps/frontend/src/main/services/profile/index.ts (2)
TestConnectionResult(40-40)testFoundryConnection(29-29)apps/frontend/src/main/services/profile/profile-service.ts (1)
testFoundryConnection(586-710)
apps/frontend/src/shared/types/ipc.ts (1)
apps/frontend/src/shared/types/profile.ts (2)
APIProfileType(21-21)TestConnectionResult(80-84)
apps/frontend/src/preload/api/profile-api.ts (2)
apps/frontend/src/shared/types/profile.ts (1)
APIProfileType(21-21)apps/frontend/src/__mocks__/electron.ts (1)
ipcRenderer(53-61)
apps/frontend/src/shared/types/profile.ts (1)
apps/frontend/src/main/services/profile/index.ts (1)
APIProfile(37-37)
apps/frontend/src/main/services/profile/profile-service.ts (3)
apps/frontend/src/main/services/profile/index.ts (5)
validateBaseUrl(21-21)validateApiKey(22-22)APIProfile(37-37)testFoundryConnection(29-29)TestConnectionResult(40-40)apps/frontend/src/main/services/profile-service.ts (2)
validateBaseUrl(15-27)validateApiKey(33-52)apps/frontend/src/shared/types/profile.ts (2)
APIProfile(27-43)TestConnectionResult(80-84)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: CodeQL analysis (javascript-typescript)
- GitHub Check: CodeQL analysis (python)
- GitHub Check: Agent
- GitHub Check: CodeQL (javascript-typescript)
- GitHub Check: CodeQL (python)
🔇 Additional comments (29)
apps/frontend/src/main/agent/env-utils.ts (3)
6-23: LGTM! Clear and comprehensive documentation.The JSDoc updates accurately describe the dual-mode behavior (Anthropic + Foundry) and provide excellent rationale for the empty string approach. The explanation of why empty strings are used instead of undefined is particularly helpful for maintainability.
25-30: The logic is correct.getAPIProfileEnv()properly includesCLAUDE_CODE_USE_FOUNDRY: '1'when a Foundry profile is active, so the condition on line 26-27 will correctly detect Foundry profiles.
32-53: No verification needed—the Foundry variable implementation is consistent and correct.The code properly clears all Foundry variables (
CLAUDE_CODE_USE_FOUNDRY,ANTHROPIC_FOUNDRY_API_KEY,ANTHROPIC_FOUNDRY_BASE_URL,ANTHROPIC_FOUNDRY_RESOURCE) in OAuth mode, andgetAPIProfileEnv()correctly sets these same variables when a Foundry profile is active. The backend.env.exampleprovides complete documentation for all Foundry variables.Note: There is no
SDK_ENV_VARSlist to maintain—environment variables are passed directly to the Python subprocess.Likely an incorrect or invalid review comment.
apps/backend/core/auth.py (2)
29-39: LGTM: Foundry environment variables added correctly.The new Foundry-related environment variables are properly documented with inline comments and examples. The additions integrate well with the existing SDK_ENV_VARS structure.
157-163: Verify SDK support for "foundry-entra-id" placeholder with Entra ID authentication.The code returns
"foundry-entra-id"when Foundry mode is enabled without an API key, with a comment indicating the SDK should handle Entra ID auth. However:
No token format validation exists in the codebase — The original concern about SDK validating
sk-*prefix format is unsupported by code evidence. All usages ofget_auth_token()only check truthiness.SDK documentation lacks explicit confirmation — While the Claude SDK supports Microsoft Entra ID authentication via bearer tokens and token providers, the documentation does not explicitly confirm that it recognizes the
"foundry-entra-id"placeholder string or includes special handling for it.Risk remains unresolved — If the SDK expects a valid bearer token or API key format rather than a placeholder, this will cause silent auth failures or confusing error messages. The code design assumes the SDK handles this, but explicit verification of this behavior is needed.
Consider:
- Document whether the Claude Agent SDK recognizes this exact placeholder string
- Add comments confirming the SDK auth flow when this placeholder is returned
- Consider using environment-variable-based Entra ID detection instead of a placeholder, if the SDK supports it
apps/backend/.env.example (1)
42-42: The documentation linkhttps://code.claude.com/docs/en/microsoft-foundryis valid and accessible. It contains comprehensive Microsoft Foundry setup instructions.apps/frontend/src/shared/types/ipc.ts (1)
304-304: LGTM - IPC signature properly extended.The addition of optional
profileTypeandfoundryResourceparameters totestConnectionmaintains backward compatibility and follows the existing pattern for optional parameters.apps/frontend/src/main/services/profile/profile-manager.ts (1)
28-62: LGTM - Validation logic is well-structured.The updated validation properly checks required fields and the new optional
typeandfoundryResourcefields. The use of early returns improves readability.Note: This validation requires
apiKeyto be a string (line 39), which is consistent with the type definition but may conflict with the comment inprofile.tsstating that apiKey is "optional" for Foundry profiles. See the related comment onprofile.ts.apps/frontend/src/shared/constants/api-profiles.ts (2)
23-46: LGTM - Non-Foundry presets properly configured.The remaining presets (OpenRouter, Groq, GLM) are correctly assigned the
'anthropic'type with valid base URLs.
17-22: The emptybaseUrlfor theazure-foundrypreset is properly handled by validation.The UI already prevents saving or testing a Foundry profile without either a
baseUrlorfoundryResource. The form explicitly validates that at least one is provided (ProfileEditDialog.tsx lines 185, 259, 296), and the backend service enforces the same requirement (profile-service.ts lines 136-140). Additionally, thebaseUrlinput is disabled when afoundryResourceis provided, and users are guided through a dedicatedfoundryResourcefield with i18n-supported hints and placeholders.apps/frontend/src/main/services/profile/index.ts (1)
29-29: No action required. ThetestFoundryConnectionfunction is properly exported fromprofile-service.ts(line 586) and the barrel export inindex.tscorrectly re-exports it, following the established pattern for other service functions.apps/frontend/src/renderer/stores/settings-store.ts (2)
42-42: LGTM! Extended testConnection signature for Foundry support.The function signature properly includes optional
profileTypeandfoundryResourceparameters, maintaining backward compatibility with existing callers.
204-207: Correctly forwarding new parameters to IPC layer.The implementation properly propagates
profileTypeandfoundryResourceto thewindow.electronAPI.testConnectioncall, maintaining consistency with the updated interface.apps/frontend/src/preload/api/profile-api.ts (2)
34-40: Interface correctly extended for Foundry support.The
testConnectioninterface signature properly addsprofileTypeandfoundryResourceas optional parameters, maintaining backward compatibility.
106-113: IPC invocation correctly forwards new parameters.The implementation properly passes
profileTypeandfoundryResourceto the IPC channel after therequestId, aligning with the handler signature inprofile-handlers.ts.apps/frontend/src/main/services/profile/profile-service.ts (2)
128-151: Profile creation validation properly handles both profile types.The validation logic correctly:
- Requires
baseUrlfor Anthropic profiles- Allows either
foundryResourceORbaseUrlfor Foundry profiles- Makes API key optional for Foundry (Entra ID auth supported)
327-351: Environment variable mapping for Foundry profiles is well-structured.The Foundry configuration correctly sets:
CLAUDE_CODE_USE_FOUNDRY=1to enable Foundry modeANTHROPIC_FOUNDRY_RESOURCEwhen resource name is providedANTHROPIC_FOUNDRY_BASE_URLwhen using custom endpoint- Optional
ANTHROPIC_FOUNDRY_API_KEYfor API key authThe logic to prefer
foundryResourceoverbaseUrlis appropriate.apps/frontend/src/shared/i18n/locales/fr/settings.json (2)
65-68: French translations for Foundry profile types are complete.All required translation keys for the new Foundry feature are present and properly structured in the French locale file. Based on learnings, this follows the requirement to add translation keys to all language files.
75-77: Comprehensive Foundry field translations added.Fields, placeholders, hints, and validation messages for Foundry configuration are all present and appropriately translated to French.
Also applies to: 84-86, 91-93, 100-101
apps/frontend/src/main/ipc-handlers/profile-handlers.ts (2)
189-196: IPC handler signature correctly extended for Foundry support.The handler now accepts
profileTypeandfoundryResourceas optional parameters, enabling routing to the appropriate test function based on profile type.
210-239: Foundry test connection routing logic is well-implemented.The handler correctly:
- Defaults to 'anthropic' when
profileTypeis not specified (backward compatibility)- Validates that Foundry profiles have either
foundryResourceORbaseUrl- Calls
testFoundryConnectionwith appropriate parameters- Properly cleans up timeout and request tracking on all code paths
apps/frontend/src/shared/i18n/locales/en/settings.json (2)
65-68: English translations for profile types properly added.The
typessection clearly distinguishes between "Anthropic API" and "Microsoft Foundry (Azure AI)" for user selection.
91-93: Helpful hints for Foundry configuration.The hints provide clear guidance:
- Resource name format and resulting endpoint URL
- When to use custom endpoint vs resource name
- Entra ID authentication option explanation
apps/frontend/src/renderer/components/settings/ProfileEditDialog.tsx (6)
68-71: State management properly extended for Foundry support.New state variables
profileType,foundryResource, andfoundryEndpointErrorare correctly initialized with appropriate default values.Also applies to: 85-85
154-154: Verify useEffect dependency:profileprop not in dependency array.The comment at line 115 explains this is intentional to prevent race conditions when rapidly clicking edit on different profiles. However, this means if
profileprop changes while the dialog is already open, the form won't re-populate with the new profile data.This is likely the intended behavior based on the comment, but verify this matches the expected UX - if a user somehow triggers a profile prop change while the dialog is open, they would see stale data.
183-239: Validation logic correctly implements per-type requirements.The validation properly handles:
- Foundry: Either
foundryResourceORbaseUrlrequired; API key optional but validated if provided- Anthropic: Both
baseUrlandapiKeyrequiredError states are appropriately cleared/set for each path.
504-505: Good UX: Base URL input disabled when resource name is provided.The
disabled={!!foundryResource.trim()}correctly prevents editing the base URL when a resource name is entered, enforcing the "either/or" requirement and guiding users to the correct input.
323-343: Save payloads correctly include Foundry-specific fields.Both update and create paths properly:
- Include
type: profileTypein the payload- Conditionally include
foundryResourceonly for Foundry profiles- Clear
foundryResourcetoundefinedfor non-Foundry profiles during updatesAlso applies to: 357-365
517-519: The translation keycommon:optionalexists in bothen/common.jsonandfr/common.jsonfiles. No runtime error risk from this key reference.Likely an incorrect or invalid review comment.
| # Prerequisites: | ||
| # 1. Deploy Claude models in Azure AI Foundry portal | ||
| # 2. Get your resource name and API key from "Endpoints and keys" section | ||
| # 3. Configure Claude Code CLI first: claude config set --global provider azure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# First, let's examine the .env.example file to understand the context around line 47
cd apps/backend && cat -n .env.example | sed -n '40,55p'Repository: AndyMik90/Auto-Claude
Length of output: 871
🌐 Web query:
Claude CLI config set global provider azure command documentation
💡 Result:
Short answer: Claude CLI uses claude config set -g <key> <value> for global settings, but Anthropic’s official docs list supported providers as Anthropic API, Amazon Bedrock, and Google Vertex AI — there is no documented global provider value of azure (Azure / Foundry is not shown as a supported provider in the Claude Code docs). (docs.anthropic.com)
Example global command (from docs):
- claude config set -g (e.g.,
claude config set -g autoUpdaterStatus disabled). (docs.anthropic.com)
If you need to integrate Claude with Azure (Foundry), that typically requires using Azure-specific endpoints/SDKs rather than a simple provider=azure in Claude CLI — see the deployment/provider overview for guidance. (docs.anthropic.com)
Citations:
- 1: https://docs.anthropic.com/en/docs/claude-code/settings?utm_source=openai
- 2: https://docs.anthropic.com/en/docs/claude-code/settings?utm_source=openai
- 3: https://docs.anthropic.com/it/docs/claude-code/third-party-integrations?utm_source=openai
The Claude CLI command claude config set --global provider azure is not documented as a valid configuration option.
According to Anthropic's official Claude Code documentation, the supported providers are Anthropic API, Amazon Bedrock, and Google Vertex AI—Azure is not listed as a configurable provider via the CLI. Azure/Foundry integration requires environment-based configuration (e.g., ANTHROPIC_FOUNDRY_API_KEY and endpoint settings) rather than a CLI provider command. Remove this instruction or replace it with the correct environment variable setup for Foundry integration.
🤖 Prompt for AI Agents
In @apps/backend/.env.example at line 47, The comment instructing users to run
"claude config set --global provider azure" is incorrect; remove that CLI
instruction and replace it with guidance to configure Anthropic Foundry via
environment variables instead, e.g., set ANTHROPIC_FOUNDRY_API_KEY (the Foundry
API key) and the Foundry endpoint variable (e.g., ANTHROPIC_FOUNDRY_API_BASE or
ANTHROPIC_FOUNDRY_API_BASE_URL) with the appropriate URL, and mention any other
required env vars for Foundry integration.
| const controller = signal ? undefined : new AbortController(); | ||
| const timeoutId = controller ? setTimeout(() => controller.abort(), 10000) : undefined; | ||
|
|
||
| // Try to reach the base endpoint - any response (even 404/401) means it's reachable | ||
| const response = await fetch(endpointUrl, { | ||
| method: 'HEAD', | ||
| headers, | ||
| signal: signal ?? controller?.signal | ||
| }); | ||
|
|
||
| if (timeoutId) clearTimeout(timeoutId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential resource leak: AbortController timeout not cleared on external signal abort.
When an external signal is provided, a new AbortController is not created (controller is undefined), so timeoutId is also undefined. However, if signal is not provided, the internal controller with timeout is used. If the fetch completes before timeout, clearTimeout(timeoutId) is called correctly.
But there's a subtle issue: if signal is provided and fetch throws an error, the code path doesn't need cleanup since no internal timeout was set. This is actually correct behavior.
However, if signal is NOT provided and the fetch succeeds with any HTTP status (200-599), the timeout is cleared at line 659. But if fetch throws before line 659 (e.g., network error), the catch block doesn't clear the timeout for the internal controller case.
🐛 Proposed fix: Ensure timeout is cleared in catch block
} catch (error) {
+ // Clear timeout if we created an internal controller
+ if (timeoutId) clearTimeout(timeoutId);
+
// Handle fetch errors
if (error instanceof Error) {
if (error.name === 'AbortError') {Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In @apps/frontend/src/main/services/profile/profile-service.ts around lines 649
- 659, The catch path can leak the internal timeout when controller is created:
ensure that when using the internally created AbortController (variable
controller) you always clear the timeoutId in the error path after a thrown
fetch; update the function surrounding the fetch call (referencing endpointUrl,
fetch, signal, controller, timeoutId) to call clearTimeout(timeoutId) in the
catch/finally path (or use a single finally block) so timeoutId is cleared
whether fetch resolves or throws.
| if (response.status >= 200 && response.status < 600) { | ||
| // Endpoint is reachable | ||
| if (apiKey && apiKey.trim() !== '') { | ||
| return { | ||
| success: true, | ||
| message: 'Azure endpoint is reachable. API key configured.' | ||
| }; | ||
| } else { | ||
| return { | ||
| success: true, | ||
| message: 'Azure endpoint is reachable. Using Entra ID authentication (az login).' | ||
| }; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Unreachable success return after status check.
The condition response.status >= 200 && response.status < 600 covers all HTTP responses (2xx, 3xx, 4xx, 5xx), so the success return at lines 678-681 is unreachable. This is a minor code clarity issue.
♻️ Suggested simplification
// Any HTTP response means the endpoint is reachable
- // The actual API authentication will be handled by the Claude SDK
- if (response.status >= 200 && response.status < 600) {
- // Endpoint is reachable
- if (apiKey && apiKey.trim() !== '') {
- return {
- success: true,
- message: 'Azure endpoint is reachable. API key configured.'
- };
- } else {
- return {
- success: true,
- message: 'Azure endpoint is reachable. Using Entra ID authentication (az login).'
- };
- }
+ // Endpoint is reachable - actual API authentication will be handled by the Claude SDK
+ if (apiKey && apiKey.trim() !== '') {
+ return {
+ success: true,
+ message: 'Azure endpoint is reachable. API key configured.'
+ };
+ } else {
+ return {
+ success: true,
+ message: 'Azure endpoint is reachable. Using Entra ID authentication (az login).'
+ };
}
-
- return {
- success: true,
- message: 'Azure endpoint is reachable.'
- };🤖 Prompt for AI Agents
In @apps/frontend/src/main/services/profile/profile-service.ts around lines 663
- 676, The condition checking response.status >= 200 && response.status < 600
treats any HTTP status (2xx–5xx) as "success", making the success returns
unreachable/incorrect; update the logic in the profile-service.ts check that
inspects response.status so that "success" uses a true success range (e.g.,
response.status >= 200 && response.status < 300) and, if you need to assert
endpoint reachability irrespective of success, add a separate branch for
response.status < 600 to return a reachable-but-failed status; adjust the
returns that reference apiKey and the Entra ID message accordingly so they only
occur in the true-success branch while keeping a distinct message/return for
reachable non-success responses.
| type?: APIProfileType; // Profile type - defaults to 'anthropic' for backward compat | ||
| baseUrl: string; // For anthropic: API endpoint; For foundry: ANTHROPIC_FOUNDRY_BASE_URL | ||
| apiKey: string; // For anthropic: ANTHROPIC_AUTH_TOKEN; For foundry: optional (Entra ID auth) | ||
| foundryResource?: string; // For foundry only: Azure resource name (alternative to baseUrl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# First, let's understand the file structure
fd -t f -name "*profile*" apps/frontend/src --type f | head -20Repository: AndyMik90/Auto-Claude
Length of output: 295
🏁 Script executed:
# Search for apiKey validation and Foundry-related code
rg -n "apiKey" apps/frontend/src --type ts --type tsx -B 2 -A 2 | grep -E "(foundry|Foundry|apiKey)" | head -40Repository: AndyMik90/Auto-Claude
Length of output: 92
🏁 Script executed:
# Look for test-connection logic
rg -n "testConnection|test.*connection" apps/frontend/src --type ts --type tsx -A 5 | head -50Repository: AndyMik90/Auto-Claude
Length of output: 92
🏁 Script executed:
# Check how Foundry profiles validate or handle empty apiKey
rg -n "foundry|Foundry" apps/frontend/src/shared/types/ --type ts -B 2 -A 2Repository: AndyMik90/Auto-Claude
Length of output: 3066
🏁 Script executed:
# Look for Entra ID auth related code
rg -n "entra|Entra|ENTRA" apps/frontend/src --type ts --type tsx -i -B 2 -A 2Repository: AndyMik90/Auto-Claude
Length of output: 92
🏁 Script executed:
# Check the profile.ts file itself to see the full context
cat -n apps/frontend/src/shared/types/profile.tsRepository: AndyMik90/Auto-Claude
Length of output: 4310
🏁 Script executed:
# Look for validation logic in profile-related services
find apps/frontend/src -name "*.ts" -type f | xargs grep -l "apiKey" | head -10Repository: AndyMik90/Auto-Claude
Length of output: 607
🏁 Script executed:
# Search for testConnection implementation and how it handles foundry
find apps/frontend/src -name "*.ts" -type f | xargs grep -l "testConnection" | head -10Repository: AndyMik90/Auto-Claude
Length of output: 579
🏁 Script executed:
# Check the profile service in libs to see actual implementation
find libs -name "*.ts" -type f 2>/dev/null | head -20Repository: AndyMik90/Auto-Claude
Length of output: 47
🏁 Script executed:
# Look for validation of apiKey specifically
rg "apiKey.*=|validate.*apiKey|apiKey.*empty|apiKey.*null" apps/frontend/src -B 3 -A 3Repository: AndyMik90/Auto-Claude
Length of output: 50379
🏁 Script executed:
# Search for Entra ID auth handling
rg -i "entra|azure.*auth|aad" apps/frontend/src -B 2 -A 2Repository: AndyMik90/Auto-Claude
Length of output: 24220
🏁 Script executed:
# Look for where testConnection is actually called and how it handles foundry
rg "testConnection" apps/frontend/src -B 5 -A 5Repository: AndyMik90/Auto-Claude
Length of output: 50377
Update the type definition to clarify apiKey optionality for Foundry profiles.
The type currently requires apiKey: string unconditionally, but the implementation and UI correctly allow empty apiKey for Foundry profiles using Entra ID authentication. Either:
- Change the type to
apiKey: stringbut update the comment to clarify: "May be empty string for Foundry with Entra ID auth" - Or change to
apiKey?: stringto properly reflect it's optional, but this may require stricter null checks downstream
The runtime behavior is correct—empty apiKey is properly handled for Foundry profiles—but the type signature should reflect this to prevent developer confusion.
🤖 Prompt for AI Agents
In @apps/frontend/src/shared/types/profile.ts around lines 30 - 33, The profile
type currently declares apiKey: string but Foundry profiles can use Entra ID
with no apiKey; change the field to optional (apiKey?: string) in the profile
type declaration (near APIProfileType and the profile interface in profile.ts)
and update any downstream consumers to handle undefined/'' cases (add
null/undefined guards where code assumes a non-empty apiKey). If you prefer to
keep it required, instead update the apiKey comment to explicitly state "May be
empty string for Foundry with Entra ID auth" and add type guards in places that
rely on presence; prefer making it optional to match runtime behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds Microsoft Foundry (Azure AI) support as an alternative authentication method for API Profiles, enabling users to configure Azure-hosted Claude models through the Settings UI with support for both API key and Entra ID authentication.
Key Changes:
- Added 'foundry' profile type alongside existing 'anthropic' type with dedicated validation and test connection logic
- Implemented UI for Foundry-specific fields (Azure Resource Name, Endpoint URL, optional API Key)
- Extended backend to handle Foundry environment variables and authentication placeholder for Entra ID
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| package-lock.json | Extensive peer dependency flag changes (appears unrelated to feature) |
| apps/frontend/src/shared/types/profile.ts | Added APIProfileType and foundryResource field to profile types |
| apps/frontend/src/shared/types/ipc.ts | Extended testConnection IPC signature with profileType and foundryResource |
| apps/frontend/src/shared/i18n/locales/en/settings.json | Added English translations for Foundry profile fields and validation |
| apps/frontend/src/shared/i18n/locales/fr/settings.json | Added French translations for Foundry profile fields and validation |
| apps/frontend/src/shared/constants/api-profiles.ts | Added Azure Foundry preset with type='foundry' |
| apps/frontend/src/renderer/stores/settings-store.ts | Updated testConnection call signature to include new parameters |
| apps/frontend/src/renderer/components/settings/ProfileEditDialog.tsx | Added conditional UI for Foundry vs Anthropic profiles with type selector |
| apps/frontend/src/preload/api/profile-api.ts | Extended testConnection API with profileType and foundryResource params |
| apps/frontend/src/main/services/profile/profile-service.ts | Added testFoundryConnection function and conditional validation logic |
| apps/frontend/src/main/services/profile/profile-manager.ts | Updated validation to support optional type and foundryResource fields |
| apps/frontend/src/main/services/profile/index.ts | Exported testFoundryConnection function |
| apps/frontend/src/main/ipc-handlers/profile-handlers.ts | Added routing logic to call appropriate test function based on profile type |
| apps/frontend/src/main/agent/env-utils.ts | Extended OAuth clear vars to include Foundry environment variables |
| apps/backend/core/auth.py | Added Foundry mode detection with placeholder token for Entra ID auth |
| apps/backend/.env.example | Documented Microsoft Foundry configuration with setup instructions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (response.status >= 200 && response.status < 600) { | ||
| // Endpoint is reachable | ||
| if (apiKey && apiKey.trim() !== '') { | ||
| return { | ||
| success: true, | ||
| message: 'Azure endpoint is reachable. API key configured.' | ||
| }; | ||
| } else { | ||
| return { | ||
| success: true, | ||
| message: 'Azure endpoint is reachable. Using Entra ID authentication (az login).' | ||
| }; | ||
| } | ||
| } | ||
|
|
||
| return { | ||
| success: true, | ||
| message: 'Azure endpoint is reachable.' | ||
| }; |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition "response.status >= 200 && response.status < 600" on line 663 will always be true for any HTTP response, making the code on lines 678-681 unreachable. HTTP status codes are always in the range 100-599, so any response will match the first condition. Consider either:
- Removing the unreachable code block (lines 678-681)
- Adjusting the condition on line 663 to be more specific (e.g., checking for specific success status codes)
- Using the unreachable block as the default case and making the condition more restrictive
| if (response.status >= 200 && response.status < 600) { | |
| // Endpoint is reachable | |
| if (apiKey && apiKey.trim() !== '') { | |
| return { | |
| success: true, | |
| message: 'Azure endpoint is reachable. API key configured.' | |
| }; | |
| } else { | |
| return { | |
| success: true, | |
| message: 'Azure endpoint is reachable. Using Entra ID authentication (az login).' | |
| }; | |
| } | |
| } | |
| return { | |
| success: true, | |
| message: 'Azure endpoint is reachable.' | |
| }; | |
| // Endpoint is reachable | |
| if (apiKey && apiKey.trim() !== '') { | |
| return { | |
| success: true, | |
| message: 'Azure endpoint is reachable. API key configured.' | |
| }; | |
| } else { | |
| return { | |
| success: true, | |
| message: 'Azure endpoint is reachable. Using Entra ID authentication (az login).' | |
| }; | |
| } |
| ref={baseUrlInputRef} | ||
| onChange={(e) => setBaseUrl(e.target.value)} | ||
| className={urlError ? 'border-destructive' : ''} | ||
| disabled={!!foundryResource.trim()} |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a user enters a foundry resource name, the baseUrl input field is disabled. This prevents users from switching back to using a custom endpoint URL without first clearing the resource name field. This could be confusing UX. Consider either:
- Allowing both fields to be editable simultaneously and validating that at least one is filled
- Adding a clear visual indicator or button to help users understand they need to clear the resource name to use a custom URL
- Adding a radio button or toggle to explicitly choose between "Resource Name" and "Custom URL" modes
| if (foundryResource && foundryResource.trim() !== '') { | ||
| // Construct URL from resource name - Azure AI Foundry format | ||
| endpointUrl = `https://${foundryResource.trim()}.services.ai.azure.com`; |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The foundryResource validation doesn't check for invalid characters or format. Resource names in Azure typically have restrictions (e.g., alphanumeric and hyphens only, specific length limits). Currently, any non-empty string is accepted, which could lead to constructing invalid URLs like "https://my resource name!.services.ai.azure.com". Consider adding validation to ensure the resource name contains only valid characters (e.g., lowercase letters, numbers, and hyphens) and meets Azure naming conventions.
| envVars = { | ||
| CLAUDE_CODE_USE_FOUNDRY: '1', | ||
| // Use foundryResource if provided, otherwise use baseUrl for ANTHROPIC_FOUNDRY_BASE_URL | ||
| ANTHROPIC_FOUNDRY_RESOURCE: profile.foundryResource || '', | ||
| ANTHROPIC_FOUNDRY_BASE_URL: profile.foundryResource ? '' : (profile.baseUrl || ''), |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When both foundryResource and baseUrl are provided, the code prioritizes foundryResource and sets ANTHROPIC_FOUNDRY_BASE_URL to an empty string. However, there's no validation or warning in the UI or backend to inform users about this behavior. Users might be confused if they provide both values and the baseUrl is silently ignored. Consider adding a validation warning or documenting this behavior more clearly in the UI hints.
| envVars = { | |
| CLAUDE_CODE_USE_FOUNDRY: '1', | |
| // Use foundryResource if provided, otherwise use baseUrl for ANTHROPIC_FOUNDRY_BASE_URL | |
| ANTHROPIC_FOUNDRY_RESOURCE: profile.foundryResource || '', | |
| ANTHROPIC_FOUNDRY_BASE_URL: profile.foundryResource ? '' : (profile.baseUrl || ''), | |
| const hasFoundryResource = !!profile.foundryResource?.trim(); | |
| const hasBaseUrl = !!profile.baseUrl?.trim(); | |
| if (hasFoundryResource && hasBaseUrl) { | |
| console.warn( | |
| '[getAPIProfileEnv] Foundry profile has both foundryResource and baseUrl configured; ' + | |
| 'foundryResource will take precedence and ANTHROPIC_FOUNDRY_BASE_URL will be unset.' | |
| ); | |
| } | |
| envVars = { | |
| CLAUDE_CODE_USE_FOUNDRY: '1', | |
| // Use foundryResource if provided, otherwise use baseUrl for ANTHROPIC_FOUNDRY_BASE_URL | |
| ANTHROPIC_FOUNDRY_RESOURCE: hasFoundryResource ? profile.foundryResource! : '', | |
| ANTHROPIC_FOUNDRY_BASE_URL: hasFoundryResource ? '' : (profile.baseUrl || ''), |
| } | ||
| // For foundry, API key is optional (Entra ID auth supported) |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Foundry profiles, the validation checks if apiKey format is valid when provided, but doesn't validate if the apiKey is empty for profiles that might actually need it. While Entra ID auth is supported, users might intend to use API key auth but accidentally leave it empty. Consider adding a user-friendly warning or better documentation in the UI to help users understand when the API key is truly optional vs when it's likely a mistake.
| } | |
| // For foundry, API key is optional (Entra ID auth supported) | |
| } else if (profileType === 'foundry') { | |
| // For foundry, API key is optional (Entra ID auth supported), but if provided it must be non-empty and valid | |
| const hasApiKeyField = typeof input.apiKey === 'string'; | |
| const trimmedApiKey = hasApiKeyField ? input.apiKey.trim() : ''; | |
| if (hasApiKeyField && trimmedApiKey === '') { | |
| // Helps users understand that an empty API key is likely a mistake: | |
| // either provide a real API key, or omit the field entirely to use Entra ID authentication. | |
| throw new Error('API key is empty. Either provide a valid API key or leave the field blank to use Entra ID authentication.'); | |
| } | |
| if (trimmedApiKey !== '' && !validateApiKey(trimmedApiKey)) { | |
| throw new Error('Invalid API key'); | |
| } | |
| } |
| # Check for Microsoft Foundry mode first | ||
| if os.environ.get("CLAUDE_CODE_USE_FOUNDRY") == "1": | ||
| foundry_key = os.environ.get("ANTHROPIC_FOUNDRY_API_KEY") | ||
| if foundry_key: | ||
| return foundry_key | ||
| # Foundry mode without API key = Entra ID auth (handled by SDK) | ||
| # Return a placeholder to indicate auth is configured | ||
| return "foundry-entra-id" |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The placeholder token "foundry-entra-id" returned for Foundry mode without an API key may cause issues with authentication validation. This placeholder will be treated as a valid token by require_auth_token() and other authentication checks, but it's not a real authentication credential. Consider either:
- Returning None when no API key is provided and letting the Claude SDK handle Entra ID authentication
- Using a more distinctive marker that can be explicitly checked elsewhere in the code (e.g., a constant like FOUNDRY_ENTRA_ID_MARKER)
- Documenting clearly that this is a placeholder for Entra ID auth and any code that validates tokens should handle this case
The current implementation could lead to unexpected behavior if other parts of the system assume all non-None tokens are valid authentication strings.
| export async function testFoundryConnection( | ||
| baseUrl: string, | ||
| apiKey: string, | ||
| foundryResource: string, | ||
| signal?: AbortSignal | ||
| ): Promise<TestConnectionResult> { | ||
| // Determine the endpoint URL | ||
| let endpointUrl: string; | ||
|
|
||
| if (foundryResource && foundryResource.trim() !== '') { | ||
| // Construct URL from resource name - Azure AI Foundry format | ||
| endpointUrl = `https://${foundryResource.trim()}.services.ai.azure.com`; | ||
| } else if (baseUrl && baseUrl.trim() !== '') { | ||
| // Use provided base URL | ||
| let normalizedUrl = baseUrl.trim(); | ||
|
|
||
| // Ensure https:// prefix (auto-prepend if NO protocol exists) | ||
| if (!normalizedUrl.includes('://')) { | ||
| normalizedUrl = `https://${normalizedUrl}`; | ||
| } | ||
|
|
||
| // Remove trailing slash | ||
| normalizedUrl = normalizedUrl.replace(/\/+$/, ''); | ||
|
|
||
| // Validate the normalized baseUrl | ||
| if (!validateBaseUrl(normalizedUrl)) { | ||
| return { | ||
| success: false, | ||
| errorType: 'endpoint', | ||
| message: 'Invalid endpoint. Please check the Azure Endpoint URL.' | ||
| }; | ||
| } | ||
|
|
||
| endpointUrl = normalizedUrl; | ||
| } else { | ||
| return { | ||
| success: false, | ||
| errorType: 'endpoint', | ||
| message: 'Either Azure Resource Name or Endpoint URL is required.' | ||
| }; | ||
| } | ||
|
|
||
| // Check if signal already aborted | ||
| if (signal?.aborted) { | ||
| return { | ||
| success: false, | ||
| errorType: 'timeout', | ||
| message: 'Connection timeout. The endpoint did not respond.' | ||
| }; | ||
| } | ||
|
|
||
| try { | ||
| // For Foundry, we just do a basic connectivity check to the Azure endpoint | ||
| // The actual API path is constructed by the Claude SDK internally | ||
| const headers: Record<string, string> = {}; | ||
|
|
||
| // Add API key if provided (Azure uses different auth headers) | ||
| if (apiKey && apiKey.trim() !== '') { | ||
| headers['api-key'] = apiKey.trim(); | ||
| } | ||
|
|
||
| // Simple HEAD request to verify endpoint is reachable | ||
| // We don't test the actual API because the path structure is SDK-specific | ||
| const controller = signal ? undefined : new AbortController(); | ||
| const timeoutId = controller ? setTimeout(() => controller.abort(), 10000) : undefined; | ||
|
|
||
| // Try to reach the base endpoint - any response (even 404/401) means it's reachable | ||
| const response = await fetch(endpointUrl, { | ||
| method: 'HEAD', | ||
| headers, | ||
| signal: signal ?? controller?.signal | ||
| }); | ||
|
|
||
| if (timeoutId) clearTimeout(timeoutId); | ||
|
|
||
| // Any HTTP response means the endpoint is reachable | ||
| // The actual API authentication will be handled by the Claude SDK | ||
| if (response.status >= 200 && response.status < 600) { | ||
| // Endpoint is reachable | ||
| if (apiKey && apiKey.trim() !== '') { | ||
| return { | ||
| success: true, | ||
| message: 'Azure endpoint is reachable. API key configured.' | ||
| }; | ||
| } else { | ||
| return { | ||
| success: true, | ||
| message: 'Azure endpoint is reachable. Using Entra ID authentication (az login).' | ||
| }; | ||
| } | ||
| } | ||
|
|
||
| return { | ||
| success: true, | ||
| message: 'Azure endpoint is reachable.' | ||
| }; | ||
| } catch (error) { | ||
| // Handle fetch errors | ||
| if (error instanceof Error) { | ||
| if (error.name === 'AbortError') { | ||
| return { | ||
| success: false, | ||
| errorType: 'timeout', | ||
| message: 'Connection timeout. The endpoint did not respond.' | ||
| }; | ||
| } | ||
|
|
||
| // Network error - endpoint not reachable | ||
| if (error.message.includes('fetch') || error.message.includes('network') || | ||
| error.message.includes('ENOTFOUND') || error.message.includes('ECONNREFUSED')) { | ||
| return { | ||
| success: false, | ||
| errorType: 'network', | ||
| message: `Cannot reach Azure endpoint. Please verify the resource name "${foundryResource || 'N/A'}" is correct.` | ||
| }; | ||
| } | ||
| } | ||
|
|
||
| return { | ||
| success: false, | ||
| errorType: 'unknown', | ||
| message: 'Connection test failed. Please verify your Azure resource configuration.' | ||
| }; | ||
| } | ||
| } |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new Foundry profile type and testFoundryConnection function lack test coverage. The existing test suite in profile-service.test.ts doesn't include tests for:
- Creating profiles with type='foundry'
- Validating Foundry-specific fields (foundryResource)
- Testing the testFoundryConnection function
- Validating the behavior when both foundryResource and baseUrl are provided
- Testing getAPIProfileEnv() with Foundry profiles
Consider adding comprehensive test coverage for the new Foundry functionality to match the coverage level of the existing Anthropic profile tests.
| # Prerequisites: | ||
| # 1. Deploy Claude models in Azure AI Foundry portal | ||
| # 2. Get your resource name and API key from "Endpoints and keys" section | ||
| # 3. Configure Claude Code CLI first: claude config set --global provider azure |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation states "Configure Claude Code CLI first: claude config set --global provider azure" as a prerequisite, but this step may not be necessary for the API Profiles feature since the environment variables are managed by the profile system. This could confuse users who are using the UI-based API Profiles feature. Consider clarifying whether this CLI configuration is required when using API Profiles, or if it's only needed for direct Claude Code CLI usage.
| # 3. Configure Claude Code CLI first: claude config set --global provider azure | |
| # 3. (CLI only) If you are using the Claude Code CLI directly, run: | |
| # claude config set --global provider azure | |
| # This step is NOT required when using UI-based API Profiles, which manage | |
| # environment variables for you. |
- Update env-utils tests to include 4 new Foundry vars in expected clear list - Update ProfileEditDialog tests to expect profileType and foundryResource params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @apps/frontend/src/renderer/components/settings/ProfileEditDialog.test.tsx:
- Around line 699-702: Add unit tests for the new Foundry profile behavior in
ProfileEditDialog to cover the missing test cases: create a describe block for
"ProfileEditDialog - Foundry Profile Type" and implement tests that (1) render
ProfileEditDialog, set profileType to 'foundry', and assert foundryResource and
foundryBaseUrl fields are visible, (2) mock testConnection and verify it is
called with profileType='foundry' and the entered foundryResource value, (3)
validate that attempting to run testConnection without a foundryResource shows
validation errors and prevents the call, (4) toggle profileType between
'anthropic' and 'foundry' and assert the correct field sets are shown/hidden,
and (5) verify defaults/clearing behavior when switching types (e.g., anthorpic
fields preserved/cleared as expected); reference ProfileEditDialog component,
testConnection mock, foundryResource, foundryBaseUrl, and profileType when
locating where to add these tests.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
apps/frontend/src/main/agent/env-utils.test.tsapps/frontend/src/renderer/components/settings/ProfileEditDialog.test.tsx
🧰 Additional context used
📓 Path-based instructions (3)
apps/frontend/src/**/*.{ts,tsx,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Always use i18n translation keys for all user-facing text in the frontend instead of hardcoded strings
Files:
apps/frontend/src/renderer/components/settings/ProfileEditDialog.test.tsxapps/frontend/src/main/agent/env-utils.test.ts
apps/frontend/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use
useTranslation()hook with namespace prefixes (e.g., 'navigation:items.key') for accessing translation strings in React components
Files:
apps/frontend/src/renderer/components/settings/ProfileEditDialog.test.tsxapps/frontend/src/main/agent/env-utils.test.ts
apps/frontend/**/*.{ts,tsx}
⚙️ CodeRabbit configuration file
apps/frontend/**/*.{ts,tsx}: Review React patterns and TypeScript type safety.
Check for proper state management and component composition.
Files:
apps/frontend/src/renderer/components/settings/ProfileEditDialog.test.tsxapps/frontend/src/main/agent/env-utils.test.ts
🧠 Learnings (2)
📚 Learning: 2026-01-04T12:37:52.222Z
Learnt from: StillKnotKnown
Repo: AndyMik90/Auto-Claude PR: 648
File: apps/frontend/src/renderer/components/settings/ModelSearchableSelect.tsx:262-265
Timestamp: 2026-01-04T12:37:52.222Z
Learning: Dropdown components in apps/frontend/src/renderer/components/settings use a fixed max-height (e.g., max-h-60) with internal overflow-y-auto scrolling. This pattern is intentional and prevents dropdowns from extending beyond the viewport; do not add dynamic viewport positioning or clipping-prevention logic for these components. If you add new dropdowns in this area, follow the same fixed-height + internal-scroll approach for consistency.
Applied to files:
apps/frontend/src/renderer/components/settings/ProfileEditDialog.test.tsx
📚 Learning: 2026-01-04T23:59:45.209Z
Learnt from: MikeeBuilds
Repo: AndyMik90/Auto-Claude PR: 661
File: apps/frontend/src/renderer/components/onboarding/OllamaModelSelector.tsx:176-189
Timestamp: 2026-01-04T23:59:45.209Z
Learning: In the AndyMik90/Auto-Claude repository, pre-existing i18n issues (hardcoded user-facing strings) can be deferred for future i18n cleanup passes. Do not fix such issues in PRs that do not introduce new i18n violations, especially in frontend TSX components (e.g., apps/frontend/**/*.tsx). If a PR adds new i18n violations, address them in that PR.
Applied to files:
apps/frontend/src/renderer/components/settings/ProfileEditDialog.test.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: CodeQL (javascript-typescript)
- GitHub Check: CodeQL (python)
🔇 Additional comments (4)
apps/frontend/src/renderer/components/settings/ProfileEditDialog.test.tsx (1)
517-520: LGTM! Test expectations correctly updated for anthropic profiles.The additional parameters (AbortSignal, profileType='anthropic', foundryResource='') properly reflect the expanded testConnection signature introduced to support dual profile types.
apps/frontend/src/main/agent/env-utils.test.ts (3)
31-47: Assertions properly extended to verify Foundry variable clearing.The test description and individual assertions correctly validate that all Foundry environment variables are cleared in OAuth mode, maintaining consistency with the existing Anthropic variable assertions.
123-138: Consistent object shape verification correctly updated.The expected keys array now includes all 11 environment variables (increased from 7), with explicit listing that makes the test self-documenting. The use of
.sort()ensures order-independent comparison.
14-28: Test expectations correctly updated for Foundry support.The test expects 11 environment variables to be cleared in OAuth mode (7 standard Anthropic + 4 Foundry variables). The implementation in
env-utils.tsconfirms all Foundry variables (CLAUDE_CODE_USE_FOUNDRY,ANTHROPIC_FOUNDRY_API_KEY,ANTHROPIC_FOUNDRY_BASE_URL,ANTHROPIC_FOUNDRY_RESOURCE) are properly included in the clearing logic and match the test expectations exactly. The added comments improve readability by distinguishing between variable groups.
| expect.any(AbortSignal), | ||
| 'anthropic', // profileType (default) | ||
| '' // foundryResource (empty for anthropic profiles) | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Test expectations updated correctly, but Foundry test coverage is missing.
The parameter additions properly align with the expanded testConnection signature. However, the PR introduces significant Foundry-specific functionality (profile type selector, Foundry resource field, Foundry endpoint URL, Foundry-specific test connection) with no test coverage.
Consider adding test coverage for the new Foundry profile type:
📋 Suggested Foundry test scenarios
describe('ProfileEditDialog - Foundry Profile Type', () => {
it('should show Foundry-specific fields when profile type is foundry', () => {
// Test that foundryResource and foundryBaseUrl fields appear
});
it('should pass foundryResource to testConnection for foundry profiles', () => {
// Verify testConnection receives profileType='foundry' and the resource value
});
it('should validate required Foundry fields before testing connection', () => {
// Ensure foundryResource is required for foundry type
});
it('should switch between Anthropic and Foundry field sets when type changes', () => {
// Test profile type selector behavior
});
it('should apply correct defaults when switching profile types', () => {
// Verify field clearing/defaulting on type change
});
});Do you want me to generate complete test implementations for the Foundry functionality?
🤖 Prompt for AI Agents
In @apps/frontend/src/renderer/components/settings/ProfileEditDialog.test.tsx
around lines 699 - 702, Add unit tests for the new Foundry profile behavior in
ProfileEditDialog to cover the missing test cases: create a describe block for
"ProfileEditDialog - Foundry Profile Type" and implement tests that (1) render
ProfileEditDialog, set profileType to 'foundry', and assert foundryResource and
foundryBaseUrl fields are visible, (2) mock testConnection and verify it is
called with profileType='foundry' and the entered foundryResource value, (3)
validate that attempting to run testConnection without a foundryResource shows
validation errors and prevents the call, (4) toggle profileType between
'anthropic' and 'foundry' and assert the correct field sets are shown/hidden,
and (5) verify defaults/clearing behavior when switching types (e.g., anthorpic
fields preserved/cleared as expected); reference ProfileEditDialog component,
testConnection mock, foundryResource, foundryBaseUrl, and profileType when
locating where to add these tests.
) * feat: Add Sentry environment variables to build process in CI workflows - Integrated SENTRY_DSN, SENTRY_TRACES_SAMPLE_RATE, and SENTRY_PROFILES_SAMPLE_RATE as environment variables in the build steps of both beta-release.yml and release.yml workflows. - This enhancement ensures that Sentry monitoring is properly configured during application builds across different platforms (macOS, Windows, Linux). This change improves error tracking and performance monitoring capabilities for the application. * ci(release): add Azure Trusted Signing for Windows builds Integrate Azure Trusted Signing to sign Windows executables during release and beta-release workflows. This removes SmartScreen warnings for users downloading Auto-Claude on Windows. - Add OIDC authentication with Azure (no client secret needed) - Sign .exe files after packaging using azure/trusted-signing-action - Use North Europe endpoint (neu.codesigning.azure.net) - Conditionally skip signing if Azure credentials not configured Required GitHub secrets: AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_SUBSCRIPTION_ID, AZURE_SIGNING_ACCOUNT, AZURE_CERTIFICATE_PROFILE * fix(ci): move AZURE_CLIENT_ID to job-level env for condition evaluation - Move AZURE_CLIENT_ID from step-level to job-level env block so it's available when GitHub Actions evaluates step-level `if:` conditions - Update azure/trusted-signing-action from v0.5.1 to v0.5.11 - Remove redundant step-level env blocks Fixes conditional checks that were always evaluating to false because step-level env vars aren't processed until after if conditions are evaluated. Co-authored-by: CodeRabbit <[email protected]> Co-authored-by: Cursor Bot <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(ci): use base64 encoding for SHA512 checksums in latest.yml - Use System.Security.Cryptography.SHA512 to compute hash bytes - Convert hash to base64 (electron-builder expected format) instead of hex - Update regex pattern to match base64 characters [A-Za-z0-9+/=] - Add -NoNewline to Set-Content to preserve YAML formatting Fixes auto-update checksum verification that was broken because Get-FileHash outputs hex while electron-updater expects base64. Co-authored-by: CodeRabbit <[email protected]> Co-authored-by: Cursor Bot <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(ci): add signing verification and use HTTPS for timestamp server - Add signature verification step using Get-AuthenticodeSignature - Fails build if signing fails silently (prevents unsigned releases) - Logs certificate subject, issuer, and thumbprint on success - Change timestamp server from HTTP to HTTPS for better security Addresses remaining feedback from Auto Claude PR Review: - NEW-005/NEW-006: Missing verification that signing succeeded - NEW-001/NEW-002: Timestamp server uses unencrypted HTTP 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(ci): add error handling and multi-exe support to checksum regeneration - Add $ErrorActionPreference = "Stop" for strict error handling - Fail build if no exe files found in dist folder - Fail build if latest.yml not found - Fail build if checksum replacement didn't change content (regex mismatch) - Log all exe files found and their hashes for debugging - Show clear error messages with ::error:: prefix for GitHub Actions Addresses NF-003/NF-004 (multiple exe handling) and NF-005/NF-006 (error handling) from Auto Claude PR Review. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
…ndyMik90#822) * fix(github): use selectedPR from hook to restore Files changed list The hook useGitHubPRs returns a selectedPR that includes full PR details including the files array and changedFiles count. GitHubPRs.tsx was ignoring this and doing its own lookup in the prs array (which only contains list-view PRs without file details). This caused the Files changed list to appear empty in the PR detail view. Fixes ACS-173 * fix(github): add null-safe fallbacks for PR additions/deletions counts The GitHub API may return null for additions, deletions, and changed_files fields in certain edge cases (e.g., draft PRs, PRs with no diff yet). Add null-safe fallbacks (?? 0) to ensure the frontend always receives numeric values instead of null. Also added debug logging to inspect the raw API response for troubleshooting. Related to ACS-173 * refactor: standardize selected item pattern across issues/PRs hooks This addresses PR review findings about inconsistent patterns: 1. Fix UI flicker in useGitHubPRs hook - Don't clear previous PR details when switching PRs - Preserve previous details during fetch to avoid empty state 2. Add selectedIssue to useGitLabIssues hook - Return computed selectedIssue instead of manual lookup - Update GitLabIssues.tsx to use hook-provided value 3. Add selectedIssue to useGitHubIssues hook - Return computed selectedIssue instead of manual lookup - Update GitHubIssues.tsx to use hook-provided value Related to ACS-173 * fix(pr): prevent stale data and race conditions when switching PRs Fixes two HIGH priority issues from PR review: 1. Stale PR data when switching between PRs - Validate that selectedPRDetails.number matches selectedPRNumber - Added useMemo wrapper for consistency with other hooks - Previously, old PR data (with its file list) was briefly shown under new PR's header until fetch completed 2. Race condition for out-of-order API responses - Track current PR being fetched in module-level variable - Only update selectedPRDetails if response matches current PR - Prevents stale responses from overwriting newer data Related to ACS-173 * refactor(pr): address code quality issues from PR review Fixes 4 issues identified during PR review: 1. Replace module-level mutable variable with per-hook ref - Removed module-level currentFetchPRNumber variable - Added currentFetchPRNumberRef using useRef inside hook - Prevents shared state across hook instances 2. Fix fetchPRs useCallback dependency array - Removed setNewCommitsCheckAction from dependencies - Function doesn't reference it, so it wasn't needed 3. Remove async modifier from fire-and-forget functions - runReview and runFollowupReview don't await anything - Store functions return void, not Promise - Updated interface to reflect void return type 4. Normalize API response to camelCase in handler layer - Updated checkNewCommits handler comment for clarity - Removed defensive fallbacks and "as any" casts in hook - Data is now properly camelCased by the handler Related to ACS-173 --------- Co-authored-by: StillKnotKnown <[email protected]> Co-authored-by: Alex <[email protected]>
…flip-flop bug (AndyMik90#824) * chore: update .gitignore to include auto-generated files and security logs - Added entries for .security-key and logs/security/ to ignore auto-generated files and security logs. * fix(ACS-51): prevent task workflow from halting after planning stage Root cause: Frontend accepted incomplete plan data (empty phases array) during spec creation, which overwrote subtask state and left tasks stuck. Changes: - Add validatePlanData() to reject incomplete plans in task-store - Add reloadPlanForIncompleteTask() hook for resume functionality - Enhance logging in project-store for plan loading diagnostics - Add comprehensive unit tests for plan validation edge cases - Add integration tests for task lifecycle IPC events - Add E2E test specs for full task workflow The fix ensures incomplete plans are rejected while the backend's validation/auto-fix pipeline completes, preserving UI state until valid data arrives. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix(ACS-55, ACS-71): ensure Kanban state transitions render correctly ACS-55: Task card was showing "planning" even after moving to "coding" phase - Phase transitions now bypass the 16ms batching window and apply immediately - Added debug logging when sequence number checks drop out-of-order updates - This ensures intermediate phases (planning→coding→qa) are never coalesced ACS-71: Task immediately moved to Human Review with zero subtasks - Exit handler now checks if subtasks exist before moving to human_review - Added validateStatusTransition() function to prevent invalid state changes - Blocks human_review when no subtasks exist (task still in planning) - Blocks phase regression from coding back to planning Changes: - agent-events-handlers.ts: Added validation function, fixed exit handler - useIpc.ts: Phase changes bypass batching, apply immediately - task-store.ts: Added logging for dropped out-of-order updates 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: prevent status flip-flop between Human Review and AI Review When a task completed, `updateTaskFromPlan` would override the correct 'human_review' status with 'ai_review' when all subtasks were complete, causing tasks to flip between statuses on refresh. Root cause: The function only checked for "active" phases (planning, coding, qa_review, qa_fixing). When phase was 'complete' or 'idle', it would recalculate status from subtasks and set 'ai_review'. Fix: - Add 'complete' and 'failed' as terminal phases that skip recalculation - Respect explicit 'human_review' status from plan file - Never downgrade from 'human_review' to 'ai_review' This completes the Kanban state management fixes for ACS-51, ACS-55, ACS-71. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: add missing SubtaskStatus import to task-store The SubtaskStatus type was used but not imported, causing TypeScript compilation to fail in CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: use secure temp directories in tests to fix CodeQL alerts Replace hardcoded /tmp/ paths with mkdtempSync for secure temp directory creation. This prevents TOCTOU (time-of-check-time-of-use) attacks by using randomly generated directory names. Files fixed: - e2e/task-workflow.spec.ts - __tests__/integration/task-lifecycle.test.ts Resolves CodeQL "Insecure temporary file" high severity alerts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * fix: address PR review findings for Kanban state management - Fix reloadPlanForIncompleteTask to update Zustand store after reload - Extend flip-flop prevention to include pr_created and done statuses - Use wouldPhaseRegress() utility instead of hardcoded phase checks - Gate debug logging with debugLog utility for production - Fix unsafe type assertion for plan status - Remove redundant gitignore entry (logs/security/) - Add test coverage for terminal phase and status preservation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * chore: address follow-up PR review suggestions (5 LOW severity) - Add ExecutionPhase type cast after type guard check - Use crypto.randomUUID() for stronger subtask ID generation - Add optional chaining for defensive coding in useTaskDetail - Clarify comment about phase bypass batching behavior - Fix misleading test comment about human_review preservation - Update test regex to accept both UUID and fallback ID formats 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> * chore: address final 3 LOW severity suggestions from CodeRabbit - Remove unused electronAPI variable in task-lifecycle test - Add comment explaining defensive fallback for description field - Rename test to clarify status recalculation skip behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]>
) SignTool requires http://timestamp.acs.microsoft.com not https://
|
@riccardo-algorime Are you planning on addressing the PR feedback and/or do you need any help? Would love to get this merged. |
|
I can try to help, is it needed? im not an expert in this type of dev |
Base Branch
developbranch (required for all feature/fix PRs)main(hotfix only - maintainers)Description
Add support for Azure AI Foundry as an alternative to Anthropic API in the API Profiles system. Users can now configure Azure-hosted Claude models through the Settings UI, with support for both API key and Entra ID authentication.
Related Issue
Closes #823
Type of Change
Area
Changes
Frontend
Backend
get_auth_token()to recognize Foundry credentialsSDK_ENV_VARS.env.exampleEnvironment Variables
CLAUDE_CODE_USE_FOUNDRY=1- Enable Foundry modeANTHROPIC_FOUNDRY_RESOURCE- Azure resource nameANTHROPIC_FOUNDRY_BASE_URL- Full Azure endpoint URL (alternative)ANTHROPIC_FOUNDRY_API_KEY- API key (optional with Entra ID)ANTHROPIC_DEFAULT_HAIKU_MODEL,ANTHROPIC_DEFAULT_SONNET_MODEL,ANTHROPIC_DEFAULT_OPUS_MODELChecklist
developbranchCI/Testing Requirements
Feature Toggle
Breaking Changes
Breaking: No
Backward compatible - existing profiles without
typefield default toanthropic.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.