swarm-ui: the agents page is one column of cards that open in place
The roster loses its second column and its table view. Selecting a card opens its details under it as four folded sections: overview, settings, accounts and the terminal. The status, message and wanted rows, which the card header already shows, are gone from the details. The terminal page's details dialog keeps the flat list.
This commit is contained in:
parent
04fcb4ca5c
commit
2eaa02e892
1 changed files with 555 additions and 541 deletions
30
frontend/packages/swarm-ui/test/detail-sections.test.mjs
Normal file
30
frontend/packages/swarm-ui/test/detail-sections.test.mjs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
// The sections an opened agent card holds. Run by `npm test`, which Node runs
|
||||
// with its built-in test runner and type stripping.
|
||||
import assert from "node:assert/strict";
|
||||
import { test } from "node:test";
|
||||
import {
|
||||
SECTION_TITLE,
|
||||
sectionsFor,
|
||||
startsOpen,
|
||||
} from "../src/agent/detail/sections.ts";
|
||||
|
||||
test("a card holds overview, settings and accounts, then the terminal", () => {
|
||||
assert.deepEqual(sectionsFor(true), [
|
||||
"overview",
|
||||
"settings",
|
||||
"accounts",
|
||||
"terminal",
|
||||
]);
|
||||
});
|
||||
|
||||
test("a page beside a terminal leaves the terminal out", () => {
|
||||
assert.deepEqual(sectionsFor(false), ["overview", "settings", "accounts"]);
|
||||
});
|
||||
|
||||
test("only the overview starts open", () => {
|
||||
assert.deepEqual(sectionsFor(true).filter(startsOpen), ["overview"]);
|
||||
});
|
||||
|
||||
test("every section has a header", () => {
|
||||
for (const s of sectionsFor(true)) assert.ok(SECTION_TITLE[s], s);
|
||||
});
|
||||
Loading…
Reference in a new issue