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:
parent
7b1435eaea
commit
a68d73fa74
19 changed files with 223 additions and 45 deletions
|
|
@ -33,7 +33,7 @@ test("a terminal path with extra segments is not full-bleed", () => {
|
|||
});
|
||||
|
||||
test("the wide-body routes are exactly the table pages", () => {
|
||||
for (const path of ["/issues", "/agents", "/review-runs", "/review-tryout"]) {
|
||||
for (const path of ["/issues", "/agents", "/review"]) {
|
||||
assert.equal(isWideBodyRoute(path), true, path);
|
||||
}
|
||||
for (const path of ["/", "/jobs", "/schedules", "/components"]) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import {
|
|||
maxValue,
|
||||
priceValue,
|
||||
settingsProblem,
|
||||
settingsSummary,
|
||||
toSettings,
|
||||
} from "../src/pages/review-settings/SettingsTypes.ts";
|
||||
|
||||
|
|
@ -117,3 +118,29 @@ test("the reviews limit and a price parse as the form needs", () => {
|
|||
assert.equal(priceValue("-1"), null);
|
||||
assert.equal(priceValue("1e3"), null);
|
||||
});
|
||||
|
||||
test("the summary names the runtime, model and how many run at once", () => {
|
||||
assert.equal(settingsSummary(apiKey), "api-key · haiku · 2 at once");
|
||||
});
|
||||
|
||||
test("the summary names an effort when one is set", () => {
|
||||
assert.equal(
|
||||
settingsSummary({ ...apiKey, effort: "high" }),
|
||||
"api-key · haiku · high effort · 2 at once",
|
||||
);
|
||||
});
|
||||
|
||||
test("under ACP the summary names the provider's model, not the claude one", () => {
|
||||
assert.equal(
|
||||
settingsSummary({
|
||||
...apiKey,
|
||||
runtime: "acp",
|
||||
acp: {
|
||||
base_url: "http://x",
|
||||
model: "glm",
|
||||
prices: { input: 1, output: 2 },
|
||||
},
|
||||
}),
|
||||
"acp · glm · 2 at once",
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue