From 46f1f3cbdbf77b19fa178608ccfeb31c42be783c Mon Sep 17 00:00:00 2001 From: atlas Date: Fri, 2 Oct 2026 13:19:35 +0200 Subject: [PATCH] docs: point matrix GUI comments at the swarm UI, drop the M4TR1X tab The previous commit removed dashboard.md's M4TR1X section. These comments and the `deploy.matrix.gui.enable` option description still described a hive-dashboard M4TR1X tab or cited that section. They now state what the option does: it serves the client on the gateway vhost and adds the swarm UI's Matrix quick link (docs/swarm/ui.md::Quick links). Refs #3902 --- frontend/packages/dashboard/src/dashboard.html | 10 +++++----- hive-c0re/src/dashboard/state_snapshot.rs | 11 +++++------ nix/host-modules/hive-c0re/environment.nix | 7 +++---- nix/host-modules/hive-matrix.nix | 14 ++++++-------- 4 files changed, 19 insertions(+), 23 deletions(-) diff --git a/frontend/packages/dashboard/src/dashboard.html b/frontend/packages/dashboard/src/dashboard.html index 06925f31..c7e128ea 100644 --- a/frontend/packages/dashboard/src/dashboard.html +++ b/frontend/packages/dashboard/src/dashboard.html @@ -91,11 +91,11 @@ - + diff --git a/hive-c0re/src/dashboard/state_snapshot.rs b/hive-c0re/src/dashboard/state_snapshot.rs index 95239cca..7e2d816c 100644 --- a/hive-c0re/src/dashboard/state_snapshot.rs +++ b/hive-c0re/src/dashboard/state_snapshot.rs @@ -73,12 +73,11 @@ pub(super) struct StateSnapshot { /// links each container's config + each approval's commit into the /// forge's `agent-configs` repos. forge_present: bool, - /// Whether the matrix GUI is reachable at `/matrix/`. Sourced from - /// `HIVE_MATRIX_GUI_ENABLED` env var (set by the c0re NixOS module - /// when `services.hyperhive.deploy.matrix.gui.enable` is on). The gateway - /// (`nix/host-modules/hive-gateway/vhosts.nix`) does the actual `/matrix/` static serving; - /// this flag is just an availability signal for iris's dashboard - /// chrome so the `M4TR1X →` tab doesn't flash when the GUI is off. + /// Whether `services.hyperhive.deploy.matrix.gui.enable` is on. Sourced + /// from the `HIVE_MATRIX_GUI_ENABLED` env var the c0re NixOS module + /// sets. The matrix client itself is served on the homeserver's + /// gateway vhost; the hive's `/matrix/` path redirects there + /// (`nix/host-modules/hive-gateway/vhosts.nix`). matrix_gui_enabled: bool, /// Whether `hive-gateway` is in front of this dashboard. Sourced /// from the `HIVE_GATEWAY_ENABLED` env var, which the c0re NixOS diff --git a/nix/host-modules/hive-c0re/environment.nix b/nix/host-modules/hive-c0re/environment.nix index 33045847..329d3b09 100644 --- a/nix/host-modules/hive-c0re/environment.nix +++ b/nix/host-modules/hive-c0re/environment.nix @@ -192,10 +192,9 @@ in HIVE_MATRIX_API_URL = config.services.hyperhive.swarm.matrix.apiUrl; } // lib.optionalAttrs config.services.hyperhive.deploy.matrix.gui.enable { - # Availability flags read by the dashboard's `/api/state`. - # Matrix GUI lives entirely on the gateway nginx (matrix tab - # only shows when both flags are on). Gateway routing detail: - # docs/networking/gateway.md::Vhost map. + # Surfaces as `matrix_gui_enabled` in the dashboard's `/api/state`. + # The matrix GUI is served entirely by the gateway nginx. Gateway + # routing detail: docs/networking/gateway.md::Vhost map. HIVE_MATRIX_GUI_ENABLED = "1"; } // { diff --git a/nix/host-modules/hive-matrix.nix b/nix/host-modules/hive-matrix.nix index 0fc0abcc..bcb767f5 100644 --- a/nix/host-modules/hive-matrix.nix +++ b/nix/host-modules/hive-matrix.nix @@ -543,8 +543,9 @@ in defaultText = lib.literalExpression "config.services.hyperhive.deploy.matrix.enable"; description = '' Serve a matrix web client at `gatewayHost`'s vhost (`chat.` - by default). Requires `gatewayHost != null`; the gateway itself always runs. When - off, the dashboard's `M4TR1X →` tab is hidden. See + by default) and add the swarm UI's **Matrix** quick link to it + (`services.hyperhive.swarm.controller.links`). Requires + `gatewayHost != null`; the gateway itself always runs. See `docs/networking/gateway.md` for the discovery flow that lets clients auto-find the sub-domain. The client build itself is `deploy.matrix.gui.package` — which client, as opposed to whether @@ -668,12 +669,9 @@ in # This swarm-ui quick-links entry. Gated on `gui.enable` too, not just # `gatewayHost != null`: `/` on that vhost only serves fluffychat - # (below) when the GUI is on — otherwise the link would 404. Same - # `gatewayHost && gui.enable` condition the removed hive-dashboard - # H0M3 tile used to check via `state.matrix_gui_enabled` before this - # link became the only way in (docs/web-ui/dashboard.md::M4TR1X - # page). See `services.hyperhive.swarm.controller.links`'s - # description. + # (below) when the GUI is on — otherwise the link would 404. See + # docs/swarm/ui.md::Quick links and + # `services.hyperhive.swarm.controller.links`'s description. services.hyperhive.swarm.controller.links = lib.optional (cfg.gatewayHost != null && deployCfg.matrix.gui.enable) {