diff --git a/frontend/packages/swarm-ui/src/pages/JobsPage.tsx b/frontend/packages/swarm-ui/src/pages/JobsPage.tsx index 2969f9e5..ff00c9a1 100644 --- a/frontend/packages/swarm-ui/src/pages/JobsPage.tsx +++ b/frontend/packages/swarm-ui/src/pages/JobsPage.tsx @@ -22,9 +22,9 @@ import type { ComponentChildren } from "preact"; import { useState } from "preact/hooks"; import { JobqGraph } from "@hive/shared/jobq-graph.js"; import { JobqRollup } from "@hive/shared/jobq-rollup.js"; +import { DisclosureAction } from "../ui/disclosure/DisclosureAction.js"; import { LazyDisclosure } from "../ui/disclosure/LazyDisclosure.js"; import { Skeleton, SkeletonRegion } from "../ui/skeleton/Skeleton.js"; -import { Toolbar } from "../ui/toolbar/Toolbar.js"; import { BuildsCard } from "./builds/BuildsPage.js"; import { ReviewPage } from "./review/ReviewPage.js"; import { @@ -89,13 +89,13 @@ function JobsBody() { return ( <> - + - + - + - +

What the swarm builder built, newest first: agent config PR heads, and the agents it builds from internal/meta before a deploy. How each ended, diff --git a/frontend/packages/swarm-ui/src/pages/swarm/HivesCard.tsx b/frontend/packages/swarm-ui/src/pages/swarm/HivesCard.tsx index bda0b2bd..71a2eb0e 100644 --- a/frontend/packages/swarm-ui/src/pages/swarm/HivesCard.tsx +++ b/frontend/packages/swarm-ui/src/pages/swarm/HivesCard.tsx @@ -17,6 +17,7 @@ import { useState } from "preact/hooks"; import { ApiErrorPanel } from "@hive/shared/api-error-panel.js"; import { Badge, type BadgeTone } from "@hive/shared/badge.js"; import { ExternalLink } from "../../ui/external-link/ExternalLink.js"; +import { DisclosureAction } from "../../ui/disclosure/DisclosureAction.js"; import { LazyDisclosure } from "../../ui/disclosure/LazyDisclosure.js"; import { RelativeTime } from "../../ui/relative-time/RelativeTime.js"; import { @@ -26,7 +27,6 @@ import { import { fetchJson, usePolled } from "../../ui/polled/usePolled.js"; import { Table, type TableColumn } from "../../ui/table/Table.js"; import { TableSkeleton } from "../../ui/table/TableSkeleton.js"; -import { Toolbar } from "../../ui/toolbar/Toolbar.js"; import { domainCell } from "../hive-domain.js"; type Freshness = "fresh" | "stale" | "never_reported" | "unknown"; @@ -125,14 +125,14 @@ function HiveRoster() { return ( <> - + - + {error ? ( — a control for the header row of the disclosure it is in: +// the refresh picker of a card that polls. The body owns the control's state, so +// a body renders it where it needs the state, and it shows in the header, beside +// the chevron, instead of taking a row of the body. It is a sibling of the +// header's toggle, not inside it, so pressing it does not fold the card. A +// disclosure that is shut has no body, so the control is there only while open. +import type { ComponentChildren } from "preact"; +import "./DisclosureAction.css"; + +export function DisclosureAction({ + children, +}: { + children: ComponentChildren; +}) { + return

{children}
; +}