Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions apps/ui/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ const eslintConfig = defineConfig([
require: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
},
},
rules: {
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }],
},
},
{
files: ['**/*.ts', '**/*.tsx'],
Expand Down Expand Up @@ -45,6 +50,8 @@ const eslintConfig = defineConfig([
confirm: 'readonly',
getComputedStyle: 'readonly',
requestAnimationFrame: 'readonly',
cancelAnimationFrame: 'readonly',
alert: 'readonly',
// DOM Element Types
HTMLElement: 'readonly',
HTMLInputElement: 'readonly',
Expand All @@ -56,6 +63,8 @@ const eslintConfig = defineConfig([
HTMLParagraphElement: 'readonly',
HTMLImageElement: 'readonly',
Element: 'readonly',
SVGElement: 'readonly',
SVGSVGElement: 'readonly',
// Event Types
Event: 'readonly',
KeyboardEvent: 'readonly',
Expand All @@ -64,14 +73,24 @@ const eslintConfig = defineConfig([
CustomEvent: 'readonly',
ClipboardEvent: 'readonly',
WheelEvent: 'readonly',
MouseEvent: 'readonly',
UIEvent: 'readonly',
MediaQueryListEvent: 'readonly',
DataTransfer: 'readonly',
// Web APIs
ResizeObserver: 'readonly',
AbortSignal: 'readonly',
AbortController: 'readonly',
IntersectionObserver: 'readonly',
Audio: 'readonly',
HTMLAudioElement: 'readonly',
ScrollBehavior: 'readonly',
URL: 'readonly',
URLSearchParams: 'readonly',
XMLHttpRequest: 'readonly',
Response: 'readonly',
RequestInit: 'readonly',
RequestCache: 'readonly',
// Timers
setTimeout: 'readonly',
setInterval: 'readonly',
Expand All @@ -90,6 +109,8 @@ const eslintConfig = defineConfig([
Electron: 'readonly',
// Console
console: 'readonly',
// Vite defines
__APP_VERSION__: 'readonly',
},
},
plugins: {
Expand All @@ -99,6 +120,13 @@ const eslintConfig = defineConfig([
...ts.configs.recommended.rules,
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-nocheck': 'allow-with-description',
minimumDescriptionLength: 10,
},
],
},
},
globalIgnores([
Expand Down
4 changes: 2 additions & 2 deletions apps/ui/scripts/kill-test-servers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function killProcessOnPort(port) {
try {
await execAsync(`kill -9 ${pid}`);
console.log(`[KillTestServers] Killed process ${pid}`);
} catch (error) {
} catch (_error) {
// Process might have already exited
}
}
Expand All @@ -47,7 +47,7 @@ async function killProcessOnPort(port) {
await new Promise((resolve) => setTimeout(resolve, 500));
return;
}
} catch (error) {
} catch (_error) {
// No process on port, which is fine
}
}
Expand Down
1 change: 0 additions & 1 deletion apps/ui/src/components/codex-usage-popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export function CodexUsagePopover() {
// Use React Query for data fetching with automatic polling
const {
data: codexUsage,
isLoading,
isFetching,
error: queryError,
dataUpdatedAt,
Expand Down
2 changes: 0 additions & 2 deletions apps/ui/src/components/dialogs/file-browser-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ interface FileBrowserDialogProps {
initialPath?: string;
}

const MAX_RECENT_FOLDERS = 5;

export function FileBrowserDialog({
open,
onOpenChange,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { useCallback } from 'react';
import { Bell, Check, Trash2, ExternalLink } from 'lucide-react';
import { Bell, Check, Trash2 } from 'lucide-react';
import { useNavigate } from '@tanstack/react-router';
import { useNotificationsStore } from '@/store/notifications-store';
import { useLoadNotifications, useNotificationEvents } from '@/hooks/use-notification-events';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ export function ProjectContextMenu({
} = useAppStore();
const [showRemoveDialog, setShowRemoveDialog] = useState(false);
const [showThemeSubmenu, setShowThemeSubmenu] = useState(false);
const [removeConfirmed, setRemoveConfirmed] = useState(false);
const themeSubmenuRef = useRef<HTMLDivElement>(null);
const closeTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);

Expand Down Expand Up @@ -331,7 +330,6 @@ export function ProjectContextMenu({
toast.success('Project removed', {
description: `${project.name} has been removed from your projects list`,
});
setRemoveConfirmed(true);
}, [moveProjectToTrash, project.id, project.name]);

const handleDialogClose = useCallback(
Expand All @@ -340,8 +338,6 @@ export function ProjectContextMenu({
// Close the context menu when dialog closes (whether confirmed or cancelled)
// This prevents the context menu from reappearing after dialog interaction
if (!isOpen) {
// Reset confirmation state
setRemoveConfirmed(false);
// Always close the context menu when dialog closes
onClose();
}
Expand Down
10 changes: 0 additions & 10 deletions apps/ui/src/components/shared/model-override-trigger.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import * as React from 'react';
import { Settings2 } from 'lucide-react';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
import { useAppStore } from '@/store/app-store';
import type { ModelAlias, CursorModelId, PhaseModelKey, PhaseModelEntry } from '@automaker/types';
import { PhaseModelSelector } from '@/components/views/settings-view/model-defaults/phase-model-selector';
Expand Down Expand Up @@ -74,12 +70,6 @@ export function ModelOverrideTrigger({
lg: 'h-10 w-10',
};

const iconSizes = {
sm: 'w-3.5 h-3.5',
md: 'w-4 h-4',
lg: 'w-5 h-5',
};

// For icon variant, wrap PhaseModelSelector and hide text/chevron with CSS
if (variant === 'icon') {
return (
Expand Down
10 changes: 0 additions & 10 deletions apps/ui/src/components/shared/use-model-override.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@ function normalizeEntry(entry: PhaseModelEntry | string): PhaseModelEntry {
return entry;
}

/**
* Extract model string from PhaseModelEntry or string
*/
function extractModel(entry: PhaseModelEntry | string): ModelId {
if (typeof entry === 'string') {
return entry as ModelId;
}
return entry.model;
}

/**
* Hook for managing model overrides per phase
*
Expand Down
1 change: 0 additions & 1 deletion apps/ui/src/components/ui/collapsible.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from 'react';
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';

const Collapsible = CollapsiblePrimitive.Root;
Expand Down
3 changes: 1 addition & 2 deletions apps/ui/src/components/ui/log-viewer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState, useMemo, useEffect, useRef } from 'react';
import { useState, useMemo, useRef } from 'react';
import {
ChevronDown,
ChevronRight,
Expand All @@ -21,7 +21,6 @@ import {
X,
Filter,
Circle,
Play,
} from 'lucide-react';
import { Spinner } from '@/components/ui/spinner';
import { cn } from '@/lib/utils';
Expand Down
4 changes: 2 additions & 2 deletions apps/ui/src/components/ui/task-progress-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function TaskProgressPanel({
const [tasks, setTasks] = useState<TaskInfo[]>([]);
const [isExpanded, setIsExpanded] = useState(defaultExpanded);
const [isLoading, setIsLoading] = useState(true);
const [currentTaskId, setCurrentTaskId] = useState<string | null>(null);
const [, setCurrentTaskId] = useState<string | null>(null);

// Load initial tasks from feature's planSpec
const loadInitialTasks = useCallback(async () => {
Expand Down Expand Up @@ -236,7 +236,7 @@ export function TaskProgressPanel({
<div className="absolute left-[2.35rem] top-4 bottom-8 w-px bg-linear-to-b from-border/80 via-border/40 to-transparent" />

<div className="space-y-5">
{tasks.map((task, index) => {
{tasks.map((task, _index) => {
const isActive = task.status === 'in_progress';
const isCompleted = task.status === 'completed';
const isPending = task.status === 'pending';
Expand Down
11 changes: 0 additions & 11 deletions apps/ui/src/components/usage-popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ type UsageError = {
message: string;
};

// Fixed refresh interval (45 seconds)
const REFRESH_INTERVAL_SECONDS = 45;
const CLAUDE_SESSION_WINDOW_HOURS = 5;

// Helper to format reset time for Codex
Expand Down Expand Up @@ -229,15 +227,6 @@ export function UsagePopover() {
// Calculate max percentage for header button
const claudeSessionPercentage = claudeUsage?.sessionPercentage || 0;

const codexMaxPercentage = codexUsage?.rateLimits
? Math.max(
codexUsage.rateLimits.primary?.usedPercent || 0,
codexUsage.rateLimits.secondary?.usedPercent || 0
)
: 0;

const isStale = activeTab === 'claude' ? isClaudeStale : isCodexStale;

const getProgressBarColor = (percentage: number) => {
if (percentage >= 80) return 'bg-red-500';
if (percentage >= 50) return 'bg-yellow-500';
Expand Down
19 changes: 1 addition & 18 deletions apps/ui/src/components/views/agent-tools-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,7 @@ import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/com
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import {
FileText,
FolderOpen,
Terminal,
CheckCircle,
XCircle,
Play,
File,
Pencil,
Wrench,
} from 'lucide-react';
import { Terminal, CheckCircle, XCircle, Play, File, Pencil, Wrench } from 'lucide-react';
import { Spinner } from '@/components/ui/spinner';
import { cn } from '@/lib/utils';
import { getElectronAPI } from '@/lib/electron';
Expand All @@ -29,13 +19,6 @@ interface ToolResult {
timestamp: Date;
}

interface ToolExecution {
tool: string;
input: string;
result: ToolResult | null;
isRunning: boolean;
}

export function AgentToolsView() {
const { currentProject } = useAppStore();
const api = getElectronAPI();
Expand Down
1 change: 0 additions & 1 deletion apps/ui/src/components/views/agent-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export function AgentView() {
sendMessage,
clearHistory,
stopExecution,
error: agentError,
serverQueue,
addToServerQueue,
removeFromServerQueue,
Expand Down
26 changes: 4 additions & 22 deletions apps/ui/src/components/views/board-view.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-nocheck
import { useEffect, useState, useCallback, useMemo, useRef } from 'react';
// @ts-nocheck - dnd-kit type incompatibilities with collision detection and complex state management
import { useEffect, useState, useCallback, useMemo } from 'react';
import { createLogger } from '@automaker/utils/logger';
import {
DndContext,
Expand Down Expand Up @@ -29,16 +29,13 @@ class DialogAwarePointerSensor extends PointerSensor {
import { useAppStore, Feature } from '@/store/app-store';
import { getElectronAPI } from '@/lib/electron';
import { getHttpApiClient } from '@/lib/http-api-client';
import type { AutoModeEvent } from '@/types/electron';
import type { ModelAlias, CursorModelId, BacklogPlanResult } from '@automaker/types';
import type { BacklogPlanResult } from '@automaker/types';
import { pathsEqual } from '@/lib/utils';
import { toast } from 'sonner';
import { getBlockingDependencies } from '@automaker/dependency-resolver';
import { BoardBackgroundModal } from '@/components/dialogs/board-background-modal';
import { Spinner } from '@/components/ui/spinner';
import { useShallow } from 'zustand/react/shallow';
import { useAutoMode } from '@/hooks/use-auto-mode';
import { useKeyboardShortcutsConfig } from '@/hooks/use-keyboard-shortcuts';
import { useWindowState } from '@/hooks/use-window-state';
// Board-view specific imports
import { BoardHeader } from './board-view/board-header';
Expand Down Expand Up @@ -97,8 +94,6 @@ const logger = createLogger('Board');
export function BoardView() {
const {
currentProject,
maxConcurrency: legacyMaxConcurrency,
setMaxConcurrency: legacySetMaxConcurrency,
defaultSkipTests,
specCreatingForProject,
setSpecCreatingForProject,
Expand All @@ -109,9 +104,6 @@ export function BoardView() {
setCurrentWorktree,
getWorktrees,
setWorktrees,
useWorktrees,
enableDependencyBlocking,
skipVerificationInAutoMode,
planUseSelectedWorktreeBranch,
addFeatureUseSelectedWorktreeBranch,
isPrimaryWorktreeBranch,
Expand All @@ -120,8 +112,6 @@ export function BoardView() {
} = useAppStore(
useShallow((state) => ({
currentProject: state.currentProject,
maxConcurrency: state.maxConcurrency,
setMaxConcurrency: state.setMaxConcurrency,
defaultSkipTests: state.defaultSkipTests,
specCreatingForProject: state.specCreatingForProject,
setSpecCreatingForProject: state.setSpecCreatingForProject,
Expand All @@ -132,9 +122,6 @@ export function BoardView() {
setCurrentWorktree: state.setCurrentWorktree,
getWorktrees: state.getWorktrees,
setWorktrees: state.setWorktrees,
useWorktrees: state.useWorktrees,
enableDependencyBlocking: state.enableDependencyBlocking,
skipVerificationInAutoMode: state.skipVerificationInAutoMode,
planUseSelectedWorktreeBranch: state.planUseSelectedWorktreeBranch,
addFeatureUseSelectedWorktreeBranch: state.addFeatureUseSelectedWorktreeBranch,
isPrimaryWorktreeBranch: state.isPrimaryWorktreeBranch,
Expand All @@ -151,12 +138,9 @@ export function BoardView() {
// Subscribe to worktreePanelVisibleByProject to trigger re-renders when it changes
const worktreePanelVisibleByProject = useAppStore((state) => state.worktreePanelVisibleByProject);
// Subscribe to showInitScriptIndicatorByProject to trigger re-renders when it changes
const showInitScriptIndicatorByProject = useAppStore(
(state) => state.showInitScriptIndicatorByProject
);
useAppStore((state) => state.showInitScriptIndicatorByProject);
const getShowInitScriptIndicator = useAppStore((state) => state.getShowInitScriptIndicator);
const getDefaultDeleteBranch = useAppStore((state) => state.getDefaultDeleteBranch);
const shortcuts = useKeyboardShortcutsConfig();
const {
features: hookFeatures,
isLoading,
Expand Down Expand Up @@ -535,8 +519,6 @@ export function BoardView() {
handleMoveBackToInProgress,
handleOpenFollowUp,
handleSendFollowUp,
handleCommitFeature,
handleMergeFeature,
handleCompleteFeature,
handleUnarchiveFeature,
handleViewOutput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ import { memo, useEffect, useState, useMemo, useRef } from 'react';
import { Feature, ThinkingLevel, ParsedTask } from '@/store/app-store';
import type { ReasoningEffort } from '@automaker/types';
import { getProviderFromModel } from '@/lib/utils';
import {
AgentTaskInfo,
parseAgentContext,
formatModelName,
DEFAULT_MODEL,
} from '@/lib/agent-context-parser';
import { parseAgentContext, formatModelName, DEFAULT_MODEL } from '@/lib/agent-context-parser';
import { cn } from '@/lib/utils';
import type { AutoModeEvent } from '@/types/electron';
import { Brain, ListTodo, Sparkles, Expand, CheckCircle2, Circle, Wrench } from 'lucide-react';
Expand Down
Loading