dashboard: the SW4RM tab is the agents tab
The swarm lives in the swarm UI; this tab lists the hive's agents. The tab is 4G3NTS at #agents, its pane and count pill follow, and the module that renders the containers is agents.js. Comments and docs that named SW4RM or swarm.js follow.
This commit is contained in:
parent
ee5c057d8f
commit
e455964cb3
16 changed files with 70 additions and 69 deletions
|
|
@ -21,7 +21,7 @@
|
|||
// widening from the old per-agent-menu-only coordination) so
|
||||
// `closeAll()` can close each via its own `.close()`. `closeAllMenus()`
|
||||
// force-closes everything before tearing down DOM one might anchor off
|
||||
// of (e.g. swarm.js before replacing the container tree).
|
||||
// of (e.g. agents.js before replacing the container tree).
|
||||
//
|
||||
// The document-level listeners below, registered once: shadow-DOM
|
||||
// retargeting means `e.target` for a click inside a shadow tree gets
|
||||
|
|
@ -58,7 +58,7 @@ document.addEventListener(
|
|||
true,
|
||||
);
|
||||
// Close on Escape. stopImmediatePropagation so a caller's own
|
||||
// selection-clear Escape handler (e.g. swarm.js's) doesn't also fire
|
||||
// selection-clear Escape handler (e.g. agents.js's) doesn't also fire
|
||||
// while a menu is open.
|
||||
document.addEventListener(
|
||||
"keydown",
|
||||
|
|
@ -76,7 +76,7 @@ class HiveMenu extends HTMLElement {
|
|||
// A custom element's connectedCallback fires again on a same-document
|
||||
// *move* (insertBefore/append repositioning an already-connected node
|
||||
// runs the removal + insertion steps for its whole subtree), not just
|
||||
// on a fresh mount — swarm.js's row-fingerprint cache reuses/reorders
|
||||
// on a fresh mount — agents.js's row-fingerprint cache reuses/reorders
|
||||
// existing <li> subtrees, which can move an already-initialised
|
||||
// <hive-menu> without ever detaching it from the document. Guard
|
||||
// against re-running setup (attachShadow throws if the host already
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// hive-warn.js — <hive-warn>, the shared inline warning-banner
|
||||
// component. Consolidates what were independently-written instances of
|
||||
// the same thing, among them `.tombstone-warn` (core.js, JS-built) and
|
||||
// `.port-conflict` (swarm.js, JS-built) — some differed only by an
|
||||
// `.port-conflict` (agents.js, JS-built) — some differed only by an
|
||||
// undeliberate 10% vs 8% tint, the strongest evidence this was drift,
|
||||
// not genuinely different needs.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// JobqRollup.tsx — <JobqRollup>, a compact one-line banner over
|
||||
// GET .../api/jobq/rollup's pre-tallied `Vec<hive_jobq_wire::StateCount>`
|
||||
// (any endpoint serving that shape works — hive-c0re and swarm-controller
|
||||
// both do). Extracted out of dashboard/src/swarm.js's hand-rolled
|
||||
// both do). Extracted out of dashboard/src/agents.js's hand-rolled
|
||||
// queue-summary banner, which this component now replaces there too —
|
||||
// same "one shared component, not two parallel implementations" pattern
|
||||
// `JobqGraph` already established for the rebuild-queue tree view.
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
//
|
||||
// JSX (swarm-ui) — `<JobqRollup endpoint="..." queueHref="..." />`. Or
|
||||
// plain `render(h(JobqRollup, props), container)` (dashboard/src/
|
||||
// swarm.js, no JSX pragma needed) — call again with a bumped
|
||||
// agents.js, no JSX pragma needed) — call again with a bumped
|
||||
// `refreshToken` to force a refetch. No mount wrapper: `render` is
|
||||
// already the re-render/diff entry point.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue