//
— the agent page's identity strip: icon, glyphic title, the // "swarm / hive" label row, and a slot for the status row // (`` — ../status-chips/, kept separate so this component // has no opinion on what badges exist). Structurally the same // three-row shape as the old `#agent-header` markup in index.html // (icon · main · pills) — see `docs/web-ui.md::Per-agent page` — this // is a like-for-like layout port, the redesign work is in the children. // Reuses `agent.css`'s existing `.agent-header*`/`.agent-icon` rules // (loaded globally by index.html) rather than a component-scoped // stylesheet — no new visual language needed for the chrome itself. import type { ComponentChildren } from 'preact'; // Icon 404s when the agent has no `hyperhive.icon` override (no // bundled server-side default any more — see // `hive_agent::web_ui::screen::serve_icon`). Ports app.js's // `bindHeaderIconFallback` exactly: fire-and-forget load, swap to // `/favicon.svg` on failure, `dataset.fallback` guards against a // 404-on-the-fallback-itself loop. function handleIconError(e: Event) { const img = e.currentTarget as HTMLImageElement; if (img.dataset.fallback) return; img.dataset.fallback = '1'; img.src = '/favicon.svg'; } export interface HeaderProps { label: string; hiveLabel?: string | null; children?: ComponentChildren; /** Right-cluster flyout triggers (inbox/todos/links pills, the * overflow menu button) — mirrors the old markup's * `.agent-header-pills` third column. Meta-nav (``) lives * here too, as a fixed-size trigger — NOT in the title row the old * markup put it in (`