"use client"; import { useState } from "react"; import { useDisplay } from "yt-dlp-transcript-common/components/PrivacyProvider"; import { buttonVariants } from "@/components/ui/button"; import { Panel } from "@/components/ui/panel"; import type { DoctorReport } from "@/lib/tool-types"; import { fmtGB } from "@/lib/system/status"; import { fmtAgo } from "@/lib/format"; // Settings · system: the tools and the free disk. The tool list is the CACHE // the page hands down, or "not checked": the page never probes. The button // POSTs /api/doctor, the one place the app probes. // // Red ONLY when the report pipeline needs a tool and it is absent. A missing // python on a machine that never cuts a face is a fact, not a fault. export default function ToolsPanel({ initial, freeBytes }: { initial: DoctorReport | null; freeBytes: number | null }) { // settings.privacy: a tool's path (its title) as displayed, client-side. const { displayText } = useDisplay(); const [report, setReport] = useState(initial); const [busy, setBusy] = useState(false); return ( {report ? `checked ${fmtAgo(report.checkedAt)}` : "not checked"} } >

{fmtGB(freeBytes)} free under the reports root

{report && ( )}
); }