Watch
0
0
Fork
You've already forked hyperhive
0

swarm ui: one review page

The two review tabs, runs and try-out, are one: /review. It is a column of
three sections: try a classification and the classifier settings, each a
folded bar (the settings' bar says what they are now), then the recent runs,
always open. The settings had been pinned under the try-out form; they are now
a section of their own. A new Disclosure primitive is the folding bar, a
native details wearing the Panel's classes, so the folded and open sections
read as the same surface.

/review-runs and /review-tryout are gone, with no redirect.
This commit is contained in:
iris 2026-10-14 21:57:23 +02:00 • committed by mara
commit a68d73fa74
2 changed files with 223 additions and 45 deletions

View file

@ -1,8 +1,8 @@
// <ReviewRunsPage> — the review classifier's recent runs, newest first
// <ReviewRuns> — the review classifier's recent runs, newest first
// (`docs/swarm/review-classifier.md`, "Recent runs"): which PRs it ran on,
// what it answered, and which runs failed or were turned away. One card per
// run; selecting a card expands it to the same result table the try-out page
// shows. Reads `GET /api/review-classifier/runs`. The page stores nothing and
// run; selecting a card expands it to the same result table the try-out
// shows. Reads `GET /api/review-classifier/runs`. This section stores nothing and
// posts nothing, and shows no token counts, cache counts or cost.
import { useState } from "preact/hooks";
import { ApiErrorPanel } from "@hive/shared/api-error-panel.js";
@ -25,7 +25,7 @@ import {
durationLabel,
type ClassifierRun,
} from "./RunsTypes.js";
import "./ReviewRunsPage.css";
import "./ReviewRuns.css";
const RUNS = "/api/review-classifier/runs";
const DEFAULT_INTERVAL_MS: RefreshIntervalMs = 30_000;
@ -91,7 +91,7 @@ function RunCard({
);
}
export function ReviewRunsPage() {
export function ReviewRuns() {
const [intervalMs, setIntervalMs] =
useState<RefreshIntervalMs>(DEFAULT_INTERVAL_MS);
const [runs, setRuns] = useState<ClassifierRun[] | null>(null);
@ -126,7 +126,7 @@ export function ReviewRunsPage() {
return (
<Panel
title="review runs"
title="recent runs"
icon="📜"
actions={
<RefreshIntervalPicker