Adds an `icon` prop to Panel (small emoji glyph left of the title, aria-hidden, chosen per panel with no default) and wires it into every current Panel caller: hives (bee), create-agent's form (robot) and info panel (identity card, moved off the info panel's body copy where it started as a one-off), jobs (puzzle piece), the components gallery itself (toolbox), and the 404 page (compass). Adds a components-page demo section and a whimsy-section pointer in the design guide. Closes: #3508
26 lines
1.2 KiB
TypeScript
26 lines
1.2 KiB
TypeScript
// <JobsPage> — the swarm-level job graph. Reuses the shared JobqGraph
|
|
// component (originally built for the per-hive dashboard's rebuild
|
|
// queue) pointed at swarm-controller's own GET /api/jobq/graph instead
|
|
// of hive-c0re's — same wire shape (Vec<hive_jobq_wire::GraphNode>),
|
|
// different endpoint, no component fork. swarm-controller's graph has
|
|
// no real node kinds wired in yet (see swarm-controller/src/main.rs's
|
|
// SwarmNodeKind/SwarmResourceKind), so this renders an empty tree today
|
|
// — the page exists so the wiring is in place before the first real
|
|
// swarm-level job (e.g. CreateAgent) lands.
|
|
//
|
|
// JobqRollup sits above the graph, same "N running / M queued" banner
|
|
// the dashboard's SW4RM tab shows — no `queueHref`, since a "view
|
|
// queue →" link back to this same page would be noise.
|
|
import { JobqGraph } from '@hive/shared/jobq-graph.js';
|
|
import { JobqRollup } from '@hive/shared/jobq-rollup.js';
|
|
import { Panel } from '../ui/panel/Panel.js';
|
|
import './JobsPage.css';
|
|
|
|
export function JobsPage() {
|
|
return (
|
|
<Panel title="jobs" icon="🧩">
|
|
<JobqRollup endpoint="/api/jobq/rollup" />
|
|
<JobqGraph endpoint="/api/jobq/graph" />
|
|
</Panel>
|
|
);
|
|
}
|