diff --git a/backend/.coverage b/backend/.coverage deleted file mode 100644 index 811e3bd30..000000000 Binary files a/backend/.coverage and /dev/null differ diff --git a/frontend/eslint.config.js b/frontend/eslint.config.js index 4f353f6ae..2cea7df7b 100644 --- a/frontend/eslint.config.js +++ b/frontend/eslint.config.js @@ -6,7 +6,7 @@ import tseslint from 'typescript-eslint' import { defineConfig, globalIgnores } from 'eslint/config' export default defineConfig([ - globalIgnores(['dist']), + globalIgnores(['dist', 'coverage']), { files: ['**/*.{ts,tsx}'], extends: [ diff --git a/frontend/src/__tests__/api/githubBackupApi.test.ts b/frontend/src/__tests__/api/githubBackupApi.test.ts index 851ba074b..d134ae3bd 100644 --- a/frontend/src/__tests__/api/githubBackupApi.test.ts +++ b/frontend/src/__tests__/api/githubBackupApi.test.ts @@ -2,7 +2,7 @@ * Tests for the GitHub Backup API client functions. */ -import { describe, it, expect, beforeEach, vi } from 'vitest'; +import { describe, it, expect } from 'vitest'; import { http, HttpResponse } from 'msw'; import { setupServer } from 'msw/node'; import type { diff --git a/frontend/src/pages/SettingsPage.tsx b/frontend/src/pages/SettingsPage.tsx index 70ad3e688..944babd95 100644 --- a/frontend/src/pages/SettingsPage.tsx +++ b/frontend/src/pages/SettingsPage.tsx @@ -544,14 +544,16 @@ export function SettingsPage() { // Local state for camera URL inputs (to avoid saving on every keystroke) const [localCameraUrls, setLocalCameraUrls] = useState>({}); const cameraUrlSaveTimeoutRef = useRef>>({}); + const initializedPrinterUrlsRef = useRef>(new Set()); // Initialize local camera URLs from printer data useEffect(() => { if (printers) { const urls: Record = {}; printers.forEach(p => { - if (p.external_camera_url && localCameraUrls[p.id] === undefined) { + if (p.external_camera_url && !initializedPrinterUrlsRef.current.has(p.id)) { urls[p.id] = p.external_camera_url; + initializedPrinterUrlsRef.current.add(p.id); } }); if (Object.keys(urls).length > 0) { diff --git a/test_frontend.sh b/test_frontend.sh index 577555226..94157fea8 100755 --- a/test_frontend.sh +++ b/test_frontend.sh @@ -1,5 +1,6 @@ #!/bin/sh cd frontend +npm run lint npm test cd ..