Watch
0
0
Fork
You've already forked hyperhive
0

deploy the closure the swarm declares, read no forge head, drop the update badge

This commit is contained in:
atlas 2026-11-01 23:56:40 +01:00 • committed by mara
commit 47c2acb640
2 changed files with 647 additions and 2001 deletions

View file

@ -72,7 +72,7 @@ class HiveAgentMenu extends HTMLElement {
// first, doubling the dropdown.
if (this._menu) return;
const { c, forgeBase } = this._opts || {};
const { c } = this._opts || {};
const btn = el(
"button",
@ -206,24 +206,6 @@ class HiveAgentMenu extends HTMLElement {
}),
);
if (c.deployed_sha && forgeBase) {
const li = el("li", { role: "presentation" });
const a = el(
"a",
{
class: "agent-menu-item",
href: `${forgeBase}/agent-configs/${encodeURIComponent(c.name)}/commit/${c.deployed_sha}`,
target: "_blank",
rel: "noopener",
role: "menuitem",
title: "deployed config commit on forge",
},
`deployed:${c.deployed_sha} ↗`,
);
li.append(a);
dropdown.append(menuSep(), li);
}
this._menu = document.createElement("hive-menu");
this._menu._opts = { trigger: btn, content: dropdown };
this.append(this._menu);

View file

@ -196,9 +196,9 @@ document.addEventListener("click", (e) => {
// wrapper matching <hive-dialog>'s `._opts`-before-append convention,
// since a custom element created via `document.createElement` can't
// take constructor args.
function buildAgentMenu(c, forgeBase) {
function buildAgentMenu(c) {
const menu = document.createElement("hive-agent-menu");
menu._opts = { c, forgeBase };
menu._opts = { c };
return menu;
}
@ -255,7 +255,6 @@ function containerRowFingerprint(
failed: c.failed,
paused: c.paused,
needs_login: c.needs_login,
needs_update: c.needs_update,
active_model: c.active_model,
port: c.port,
pending,
@ -545,19 +544,6 @@ function buildContainerLi(c, opts) {
),
);
}
if (c.needs_update) {
head.append(
form(
"/api/rebuild/" + c.name,
"hive-pill-sm badge-warn btn-inline",
"needs update ↻",
"rebuild " + c.name + "? hot-reloads the container.",
{},
{ noRefresh: true },
),
);
}
if (c.active_model) {
head.append(
el(
@ -579,7 +565,7 @@ function buildContainerLi(c, opts) {
// chip in the head row stays — it's a state-hint, not an
// action button.
li.append(icon, body, buildAgentMenu(c, forgeBase));
li.append(icon, body, buildAgentMenu(c));
return li;
}
@ -601,7 +587,6 @@ export function renderContainers(s) {
// tree builder handles the ordering — we don't pre-sort here.
const containers = Array.from(containersState.values());
const portConflicts = derivePortConflicts(containers);
const anyStale = containers.some((c) => c.needs_update);
// Preserve the keyed container list across the header-section
// rebuild. We wipe the banners/buttons above the list on every
@ -627,19 +612,6 @@ export function renderContainers(s) {
root.append(banner);
}
if (anyStale) {
root.append(
form(
"/api/update-all",
"btn-rebuild",
"↻ UPD4TE 4LL",
"rebuild every stale container?",
{},
{ noRefresh: true },
),
);
}
// Queue-summary banner: see initJobqRollup, above.
if (!containers.length && !transientsState.size) {