import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { useHitl } from "@/hooks/useHitl"; import { Shield, ShieldCheck, ShieldOff, Timer } from "lucide-react"; import { useEffect, useState } from "react"; import { CustomTarget } from "./targets/custom"; import { KiCadTarget } from "./targets/kicad"; import { LibreOfficeTarget } from "./targets/libreoffice"; import { NotepadTarget } from "./targets/notepad"; import { VRoidTarget } from "./targets/vroid"; const TABS = [ { id: "notepad", label: "Notepad", component: NotepadTarget }, { id: "libreoffice", label: "LibreOffice", component: LibreOfficeTarget }, { id: "vroid", label: "VRoid Studio", component: VRoidTarget }, { id: "kicad", label: "KiCad", component: KiCadTarget }, { id: "custom", label: "Custom", component: CustomTarget }, ] as const; type TabId = (typeof TABS)[number]["id"]; function HitlBar() { const hitl = useHitl(); const [nowMs, setNowMs] = useState(() => Date.now()); useEffect(() => { const id = window.setInterval(() => setNowMs(Date.now()), 1000); return () => clearInterval(id); }, []); const secondsLeft = hitl.expiresAt ? Math.max(0, Math.round(hitl.expiresAt - nowMs / 1000)) : 0; return (
Operator console — fire automation_task runs, review evidence, manage HITL.