/** Hardware / compatibility status card — honest platform reporting. */ import { useEffect, useState } from 'react'; import Box from '@mui/material/Box'; import Chip from '@mui/material/Chip'; import Paper from '@mui/material/Paper'; import Typography from '@mui/material/Typography'; import { Cpu } from 'lucide-react'; import { getRetroCompat, getRetroEnv } from '../../services/retro'; import type { CompatReport, EnvironmentReport } from '../../types/retro'; const CHECK_COLORS: Record = { PASS: '#66bb6a', FAIL: '#ef5350', SKIPPED: '#8a949e', }; export default function HardwareCard() { const [env, setEnv] = useState(null); const [compat, setCompat] = useState(null); const [error, setError] = useState(null); useEffect(() => { getRetroEnv().then((r) => setEnv(r.environment)).catch((e: Error) => setError(e.message)); getRetroCompat().then((r) => setCompat(r.report)).catch((e: Error) => setError(e.message)); }, []); if (error) { return hardware report unavailable: {error}; } if (!env || !compat) { return Detecting environment…; } return ( Hardware & vLLM compatibility {compat.platform_summary} {env.os_name} {env.os_version} · {env.machine_arch} {env.is_apple_silicon ? ' (Apple Silicon)' : ''} · Python {env.python_version} {env.gpus.length ? ` · ${env.gpus.map((g) => `${g.vendor} ${g.model}`).join(', ')}` : ' · no GPU detected'} {compat.checks.map((c) => ( {c.link} {c.reason} ))} {env.ollama_endpoint ? ( Ollama reachable at {env.ollama_endpoint} ({env.ollama_models.length} models) — real local inference available, labeled Ollama-on-CPU/Metal (not vLLM). ) : ( Ollama not reachable — deterministic mock backend is the only runnable option here. )} ); }