remove the forge links from the hive dashboard and the agent page
Each agent row on the hive dashboard, and the agent page's link menu, linked to the agent's forge profile and its config repo. Both are gone, with what only they used: - hive-agent no longer builds the two links, the `Forge` link kind, or the `forge_public_url` field of its state, and no longer reads `HIVE_FORGE_PUBLIC_URL`. The agent page's link menu and the dashboard row's icon strip (which skips a forge link an agent not yet rebuilt still sends) drop their forge handling. - hive-c0re's dashboard state no longer carries `forge_public_url`. - `HIVE_FORGE_PUBLIC_URL` is no longer forwarded to agents through the meta flake (the forwarded-variable list, its test fixture, the controller's settings and the VM test), so the next meta flake render differs by that one line. hive-c0re still reads it for the forge URL a hive publishes, so `swarm.forge.publicUrl` stays, with its description corrected. - The docs stop describing the links.
This commit is contained in:
parent
1b6d7f3c99
commit
d516bb890c
1 changed files with 49 additions and 148 deletions
|
|
@ -270,8 +270,7 @@ function containerRowFingerprint(
|
|||
// changed (keyed cache), skipping the build + async dashboard-state
|
||||
// fetch for stable rows.
|
||||
function buildContainerLi(c, opts) {
|
||||
const { pending, opRunning, selected, url, containerBase, forgeBase, s } =
|
||||
opts;
|
||||
const { pending, opRunning, selected, url, containerBase, s } = opts;
|
||||
// A single `pending-running` class covers any active transient
|
||||
// badge state (see the pending-badge derivation comment in
|
||||
// renderContainers).
|
||||
|
|
@ -342,8 +341,7 @@ function buildContainerLi(c, opts) {
|
|||
// `GET /api/dashboard-state` (via gateway when enabled, direct
|
||||
// TCP otherwise). The agent is the single source of truth for its
|
||||
// link list: stats / screen (GUI agents only — c0re's disk-based
|
||||
// fallback cannot detect this) / forge profile / agent-configs /
|
||||
// extras. DOM-built — link strings come from the agent's process
|
||||
// fallback cannot detect this) / extras. DOM-built — link strings come from the agent's process
|
||||
// and must never reach the HTML parser.
|
||||
const navStrip = el("span", { class: "nav-strip" });
|
||||
head.append(navStrip);
|
||||
|
|
@ -363,15 +361,13 @@ function buildContainerLi(c, opts) {
|
|||
// -- nav strip -----------------------------------------------
|
||||
if (Array.isArray(ds.links)) {
|
||||
for (const lnk of ds.links) {
|
||||
// No public forge URL to link to — hide rather than build
|
||||
// a broken/guessed href (see forgeBase above).
|
||||
if (lnk.kind === "forge" && !forgeBase) continue;
|
||||
// An agent not yet rebuilt still sends forge links, which no
|
||||
// page links to any more.
|
||||
if (lnk.kind === "forge") continue;
|
||||
const href =
|
||||
lnk.kind === "forge"
|
||||
? forgeBase + (lnk.url || "")
|
||||
: lnk.kind === "external"
|
||||
? lnk.url || ""
|
||||
: /* container */ containerBase + "/" + (lnk.url || "");
|
||||
lnk.kind === "external"
|
||||
? lnk.url || ""
|
||||
: /* container */ containerBase + "/" + (lnk.url || "");
|
||||
const a = el("a", {
|
||||
class: "nav-link",
|
||||
href,
|
||||
|
|
@ -634,12 +630,6 @@ export function renderContainers(s) {
|
|||
// loopback port while the socket marker is absent). See
|
||||
// `docs/2-handbook/hives/dashboard.md::Container row` + `docs/4-implementation/networking/gateway.md::Vhost map`.
|
||||
const gatewayLinks = !!(s && s.gateway_enabled);
|
||||
// Forge public URL: state.forge_public_url (set by the NixOS module
|
||||
// from services.hyperhive.swarm.forge.publicUrl) or null — never guessed
|
||||
// from "<hostname>:3000". `null` propagates down to
|
||||
// buildContainerLi/buildAgentMenu, which already hide forge links
|
||||
// rather than emit a possibly-wrong one.
|
||||
const forgeBase = (s && s.forge_public_url) || null;
|
||||
const ul = existingUl ?? el("ul", { class: "containers" });
|
||||
const rows = sortedContainerRows(containers);
|
||||
|
||||
|
|
@ -691,7 +681,6 @@ export function renderContainers(s) {
|
|||
selected,
|
||||
url,
|
||||
containerBase,
|
||||
forgeBase,
|
||||
s,
|
||||
});
|
||||
containerRowCache.set(c.name, { el: li, fingerprint: fp });
|
||||
|
|
|
|||
Loading…
Reference in a new issue