From 986b3df9b0f201d4f23101dbf281b4abd4758dae Mon Sep 17 00:00:00 2001 From: iris Date: Wed, 10 Jun 2026 13:13:32 +0200 Subject: [PATCH] feat(frontend): add forge link tile to H0M3 hub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit H0M3 had tiles for every operator surface except the forge. Add a Forge tile that links straight to the hive-forge web UI. It mirrors the Matrix tile's gating: hidden by default, revealed by home.js only when state.forge_present is true, with the href filled from state.forge_public_url (the gateway-served vhost) or the direct :3000 port fallback — the same precedence the dashboard uses for forge links. Operators without a forge never see a dead link. --- frontend/packages/dashboard/src/home.js | 12 ++++++++++++ frontend/packages/dashboard/src/index.html | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/frontend/packages/dashboard/src/home.js b/frontend/packages/dashboard/src/home.js index 95112e4b..2e216ce0 100644 --- a/frontend/packages/dashboard/src/home.js +++ b/frontend/packages/dashboard/src/home.js @@ -27,6 +27,18 @@ async function init() { if (tile) tile.hidden = false; } + // Forge tile: reveal + point at the live forge only when the + // hive-forge container is up. Prefer the gateway-served public URL + // (set when forge.behindGateway=true), fall back to the direct :3000 + // port — same precedence the dashboard uses for forge links. + if (state.forge_present) { + const tile = $('home-tile-forge'); + if (tile) { + tile.href = state.forge_public_url || `http://${location.hostname}:3000`; + tile.hidden = false; + } + } + const ident = $('hive-identity'); if (ident && (state.swarm_name || state.hive_name)) { const parts = [state.swarm_name, state.hive_name].filter(Boolean); diff --git a/frontend/packages/dashboard/src/index.html b/frontend/packages/dashboard/src/index.html index 669b40a1..64021b66 100644 --- a/frontend/packages/dashboard/src/index.html +++ b/frontend/packages/dashboard/src/index.html @@ -68,6 +68,18 @@ operator-local prefs · browser notifications + + +