Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: a review try-out page

A page to try a review classification against a real PR: repo, PR number and one or more classifications (name, description, polarity, threshold). Run posts to the controller's try-out endpoint and polls until the run is done or failed, saying it is running meanwhile, then shows the review's table, the overall verdict and the head commit. A row that could not run shows its error in place of a reason, and a failed run shows its error. The inputs stay so the run can be edited and repeated. Nothing is stored and nothing is posted to the forge. Route, nav entry and a section in docs/swarm/ui.md.
This commit is contained in:
iris 2026-10-12 01:05:34 +02:00 • committed by mara
commit b67517e41b

View file

@ -0,0 +1,66 @@
/* The form panel and the result panel under it, apart from each other. */
.ui-tryout-page {
display: flex;
flex-direction: column;
gap: 1em;
}
/* The try-out form: the repo and PR on one line, then one block per
classification, then the actions. */
.ui-tryout-form {
display: flex;
flex-direction: column;
gap: 1em;
margin-top: 1em;
}
.ui-tryout-target {
display: flex;
flex-wrap: wrap;
gap: 0.75em;
}
.ui-tryout-target > * {
flex: 1 1 14em;
}
.ui-tryout-classification {
display: flex;
flex-direction: column;
gap: 0.6em;
padding: 0.75em;
border: 1px solid var(--border);
border-radius: 0.5em;
}
.ui-tryout-classification-row {
display: flex;
flex-wrap: wrap;
align-items: flex-end;
gap: 0.75em;
}
.ui-tryout-classification-row > * {
flex: 1 1 12em;
}
.ui-tryout-classification-row > button {
flex: none;
}
.ui-tryout-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.75em;
}
.ui-tryout-hint {
margin: 0;
color: var(--muted);
}
.ui-tryout-running {
margin: 0;
color: var(--muted);
}
.ui-tryout-row-error {
color: var(--red);
}
.ui-tryout-overall,
.ui-tryout-sha {
margin: 0.75em 0 0;
}
.ui-tryout-sha {
color: var(--muted);
}