feat(ui): three-page console SPA on @unom/ui + the kit's react helpers
CI / build (push) Successful in 31s
CI / exporter (push) Successful in 12s
CI / publish (push) Successful in 22s

Overview (exporter health, Playnite version, counts, sync, live SSE activity,
and a first-run panel that names the exact ingest path the .pext writes to),
Library (covers + per-game include toggles + why-not-synced), Settings
(filters, art delivery, sync cadence, paths).

Data layer is AtomHttpApi atoms derived from the shared contract; the whole
thing runs with zero host against an in-browser mock transport with four
scenarios, and Storybook renders the real pages on the same fixtures. CI now
asserts the production bundle carries no fixture strings.

Also: CI rebuilt for the workspace layout (one root install, per-package
typecheck, publish from plugin/ on a v* tag) with the exporter job and
`publish: needs [build, exporter]` unchanged; README rewritten around the three
workspaces, with the ingest inbox explained as the load-bearing mechanism it is.
This commit is contained in:
2026-07-20 21:05:04 +02:00
parent b81e03685a
commit e8acf922de
33 changed files with 2328 additions and 46 deletions
+65
View File
@@ -0,0 +1,65 @@
// Storybook renders the REAL pages on the mock transport: the static import below
// registers the fixture HttpClient layer + status ticker (Storybook bundles are never
// shipped, so fixtures in them are fine), and the decorator gives every story a fresh
// atom registry seeded with mock mode + the story's scenario.
import "../src/styles.css";
import "../src/mocks/http";
import { RegistryProvider } from "@effect/atom-react";
import { definePreview } from "@storybook/react-vite";
import { useEffect } from "react";
import {
apiModeAtom,
type Scenario,
scenarioAtom,
} from "../src/mocks/scenario";
export default definePreview({
addons: [],
// The console pins dark; default the canvas to dark with a toolbar light switch.
initialGlobals: { theme: "dark" },
globalTypes: {
theme: {
description: "Light/dark color scheme",
toolbar: {
title: "Theme",
icon: "circlehollow",
items: [
{ value: "dark", icon: "moon", title: "Dark" },
{ value: "light", icon: "sun", title: "Light" },
],
dynamicTitle: true,
},
},
},
decorators: [
(Story, context) => {
const dark = (context.globals.theme as string) !== "light";
const scenario =
(context.parameters.scenario as Scenario | undefined) ?? "healthy";
const fullscreen = context.parameters.layout === "fullscreen";
// Mirror `.dark` onto <html> so portal-mounted content (selects, dialogs,
// toasts) picks up the palette — the theme keys everything off `html.dark`.
useEffect(() => {
document.documentElement.classList.toggle("dark", dark);
}, [dark]);
return (
<RegistryProvider
key={`${scenario}-${dark}`}
initialValues={[
[apiModeAtom, "mock"],
[scenarioAtom, scenario],
]}
>
<div
className={`min-h-screen bg-background text-foreground ${fullscreen ? "" : "p-6"}`}
>
<Story />
</div>
</RegistryProvider>
);
},
],
parameters: {
layout: "padded",
},
});