diff --git a/webui/src/App.tsx b/webui/src/App.tsx index e9fe436..3822554 100644 --- a/webui/src/App.tsx +++ b/webui/src/App.tsx @@ -2,7 +2,7 @@ import { useState } from "react"; import Header from "@/components/Header"; import InstanceList from "@/components/InstanceList"; import InstanceModal from "@/components/InstanceModal"; -import { CreateInstanceOptions, Instance } from "@/types/instance"; +import { type CreateInstanceOptions, type Instance } from "@/types/instance"; import { useInstances } from "@/contexts/InstancesContext"; import SystemInfoModal from "./components/SystemInfoModal"; diff --git a/webui/src/__tests__/App.test.tsx b/webui/src/__tests__/App.test.tsx index 7af5052..0159601 100644 --- a/webui/src/__tests__/App.test.tsx +++ b/webui/src/__tests__/App.test.tsx @@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event' import App from '@/App' import { InstancesProvider } from '@/contexts/InstancesContext' import { instancesApi } from '@/lib/api' -import { Instance } from '@/types/instance' +import type { Instance } from '@/types/instance' // Mock the API vi.mock('@/lib/api', () => ({ diff --git a/webui/src/components/HealthBadge.tsx b/webui/src/components/HealthBadge.tsx index 2c5a2a0..4bc0cfb 100644 --- a/webui/src/components/HealthBadge.tsx +++ b/webui/src/components/HealthBadge.tsx @@ -1,7 +1,7 @@ // ui/src/components/HealthBadge.tsx import React from "react"; import { Badge } from "@/components/ui/badge"; -import { HealthStatus } from "@/types/instance"; +import type { HealthStatus } from "@/types/instance"; import { CheckCircle, Loader2, XCircle } from "lucide-react"; interface HealthBadgeProps { diff --git a/webui/src/components/InstanceCard.tsx b/webui/src/components/InstanceCard.tsx index 63c504e..56b49cb 100644 --- a/webui/src/components/InstanceCard.tsx +++ b/webui/src/components/InstanceCard.tsx @@ -1,7 +1,7 @@ // ui/src/components/InstanceCard.tsx import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; -import { Instance } from "@/types/instance"; +import type { Instance } from "@/types/instance"; import { Edit, FileText, Play, Square, Trash2 } from "lucide-react"; import LogsModal from "@/components/LogModal"; import HealthBadge from "@/components/HealthBadge"; diff --git a/webui/src/components/InstanceList.tsx b/webui/src/components/InstanceList.tsx index b2fce60..39c924d 100644 --- a/webui/src/components/InstanceList.tsx +++ b/webui/src/components/InstanceList.tsx @@ -1,7 +1,7 @@ // ui/src/components/InstanceList.tsx import { useInstances } from '@/contexts/InstancesContext' import InstanceCard from '@/components/InstanceCard' -import { Instance } from '@/types/instance' +import type { Instance } from '@/types/instance' import { memo } from 'react' interface InstanceListProps { diff --git a/webui/src/components/InstanceModal.tsx b/webui/src/components/InstanceModal.tsx index 2e8434f..9dc085a 100644 --- a/webui/src/components/InstanceModal.tsx +++ b/webui/src/components/InstanceModal.tsx @@ -10,7 +10,7 @@ import { DialogHeader, DialogTitle, } from "@/components/ui/dialog"; -import { CreateInstanceOptions, Instance } from "@/types/instance"; +import type { CreateInstanceOptions, Instance } from "@/types/instance"; import { getBasicFields, getAdvancedFields } from "@/lib/zodFormUtils"; import { ChevronDown, ChevronRight } from "lucide-react"; import ZodFormField from "@/components/ZodFormField"; diff --git a/webui/src/components/ZodFormField.tsx b/webui/src/components/ZodFormField.tsx index c0cb7c2..bb6bd54 100644 --- a/webui/src/components/ZodFormField.tsx +++ b/webui/src/components/ZodFormField.tsx @@ -2,7 +2,7 @@ import React from 'react' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { Checkbox } from '@/components/ui/checkbox' -import { CreateInstanceOptions } from '@/types/instance' +import type { CreateInstanceOptions } from '@/types/instance' import { getFieldType, basicFieldsConfig } from '@/lib/zodFormUtils' interface ZodFormFieldProps { diff --git a/webui/src/components/__tests__/InstanceCard.test.tsx b/webui/src/components/__tests__/InstanceCard.test.tsx index 266e7de..5b9202c 100644 --- a/webui/src/components/__tests__/InstanceCard.test.tsx +++ b/webui/src/components/__tests__/InstanceCard.test.tsx @@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest' import { render, screen } from '@testing-library/react' import userEvent from '@testing-library/user-event' import InstanceCard from '@/components/InstanceCard' -import { Instance } from '@/types/instance' +import type { Instance } from '@/types/instance' // Mock the health hook since we're not testing health logic here vi.mock('@/hooks/useInstanceHealth', () => ({ diff --git a/webui/src/components/__tests__/InstanceList.test.tsx b/webui/src/components/__tests__/InstanceList.test.tsx index cf2ab92..0d047f8 100644 --- a/webui/src/components/__tests__/InstanceList.test.tsx +++ b/webui/src/components/__tests__/InstanceList.test.tsx @@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event' import InstanceList from '@/components/InstanceList' import { InstancesProvider } from '@/contexts/InstancesContext' import { instancesApi } from '@/lib/api' -import { Instance } from '@/types/instance' +import type { Instance } from '@/types/instance' // Mock the API vi.mock('@/lib/api', () => ({ diff --git a/webui/src/components/__tests__/InstanceModal.test.tsx b/webui/src/components/__tests__/InstanceModal.test.tsx index 38033e6..fc405c0 100644 --- a/webui/src/components/__tests__/InstanceModal.test.tsx +++ b/webui/src/components/__tests__/InstanceModal.test.tsx @@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest' import { render, screen, waitFor } from '@testing-library/react' import userEvent from '@testing-library/user-event' import InstanceModal from '@/components/InstanceModal' -import { Instance } from '@/types/instance' +import type { Instance } from '@/types/instance' describe('InstanceModal - Form Logic and Validation', () => { const mockOnSave = vi.fn() @@ -136,7 +136,7 @@ describe('InstanceModal - Form Logic and Validation', () => { } } - it('pre-fills form with existing instance data', async () => { + it('pre-fills form with existing instance data', () => { render( { }) }) - it('shows correct button text for running vs stopped instances', async () => { + it('shows correct button text for running vs stopped instances', () => { const runningInstance: Instance = { ...mockInstance, running: true } const { rerender } = render( @@ -205,7 +205,7 @@ describe('InstanceModal - Form Logic and Validation', () => { }) describe('Auto Restart Configuration', () => { - it('shows restart options when auto restart is enabled', async () => { + it('shows restart options when auto restart is enabled', () => { render( ({ diff --git a/webui/src/hooks/useInstanceHealth.ts b/webui/src/hooks/useInstanceHealth.ts index 78282a7..ceb5271 100644 --- a/webui/src/hooks/useInstanceHealth.ts +++ b/webui/src/hooks/useInstanceHealth.ts @@ -1,6 +1,6 @@ // ui/src/hooks/useInstanceHealth.ts import { useState, useEffect } from 'react' -import { HealthStatus } from '@/types/instance' +import type { HealthStatus } from '@/types/instance' import { healthService } from '@/lib/healthService' export function useInstanceHealth(instanceName: string, isRunning: boolean): HealthStatus | undefined { diff --git a/webui/src/lib/api.ts b/webui/src/lib/api.ts index 2d2333e..66eb63c 100644 --- a/webui/src/lib/api.ts +++ b/webui/src/lib/api.ts @@ -1,4 +1,4 @@ -import { CreateInstanceOptions, Instance } from "@/types/instance"; +import type { CreateInstanceOptions, Instance } from "@/types/instance"; const API_BASE = "/api/v1"; diff --git a/webui/src/lib/healthService.ts b/webui/src/lib/healthService.ts index 5daa475..2f52c97 100644 --- a/webui/src/lib/healthService.ts +++ b/webui/src/lib/healthService.ts @@ -1,4 +1,4 @@ -import { HealthStatus } from '@/types/instance' +import { type HealthStatus } from '@/types/instance' type HealthCallback = (health: HealthStatus) => void diff --git a/webui/src/lib/zodFormUtils.ts b/webui/src/lib/zodFormUtils.ts index be2afd7..c359bf0 100644 --- a/webui/src/lib/zodFormUtils.ts +++ b/webui/src/lib/zodFormUtils.ts @@ -1,4 +1,5 @@ -import { CreateInstanceOptions, getAllFieldKeys } from '@/schemas/instanceOptions' +import type { CreateInstanceOptions} from '@/schemas/instanceOptions'; +import { getAllFieldKeys } from '@/schemas/instanceOptions' // Only define the basic fields we want to show by default export const basicFieldsConfig: Record