import type { ChartIndexRow } from "../types"; const CHART_CATALOG = [ { name: "Team Efficiency", note: "Offense/defense splits" }, { name: "Player Props", note: "Over/under lines by market" }, { name: "Matchup Report", note: "Head-to-head comparison" }, { name: "Injury Report", note: "Status by team/position" }, ]; const SOURCES = [ { id: "hf", rank: "1", name: "Hugging Face GPU", note: "Pro free GPU · default", tag: "DEFAULT" }, { id: "cpu", rank: "2", name: "My CPU", note: "Local unused slot", tag: "CONFIRM" }, { id: "gcp", rank: "3", name: "Google Cloud GPU", note: "Last resort", tag: "CONFIRM" }, ]; /** * Admin modal per HANDOFF_CLAUDE_CODE.md sec 3.5: Nodes / Charts / GPU / * Logs strips. Charts strip is wired to the real _index.csv catalog * (per sec 3.5's instruction) rather than the mock's static catalog list. */ export default function AdminPanel({ onClose, onAddRamp, onAddExpert, chartIndex, logs, }: { onClose: () => void; onAddRamp: () => void; onAddExpert: () => void; chartIndex: ChartIndexRow[]; logs: { t: string; msg: string }[]; }) { return (
ADMIN · LOGS
{CHART_CATALOG.map((c) => (
{c.name} {c.note}
))}
{chartIndex.map((row) => ( {row.chart_name} · {row.status} ))}
{SOURCES.map((s) => (
{s.rank} {s.name} {s.note} {s.tag}
))}
{logs.map((l, i) => (
› {l.t} {l.msg}
))}
); } function Section({ title, children }: { title: string; children: React.ReactNode }) { return (
{title} {children}
); } function nodeBtn(border: string): React.CSSProperties { return { display: "flex", alignItems: "center", gap: 6, height: 32, padding: "0 12px", background: "#1a1520", border: `1px solid ${border}`, borderRadius: 999, color: "#f2ecf4", cursor: "pointer", fontSize: 12, fontWeight: 600 }; }