From 87d3c27b6533e9449eddb80b6b1af71d6f55ac11 Mon Sep 17 00:00:00 2001 From: Masahiko AMANO Date: Fri, 3 Jul 2026 10:13:56 +0300 Subject: [PATCH] style: apply prettier and gofmt Formatting only: run prettier across the frontend and gofmt over the backend. Fixes struct-field alignment in domain/pool.go and pre-existing prettier drift in a few frontend files. Co-Authored-By: Claude Opus 4.8 --- backend/internal/domain/pool.go | 8 ++++---- frontend/src/lib/utils/rovingGrid.svelte.ts | 3 +-- frontend/src/routes/files/+page.svelte | 7 +++---- frontend/src/routes/files/duplicates/+page.svelte | 10 ++++------ 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/backend/internal/domain/pool.go b/backend/internal/domain/pool.go index cc1ed3e..39c53bd 100644 --- a/backend/internal/domain/pool.go +++ b/backend/internal/domain/pool.go @@ -45,10 +45,10 @@ type Pool struct { // SortKey / SortOrder control how the pool's files are ordered. When SortKey // is PoolSortManual, files follow the manual position order and can be // reordered; otherwise they are sorted automatically and reordering is a no-op. - SortKey string - SortOrder string - FileCount int - CreatedAt time.Time // extracted from UUID v7 via UUIDCreatedAt + SortKey string + SortOrder string + FileCount int + CreatedAt time.Time // extracted from UUID v7 via UUIDCreatedAt } // PoolFile is a File with its ordering position within a pool. diff --git a/frontend/src/lib/utils/rovingGrid.svelte.ts b/frontend/src/lib/utils/rovingGrid.svelte.ts index 9b98985..cbf8227 100644 --- a/frontend/src/lib/utils/rovingGrid.svelte.ts +++ b/frontend/src/lib/utils/rovingGrid.svelte.ts @@ -42,8 +42,7 @@ export function createRovingGrid(opts: RovingGridOptions) { function isFormTarget(t: EventTarget | null): boolean { return ( t instanceof HTMLElement && - (t.isContentEditable || - ['INPUT', 'TEXTAREA', 'SELECT', 'BUTTON', 'A'].includes(t.tagName)) + (t.isContentEditable || ['INPUT', 'TEXTAREA', 'SELECT', 'BUTTON', 'A'].includes(t.tagName)) ); } diff --git a/frontend/src/routes/files/+page.svelte b/frontend/src/routes/files/+page.svelte index e2ecd9f..8e15388 100644 --- a/frontend/src/routes/files/+page.svelte +++ b/frontend/src/routes/files/+page.svelte @@ -129,9 +129,7 @@ selectionStore.exit(); try { await api.post('/files/bulk/review', { file_ids: ids, needs_review: false }); - files = files.map((f) => - ids.includes(f.id ?? '') ? { ...f, needs_review: false } : f - ); + files = files.map((f) => (ids.includes(f.id ?? '') ? { ...f, needs_review: false } : f)); } catch { // ignore — list already reflects the intended state optimistically } @@ -148,7 +146,8 @@ function handleKey(e: KeyboardEvent) { if (e.key === 'Escape') { if (tagEditorOpen) tagEditorOpen = false; - else if (poolPickerOpen) return; // PoolPicker owns Escape (clear search, then close) + else if (poolPickerOpen) + return; // PoolPicker owns Escape (clear search, then close) else if (confirmDeleteFiles) confirmDeleteFiles = false; else if (activeFileId) return; else if ($selectionActive) selectionStore.exit(); diff --git a/frontend/src/routes/files/duplicates/+page.svelte b/frontend/src/routes/files/duplicates/+page.svelte index 02594b1..c65e09a 100644 --- a/frontend/src/routes/files/duplicates/+page.svelte +++ b/frontend/src/routes/files/duplicates/+page.svelte @@ -1,11 +1,7 @@