From 198f471e754277f196b52fedec2f459ebe66e990 Mon Sep 17 00:00:00 2001 From: Sam Dornan Date: Wed, 5 Aug 2026 19:16:17 -0500 Subject: [PATCH] docs: drop em-dashes from the scan-provider comments Repo style forbids em-dashes in comments and text. Also trims the provider-categorisation comment, whose parentheticals just enumerated the two lists below it. Co-Authored-By: Claude Opus 5 --- .../useScanProviders/index.test.ts | 6 +++--- .../v2/composables/useScanProviders/index.ts | 20 +++++++++---------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/frontend/src/v2/composables/useScanProviders/index.test.ts b/frontend/src/v2/composables/useScanProviders/index.test.ts index 4daaaa18d..63da39079 100644 --- a/frontend/src/v2/composables/useScanProviders/index.test.ts +++ b/frontend/src/v2/composables/useScanProviders/index.test.ts @@ -38,7 +38,7 @@ beforeEach(() => { config.value.SKIP_HASH_CALCULATION = false; }); -describe("useScanProviders — effective sources", () => { +describe("useScanProviders effective sources", () => { it("expands an All-mode group to its enabled providers", () => { const { effectiveMetadataSources } = useScanProviders(); // Nothing stored ⇒ both selects boot in All-mode with an empty model. @@ -88,7 +88,7 @@ describe("useScanProviders — effective sources", () => { }); }); -describe("useScanProviders — Playmatch gate", () => { +describe("useScanProviders Playmatch gate", () => { function playmatch(matchers: HashMatcher[]) { return matchers.find((m) => m.value === "playmatch")!; } @@ -125,7 +125,7 @@ describe("useScanProviders — Playmatch gate", () => { }); }); -describe("useScanProviders — scan payload", () => { +describe("useScanProviders scan payload", () => { it("sends the expanded provider list and the playmatch flag", () => { const { buildScanPayload } = useScanProviders(); expect(buildScanPayload()).toEqual({ diff --git a/frontend/src/v2/composables/useScanProviders/index.ts b/frontend/src/v2/composables/useScanProviders/index.ts index 96d30d5e1..5671941bb 100644 --- a/frontend/src/v2/composables/useScanProviders/index.ts +++ b/frontend/src/v2/composables/useScanProviders/index.ts @@ -1,4 +1,4 @@ -// useScanProviders — the provider + hash-matcher model shared by every +// useScanProviders: the provider + hash-matcher model shared by every // surface that launches a scan (the /scan view, the per-platform scan // dialog, the per-ROM refresh dialog), so all three send the backend the // same payload for the same choices. @@ -10,7 +10,7 @@ // `playmatch_enabled and IGDB in apis`), hence its IGDB requirement. // // A group's RSelect treats an empty model as "All", so an All-mode group -// contributes nothing to `metadataSources` — while the backend reads an +// contributes nothing to `metadataSources`, while the backend reads an // empty `apis` list as "no sources". `effectiveMetadataSources` bridges // that by expanding an All-mode group to its enabled providers. import { useLocalStorage, type RemovableRef } from "@vueuse/core"; @@ -28,10 +28,8 @@ const LOCAL_STORAGE_PLAYMATCH_ENABLED_KEY = "scan.playmatchEnabled"; const HASH_MATCHER_KEYS = ["hasheous", "playmatch"] as const; -// Provider categorisation — mirrors the split used by the setup wizard's -// metadata step. General catalogs ship a full game record (title, artwork, -// descriptions); specific sources add a single domain dimension -// (achievements, completion times, custom art). +// Mirrors the split used by the setup wizard's metadata step: general +// catalogs ship a full game record, specific sources add one dimension. const GENERAL_PROVIDER_KEYS = new Set([ "igdb", "ss", @@ -67,7 +65,7 @@ export interface UseScanProviders { specificProviders: ComputedRef; /** Explicit picks, shared as the v-model of both provider selects. */ metadataSources: Ref; - /** Picks with All-mode groups expanded — what the scan actually uses. */ + /** Picks with All-mode groups expanded, i.e. what the scan uses. */ effectiveMetadataSources: ComputedRef; /** Bind to each select's `@update:all-selected`. */ generalAllSelected: Ref; @@ -89,7 +87,7 @@ export function useScanProviders(): UseScanProviders { const calculateHashes = computed(() => !config.value.SKIP_HASH_CALCULATION); - // Catalog options — main metadata sources, minus the hash matchers. + // Catalog options: main metadata sources, minus the hash matchers. const metadataOptions = computed(() => heartbeat .getMetadataOptionsByPriority() @@ -143,9 +141,9 @@ export function useScanProviders(): UseScanProviders { [metadataOptions, storedMetadataSources], ([options, stored], previous) => { // A new stored list (written by whichever surface last scanned) - // replaces the picks. When only the option list moved — a heartbeat - // refresh, an admin toggle — keep the current picks and just drop - // the ones that went away, so an in-progress selection survives. + // replaces the picks. When only the option list moved (a heartbeat + // refresh, an admin toggle), keep the current picks and just drop the + // ones that went away, so an in-progress selection survives. const storedChanged = !previous || previous[1] !== stored; metadataSources.value = storedChanged ? options.filter((o) => stored.includes(o.value) && !o.disabled)