Watch
0
0
Fork
You've already forked hyperhive
0

swarm ui: the freshness badge moves from the agent card onto the status panel

The card header carried a fresh/stale badge with the report's age. It now
sits in the status row of the opened card, which already showed it, and the
card header keeps the name, the message and the controls.
This commit is contained in:
iris 2026-11-10 18:09:20 +01:00 • committed by mara
commit 99ca130552

View file

@ -17,14 +17,12 @@ import { useState } from "preact/hooks";
import { Badge } from "@hive/shared/badge.js";
import { TerminalIcon } from "@hive/shared/icons.js";
import { Card } from "../../ui/card/Card.js";
import { RelativeTime } from "../../ui/relative-time/RelativeTime.js";
import { useDynamicTabs } from "../../shell/useDynamicTabs.js";
import { AgentIcon } from "../AgentIcon.js";
import { ClaudeLoginDialog } from "../claude-login/ClaudeLoginDialog.js";
import { AgentDetail } from "../detail/AgentDetail.js";
import { termPaths } from "../terminal/term-paths.js";
import {
FRESHNESS,
hivePauseReason,
showsLoginNeeded,
type AgentRow,
@ -41,7 +39,6 @@ export function AgentCard({
row: AgentRow;
actions: AgentActions;
}) {
const { tone, label } = FRESHNESS[row.freshness];
const [loggingIn, setLoggingIn] = useState(false);
const [open, setOpen] = useState(false);
const error = actions.actionErrors.get(row.name);
@ -68,25 +65,6 @@ export function AgentCard({
name={<span class="ui-agent-card-name">{row.name}</span>}
status={
<>
<Badge
tone={tone}
title={
row.freshness === "unknown"
? "reported by its hive but not registered in swarm-level identity — needs migration"
: undefined
}
value={
<>
{label}
{row.last_seen_unix !== null ? (
<>
{" "}
(<RelativeTime epochMs={row.last_seen_unix * 1000} />)
</>
) : null}
</>
}
/>
{hivePauseReason(row) !== null ? (
<Badge
tone="warning"