"use client"; /** * Truth strip (server-26#232) — replaces the heartbeat-driven '● Live' pill. * * Healthy: compact per-stage chips (Radio · Transcripts · AI · Feeds), each * with its last-output age. Any core stage dry past the threshold, or any * /health/ai tier degraded: a full-width amber bar that says what broke and * since when — "DEGRADED — radio heard, not transcribed since 12:15". * Theme tokens only (sev-moderate is the amber), so both themes follow. */ import type { PipelineHealth, PipelineStage } from "@/lib/usePipelineHealth"; function dotClass(s: PipelineStage["state"]): string { if (s === "degraded") return "bg-sev-moderate"; if (s === "unknown") return "bg-ink-muted"; return "bg-ink-2"; } export function TruthChips({ health }: { health: PipelineHealth }) { return (
{health.stages.map((s) => ( ))}
); } export function TruthBar({ health }: { health: PipelineHealth }) { if (!health.degraded || !health.message) return null; return (
DEGRADED — {health.message} stale after {health.staleMin} min · map shows last-known state
); } /** Chips for the wall bar, plus the bar itself directly below it when degraded. */ export function TruthStrip({ health, placement }: { health: PipelineHealth; placement: "chips" | "bar" }) { return placement === "chips" ? : ; }