/** * dashboard-client/src/components/ConfigSummaryCard.tsx — Configuration summary. * * 7 fields with tooltips (verbatim from html.ts): * Tier (live), Preset, Pressure, Threshold, Fast Gate, Auto, Anchor. * * NOTE: pressure and tierPct are 0–1 fractions at runtime. * fastGatePct is 0–100 at runtime. */ import type React from "react"; export interface ConfigSummaryCardProps { /** Current tier name. */ tier: string; /** Preset tier name. */ presetTier: string; /** Live pressure — 0–1 fraction. */ pressure: number; /** Token threshold. */ thresholdTokens: number; /** Tier percentage — 0–1 fraction (runtime-only field). */ tierPct?: number; /** Context window size. */ contextWindow: number; /** Fast-gate percentage — 0–100. */ fastGatePct: number; /** Whether auto-compaction is enabled. */ auto: boolean; /** Number of anchor user messages. */ anchorUserMessages: number; } function StatRow({ label, value, title, }: { label: string; value: string; title?: string; }): React.ReactElement { return (
{label} {value}
); } export function ConfigSummaryCard( props: ConfigSummaryCardProps, ): React.ReactElement { const pressurePct = `${Math.round((props.pressure ?? 0) * 100)}%`; let thresholdTxt = props.thresholdTokens.toLocaleString(); if (props.tierPct != null && props.contextWindow > 0) { thresholdTxt += ` (${Math.round(props.tierPct * 100)}% of ${props.contextWindow.toLocaleString()})`; } return (

Configuration

); }