The details pane showed the agent's name, then status, message and wanted rows with no card, then a folded status section repeating the state, and a single settings section of eleven rows of different kinds. The pane now opens with one identity card: icon and name, the wanted menu, badges for freshness, turn state, context and a needed login, the whole status message, and the hive, links and config PR. Below it the folded sections answer one question each: terminal, activity (todos, subagents and background tasks together), instructions, inference (which now holds the claude login and API key), access, and accounts. The terminal page's popover shows the card without the name and the four settings sections.
37 lines
983 B
JavaScript
37 lines
983 B
JavaScript
// The sections an agent's details hold. 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("the details hold the terminal, the activity, then one section per question", () => {
|
|
assert.deepEqual(sectionsFor(true), [
|
|
"terminal",
|
|
"activity",
|
|
"instructions",
|
|
"inference",
|
|
"access",
|
|
"accounts",
|
|
]);
|
|
});
|
|
|
|
test("a page beside a terminal leaves the terminal and the activity out", () => {
|
|
assert.deepEqual(sectionsFor(false), [
|
|
"instructions",
|
|
"inference",
|
|
"access",
|
|
"accounts",
|
|
]);
|
|
});
|
|
|
|
test("only the terminal starts open", () => {
|
|
assert.deepEqual(sectionsFor(true).filter(startsOpen), ["terminal"]);
|
|
});
|
|
|
|
test("every section has a header", () => {
|
|
for (const s of sectionsFor(true)) assert.ok(SECTION_TITLE[s], s);
|
|
});
|