9e98618e5f
Marketing/store screenshots of the console, captured from the built Storybook with headless Chromium (web/tools/screenshots.mjs) — every Pages/* + Shell/* story rendered at 1440x900@2x. The page stories render from fixtures, so no live mgmt API, login, or GPU is needed (the web analogue of apple.yml's screenshots job). Gated to stable release tags in a standalone best-effort workflow; PNGs upload as a 30-day artifact, not committed. - Add Stats + Pairing stories (the two pages that lacked them) with stats/pairing fixtures typed against the generated models. - Extract a pure PairingView (index.tsx -> view.tsx), matching the Dashboard/Clients/Stats split, so the page renders host-free from mock state instead of racing its polling queries. Container wiring is behaviour-identical. - Playwright driver + a chromium-capable tag-gated job. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
import { StatsView } from "@/sections/Stats/view";
|
|
import { captureDetail, captureMetas, statsStatusIdle } from "./lib/fixtures";
|
|
|
|
const noop = () => {};
|
|
const idle = { isLoading: false, error: null, refetch: noop };
|
|
|
|
const meta = {
|
|
title: "Pages/Stats",
|
|
component: StatsView,
|
|
parameters: { layout: "padded" },
|
|
args: {
|
|
onStart: noop,
|
|
onStop: noop,
|
|
onSelect: noop,
|
|
onDownload: noop,
|
|
onDelete: noop,
|
|
isStarting: false,
|
|
isStopping: false,
|
|
isDeleting: false,
|
|
},
|
|
} satisfies Meta<typeof StatsView>;
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
// A finished run open in the detail view: recordings table populated and the full
|
|
// graph set (latency stack · throughput · loss/FEC) rendered from a deterministic
|
|
// fixture series — no live host or capture needed.
|
|
export const Recording: Story = {
|
|
args: {
|
|
status: { data: statsStatusIdle, ...idle },
|
|
live: { data: undefined, ...idle },
|
|
recordings: { data: captureMetas, ...idle },
|
|
detail: { data: captureDetail, ...idle },
|
|
selectedId: captureMetas[0]?.id ?? null,
|
|
},
|
|
};
|
|
|
|
export const Empty: Story = {
|
|
args: {
|
|
status: { data: statsStatusIdle, ...idle },
|
|
live: { data: undefined, ...idle },
|
|
recordings: { data: [], ...idle },
|
|
detail: { data: undefined, ...idle },
|
|
selectedId: null,
|
|
},
|
|
};
|