Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: match the try-out page to the backend's limits

The repo check takes the endpoint's own character set and refuses . and .. parts. The running and expired messages say a run can last up to half an hour and that a controller restart drops the result.
This commit is contained in:
iris 2026-10-12 04:37:48 +02:00 • committed by mara
commit c5b66dc5a0

View file

@ -31,9 +31,9 @@ import "./ReviewTryOutPage.css";
const TRY_OUT = "/api/review-classifier/try-out";
const POLL_MS = 2000;
// More classifications than this are not offered a row. Keep it in step with
// the try-out endpoint's own cap, which answers a longer list with a 400 that
// the page shows as it is; the backend has no way to report it yet.
// More classifications than this are not offered a row. It is the try-out
// endpoint's own cap, which answers a longer list with a 400 that the page
// shows as it is.
const MAX_CLASSIFICATIONS = 10;
let nextKey = 0;
@ -88,7 +88,8 @@ export function ReviewTryOutPage() {
if (cancelled) return;
if (res.status === 404) {
stop({
detail: "the result expired before it was read: run it again",
detail:
"the result is gone, because it expired or the controller restarted: run it again",
});
return;
}
@ -214,7 +215,8 @@ export function ReviewTryOutPage() {
<Panel title="result" icon="📋">
{running ? (
<p class="ui-tryout-running" role="status">
Running — a run takes a minute or more ({elapsed}s so far).
Running — a run takes a minute or more, and up to half an hour for
a long list ({elapsed}s so far).
</p>
) : null}
{error ? (