Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: the review try-out page shows and changes the review classifier's settings

A classifier settings panel under the try-out form reads and saves the model,
effort and how many requested reviews run at once through the settings route.
A save replaces all three; a refused one shows the route's reason and leaves
the form as typed. There is no API key field.
This commit is contained in:
iris 2026-10-12 20:04:15 +02:00 • committed by mara
commit baf282131f

View file

@ -13,10 +13,13 @@
// **load the repo's rules** fills the rows from the rules on the repo's default
// branch (`GET /api/review-classifier/rules`), to run as they are or to edit.
//
// Under the form, the classifier's own settings: its model, effort and review
// concurrency (`ClassifierSettings`).
//
// The inputs stay as typed after a run, so the operator can edit and run
// again. The page keeps nothing you typed and no result, and posts nothing to
// the forge; the only thing the browser remembers is the result table's
// column filters, as for every table in the UI.
// again. Apart from the settings, the page keeps nothing you typed and no
// result, and posts nothing to the forge; the only thing the browser remembers
// is the result table's column filters, as for every table in the UI.
import { useEffect, useState } from "preact/hooks";
import { ApiErrorPanel } from "@hive/shared/api-error-panel.js";
import { readApiError, type ProblemDetails } from "@hive/shared/api-error.js";
@ -24,6 +27,7 @@ import { Button } from "../../ui/button/Button.js";
import { ConfirmDialog } from "../../ui/confirm-dialog/ConfirmDialog.js";
import { Panel } from "../../ui/panel/Panel.js";
import { TextField } from "../../ui/text-field/TextField.js";
import { ClassifierSettings } from "../review-settings/ClassifierSettings.js";
import { ClassificationEditor } from "./ClassificationEditor.js";
import { TryOutResult } from "./TryOutResult.js";
import {
@ -399,6 +403,7 @@ export function ReviewTryOutPage() {
{result?.state === "done" ? <TryOutResult result={result} /> : null}
</Panel>
) : null}
<ClassifierSettings />
</div>
);
}