swarm.js: drop the queue-summary banner rather than ship it on an interim jobq fetch
mara, on the already-approved PR: "dont replace one legacy thing with another. then we will have to either wait with this pr or split it into what can and cannot be done now." Splitting: the transients-only per-agent badge fix is real, correct, and fixes a live regression (the old DagView fields it read no longer exist) — nothing about it depends on job-queue data at all, so it ships as-is. The queue-summary banner is the part that doesn't belong in this shape: it was reading GET /api/jobq/graph directly and deriving counts client-side as an interim stand-in for the dedicated rollup endpoint mara separately asked for — exactly the kind of stopgap-on-a-stopgap her comment is calling out, since the endpoint that should serve it doesn't exist on main yet. Removes jobqNodesState, refreshJobqGraph(), the rebuild_queue_changed SSE subscription, and the banner's render block from swarm.js/tabs.js entirely — swarm.js now reads no job-queue state of any kind, fully satisfying "swarm.js should not need to pull in the jobq to do its job." The banner comes back once the rollup endpoint (hyperhive#2985's follow-up) exists, reading that directly instead of the full graph. Until then the per-agent transient pills still show what's actually running on each card; only the hive-wide "N running / M queued" summary line is temporarily gone. CSS classes for the banner (.queue-summary/.queue-summary-link) kept in dashboard.css rather than deleted-then-restored — commented as currently unused, expected to come back unchanged. docs/web-ui/dashboard.md updated to match (Container-row pending- badge section, the removed Build-queue-summary-banner section, and the BU1LDS-page note that used to describe SW4RM's now-removed parallel fetch).
This commit is contained in:
parent
7b05656e17
commit
40cc115a0a
4 changed files with 69 additions and 125 deletions
|
|
@ -42,8 +42,8 @@ import {
|
|||
renderQuestions, activeQuestionCount,
|
||||
} from './call.js';
|
||||
import {
|
||||
refreshJobqGraph, syncTransientsFromSnapshot,
|
||||
applyRebuildQueueChanged, applyContainerStateChanged, applyContainerRemoved,
|
||||
syncTransientsFromSnapshot,
|
||||
applyContainerStateChanged, applyContainerRemoved,
|
||||
applyTransientSet, applyTransientCleared,
|
||||
renderContainers, renderContainersFromState,
|
||||
renderSelectionBar, renderPeerHives,
|
||||
|
|
@ -234,15 +234,6 @@ window.marked = marked;
|
|||
// `transientsState` + `containersState`, not from `s.*`).
|
||||
syncTransientsFromSnapshot(s);
|
||||
syncContainersFromSnapshot(s);
|
||||
// Job-queue graph feeds only the SW4RM queue-summary banner now
|
||||
// (per-agent card badges are transient-only — see swarm.js); its
|
||||
// own detailed view lives on /builds.html. Self-fetches GET
|
||||
// /api/jobq/graph — not read off `s` (this page's snapshot
|
||||
// carries no jobq field) — fire-and-forget: renderContainers
|
||||
// below runs off whatever jobqNodesState already holds, and
|
||||
// refreshJobqGraph's own re-render catches up once the fetch
|
||||
// resolves.
|
||||
refreshJobqGraph();
|
||||
renderContainers(s);
|
||||
// Sync the derived approvals + questions stores from the
|
||||
// snapshot, then render. Live `*_added` / `*_resolved` events
|
||||
|
|
@ -313,10 +304,10 @@ window.marked = marked;
|
|||
container_removed: applyContainerRemoved,
|
||||
// tombstones_changed / meta_inputs_changed / meta_update_running are
|
||||
// handled on /core.html now (the SYST3M panels moved there).
|
||||
// rebuild_queue_changed stays: it refreshes the SW4RM queue-summary
|
||||
// banner (see swarm.js — the per-agent badges it fed too, before
|
||||
// mara's "only show what is running" ask, are transient-only now).
|
||||
rebuild_queue_changed: applyRebuildQueueChanged,
|
||||
// rebuild_queue_changed: this page no longer subscribes to it at
|
||||
// all (see swarm.js's transients-section comment) — the SW4RM tab
|
||||
// has nothing left that reads it, unlike /builds.html which still
|
||||
// does (its own separate subscription).
|
||||
schedules_changed: applySchedulesChanged,
|
||||
capabilities_changed: applyCapabilitiesChanged,
|
||||
tool_groups_changed: applyToolGroupsChanged,
|
||||
|
|
@ -338,7 +329,7 @@ window.marked = marked;
|
|||
const es = openStream(
|
||||
'/api/dashboard/stream?kinds=sent,approval_added,approval_resolved,' +
|
||||
'question_added,question_resolved,transient_set,transient_cleared,' +
|
||||
'container_state_changed,container_removed,rebuild_queue_changed,' +
|
||||
'container_state_changed,container_removed,' +
|
||||
'schedules_changed,capabilities_changed,tool_groups_changed',
|
||||
);
|
||||
es.onmessage = (e) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue