From 84db5e3c02fd14b27f124a528df42d12576a153d Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 20 Sep 2026 13:38:10 +0300 Subject: [PATCH] Fixtures/screenshots tweaks --- .../scanner/components/FixturesPage.tsx | 52 +++++++++++-------- .../scanner/components/ScreenshotPage.tsx | 37 +++++++------ 2 files changed, 51 insertions(+), 38 deletions(-) diff --git a/app/features/scanner/components/FixturesPage.tsx b/app/features/scanner/components/FixturesPage.tsx index f6a0f9b75..a152746ca 100644 --- a/app/features/scanner/components/FixturesPage.tsx +++ b/app/features/scanner/components/FixturesPage.tsx @@ -1,5 +1,7 @@ import clsx from "clsx"; +import { ExternalLink } from "lucide-react"; import { type ReactNode, useEffect, useState } from "react"; +import { SendouButton } from "~/components/elements/Button"; import { useSearchParam } from "~/modules/search-params/hooks"; import { mainWeaponImageUrl, SCANNER_PAGE } from "~/utils/urls"; import type { Roi } from "../core/canonical"; @@ -12,6 +14,7 @@ import { newInspectKey, putInspectFrame } from "../store/inspect"; import styles from "./FixturesPage.module.css"; import { drawNormalizedCanvas } from "./normalized-canvas"; import { formatTimer, RoiCrop } from "./ScreenshotPage"; +import { SessionHeader } from "./SessionHeader"; const FIXTURES_ENDPOINT = "/scanner/fixtures"; /** Filtering down to this many cases opens every card, for one-glance review */ @@ -76,25 +79,27 @@ export function FixturesPage() { return (
-
- setQ(e.target.value)} - placeholder="Narrow by name substring — comma separates alternatives" - /> - - {fixtures - ? `${filtered.length} / ${fixtures.length} fixtures` - : "loading…"} - -
-

- Ground-truth review: check each expected label against its frame. The - filter lives in the URL, so a narrowed selection can be shared as a - link. -

+ +
+ setQ(e.target.value)} + placeholder="Narrow by name substring — comma separates alternatives" + /> + + {fixtures + ? `${filtered.length} / ${fixtures.length} fixtures` + : "loading…"} + +
+

+ Ground-truth review: check each expected label against its frame. The + filter lives in the URL, so a narrowed selection can be shared as a + link. +

+
{error ?

{error}

: null} {[...groups.entries()].map(([detector, group]) => (
@@ -150,9 +155,14 @@ function FixtureCard(props: { fixture: FixtureListItem; autoExpand: boolean }) { {fixture.name} {fixture.expected.event} - + {open ? (
diff --git a/app/features/scanner/components/ScreenshotPage.tsx b/app/features/scanner/components/ScreenshotPage.tsx index b80af6f50..9ed513a80 100644 --- a/app/features/scanner/components/ScreenshotPage.tsx +++ b/app/features/scanner/components/ScreenshotPage.tsx @@ -50,6 +50,7 @@ import { downloadCsv } from "./download"; import { type CardData, downloadExpectedJson } from "./fixture-export"; import { drawNormalizedCanvas } from "./normalized-canvas"; import styles from "./ScreenshotPage.module.css"; +import { SessionHeader } from "./SessionHeader"; type Result = Extract; @@ -528,23 +529,25 @@ export function ScreenshotPage() { return (
- void analyze(file)}> - Drop a frame (PNG/JPEG) here, or{" "} - - {busy ? " — analyzing…" : null} - + + void analyze(file)}> + Drop a frame (PNG/JPEG) here, or{" "} + + {busy ? " — analyzing…" : null} + + {error ?

{error}

: null}