/** * dashboard-client/src/components/TriggerStatus.tsx — trigger armed/ready status. * * Two bullets (Armed, Ready) + state text. * Ready bullet shows "na" (yellow) when not armed. * State text: ready → "THRESHOLD EXCEEDED — compacting next event", * armed → "past fast gate — monitoring token count", * idle → "idle — below fast gate". */ import type React from "react"; export interface TriggerStatusProps { /** Whether the trigger is armed (waiting for threshold). */ armed: boolean; /** Whether the trigger is ready to fire (pressure at/above threshold). */ ready: boolean; /** Current context token count, or null if unknown. */ currentTokens: number | null; /** Token threshold for firing. */ thresholdTokens: number; /** Fast-gate pressure threshold (percent, 0–100). */ fastGatePct: number; } type BulletState = "on" | "off" | "na"; function Bullet({ state, label, }: { state: BulletState; label: string; }): React.ReactElement { const cls = state === "on" ? "bullet-on" : state === "na" ? "bullet-na" : "bullet-off"; return (
{stateText}