From f5ce0af4f9e86d2fd06c30b17767bdc9a25466c6 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 1 Oct 2026 11:20:58 +0000 Subject: [PATCH] style: use alias imports for useEscapable and trim new comments Addresses review: v2 imports go through the @/v2 alias, and comments stay within two lines with docstrings in one sentence. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XZW9ChvmiTKXYYWY6JvTKU --- backend/tests/handler/test_scan_identified.py | 6 +----- frontend/src/v2/components/Gallery/GalleryShell.vue | 6 ++---- frontend/src/v2/composables/useDebouncedSearch/index.ts | 5 ++--- frontend/src/v2/lib/forms/RDateField/RDateField.vue | 2 +- frontend/src/v2/lib/forms/RSelect/RSelect.vue | 2 +- frontend/src/v2/views/Player/Stream.vue | 4 +--- 6 files changed, 8 insertions(+), 17 deletions(-) diff --git a/backend/tests/handler/test_scan_identified.py b/backend/tests/handler/test_scan_identified.py index 6bcdf8a44..b99a82c7a 100644 --- a/backend/tests/handler/test_scan_identified.py +++ b/backend/tests/handler/test_scan_identified.py @@ -1,8 +1,4 @@ -"""Which provider matches count as an identified ROM during a scan. - -A scan that finds no match returns early and skips the SteamGridDB lookup, so -every source `Rom.is_identified` counts must keep the scan going. -""" +"""Every source `Rom.is_identified` counts must keep a scan past its no-match exit.""" from unittest.mock import AsyncMock, patch diff --git a/frontend/src/v2/components/Gallery/GalleryShell.vue b/frontend/src/v2/components/Gallery/GalleryShell.vue index 8be49dbbf..5dbc45ede 100644 --- a/frontend/src/v2/components/Gallery/GalleryShell.vue +++ b/frontend/src/v2/components/Gallery/GalleryShell.vue @@ -238,10 +238,8 @@ const filterActiveCount = computed(() => { return n; }); -// Search and filter changes → refetch the gallery: invalidate windows and -// bootstrap metadata only, since rows hydrate per-position as they mount. -// The initial hydration done by `useGalleryFilterUrl` happens before this -// watch is set up and so does not echo here. +// The initial URL hydration in `useGalleryFilterUrl` runs before this watch +// is set up, so it does not echo here. watch( [ searchTerm, diff --git a/frontend/src/v2/composables/useDebouncedSearch/index.ts b/frontend/src/v2/composables/useDebouncedSearch/index.ts index 6b7833981..0e6d6496d 100644 --- a/frontend/src/v2/composables/useDebouncedSearch/index.ts +++ b/frontend/src/v2/composables/useDebouncedSearch/index.ts @@ -1,8 +1,7 @@ import { onScopeDispose, type Ref, ref, watch } from "vue"; -/** A search box bound to a store term: typing writes the trimmed term after - * `delayMs`, and a term set elsewhere (back/forward, a pasted link) shows up - * in the box straight away. */ +/** A search box bound to a store term, debounced one way and immediate the + * other, so a term set by navigation shows up in the box. */ export function useDebouncedSearch(term: Ref, delayMs = 300) { const input = ref(term.value ?? ""); let pending: ReturnType | null = null; diff --git a/frontend/src/v2/lib/forms/RDateField/RDateField.vue b/frontend/src/v2/lib/forms/RDateField/RDateField.vue index 64c583d4c..e7213cd86 100644 --- a/frontend/src/v2/lib/forms/RDateField/RDateField.vue +++ b/frontend/src/v2/lib/forms/RDateField/RDateField.vue @@ -33,7 +33,7 @@ import { watch, } from "vue"; import { useChromeLabels } from "@/v2/lib/a11y/chromeLabels"; -import { useEscapable } from "../../overlays/RDialog/useEscapable"; +import { useEscapable } from "@/v2/lib/overlays/RDialog/useEscapable"; import RBtn from "../../primitives/RBtn/RBtn.vue"; import RIcon from "../../primitives/RIcon/RIcon.vue"; import RTextField from "../RTextField/RTextField.vue"; diff --git a/frontend/src/v2/lib/forms/RSelect/RSelect.vue b/frontend/src/v2/lib/forms/RSelect/RSelect.vue index 53b5141de..93a570243 100644 --- a/frontend/src/v2/lib/forms/RSelect/RSelect.vue +++ b/frontend/src/v2/lib/forms/RSelect/RSelect.vue @@ -38,8 +38,8 @@ import { } from "vue"; import { useInputModality } from "@/v2/composables/useInputModality"; import { useChromeLabels } from "@/v2/lib/a11y/chromeLabels"; +import { useEscapable } from "@/v2/lib/overlays/RDialog/useEscapable"; import { shouldAutofocusSearch } from "@/v2/utils/autofocus"; -import { useEscapable } from "../../overlays/RDialog/useEscapable"; import RDivider from "../../primitives/RDivider/RDivider.vue"; import RIcon from "../../primitives/RIcon/RIcon.vue"; import RProgressCircular from "../../primitives/RProgressCircular/RProgressCircular.vue"; diff --git a/frontend/src/v2/views/Player/Stream.vue b/frontend/src/v2/views/Player/Stream.vue index 9a0985bd4..8b085be3d 100644 --- a/frontend/src/v2/views/Player/Stream.vue +++ b/frontend/src/v2/views/Player/Stream.vue @@ -784,9 +784,7 @@ async function onVisibilityChange(): Promise { await pollSessionStatus(); } -// Timed from the moment the stream is live, which on a claim is the socket's -// launch-ready push rather than anything `onPlay` awaits. Ingesting the session -// updates last_played / now_playing / status server-side. +// A claim's stream goes live on the launch-ready push, after `onPlay` returns. watch(gameRunning, (running, prev) => { if (running && !prev) { presence.start();