import { HotkeyButton } from '@/components/ui/hotkey-button'; import { Button } from '@/components/ui/button'; import { Slider } from '@/components/ui/slider'; import { Switch } from '@/components/ui/switch'; import { Label } from '@/components/ui/label'; import { Plus, Bot, Wand2 } from 'lucide-react'; import { KeyboardShortcut } from '@/hooks/use-keyboard-shortcuts'; import { ClaudeUsagePopover } from '@/components/claude-usage-popover'; import { useAppStore } from '@/store/app-store'; import { useSetupStore } from '@/store/setup-store'; interface BoardHeaderProps { projectName: string; maxConcurrency: number; runningAgentsCount: number; onConcurrencyChange: (value: number) => void; isAutoModeRunning: boolean; onAutoModeToggle: (enabled: boolean) => void; onAddFeature: () => void; onOpenPlanDialog: () => void; addFeatureShortcut: KeyboardShortcut; isMounted: boolean; } export function BoardHeader({ projectName, maxConcurrency, runningAgentsCount, onConcurrencyChange, isAutoModeRunning, onAutoModeToggle, onAddFeature, onOpenPlanDialog, addFeatureShortcut, isMounted, }: BoardHeaderProps) { const apiKeys = useAppStore((state) => state.apiKeys); const claudeAuthStatus = useSetupStore((state) => state.claudeAuthStatus); // Hide usage tracking when using API key (only show for Claude Code CLI users) // Check both user-entered API key and environment variable ANTHROPIC_API_KEY // Also hide on Windows for now (CLI usage command not supported) // Only show if CLI has been verified/authenticated const isWindows = typeof navigator !== 'undefined' && navigator.platform?.toLowerCase().includes('win'); const hasApiKey = !!apiKeys.anthropic || !!claudeAuthStatus?.hasEnvApiKey; const isCliVerified = claudeAuthStatus?.authenticated && claudeAuthStatus?.method === 'cli_authenticated'; const showUsageTracking = !hasApiKey && !isWindows && isCliVerified; return (

Kanban Board

{projectName}

{/* Usage Popover - only show for CLI users (not API key users) */} {isMounted && showUsageTracking && } {/* Concurrency Slider - only show after mount to prevent hydration issues */} {isMounted && (
Agents onConcurrencyChange(value[0])} min={1} max={10} step={1} className="w-20" data-testid="concurrency-slider" /> {runningAgentsCount} / {maxConcurrency}
)} {/* Auto Mode Toggle - only show after mount to prevent hydration issues */} {isMounted && (
)} Add Feature
); }