From d5009cd17541c60cb6343211e31e7bdfbbbd3cb3 Mon Sep 17 00:00:00 2001 From: iris Date: Thu, 21 May 2026 18:58:05 +0200 Subject: [PATCH] dashboard: add favicon (hyperhive mark) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The main dashboard had no favicon — PR #145 added them to the per-agent pages but missed hive-c0re's index. Serve branding/ hyperhive.svg at /favicon.svg and declare it in the index head. The dashboard represents the whole hive, so it uses the project mark (per-agent pages keep their own configurable /icon). closes #173 --- hive-c0re/assets/index.html | 1 + hive-c0re/src/dashboard.rs | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/hive-c0re/assets/index.html b/hive-c0re/assets/index.html index 605e347..25fdbd5 100644 --- a/hive-c0re/assets/index.html +++ b/hive-c0re/assets/index.html @@ -3,6 +3,7 @@ hyperhive // h1ve-c0re + diff --git a/hive-c0re/src/dashboard.rs b/hive-c0re/src/dashboard.rs index 599251c..f7f9aba 100644 --- a/hive-c0re/src/dashboard.rs +++ b/hive-c0re/src/dashboard.rs @@ -41,6 +41,7 @@ pub async fn serve(port: u16, coord: Arc) -> Result<()> { .route("/", get(serve_index)) .route("/static/dashboard.css", get(serve_css)) .route("/static/app.js", get(serve_app_js)) + .route("/favicon.svg", get(serve_favicon)) .route("/api/state", get(api_state)) .route("/approve/{id}", post(post_approve)) .route("/deny/{id}", post(post_deny)) @@ -140,6 +141,16 @@ async fn serve_app_js() -> impl IntoResponse { ) } +/// Dashboard favicon — the hyperhive mark. Static: the dashboard +/// represents the whole hive, so it always uses the project logo +/// (per-agent pages serve their own configurable `/icon` instead). +async fn serve_favicon() -> impl IntoResponse { + ( + [("content-type", "image/svg+xml")], + include_str!("../../branding/hyperhive.svg"), + ) +} + async fn serve_shared_js() -> impl IntoResponse { ( [("content-type", "application/javascript")],