"use client"; import { APPS_CATALOG } from "@/common/apps-catalog"; import { apiPath } from "@/lib/api"; import * as DropdownMenu from "@radix-ui/react-dropdown-menu"; import { ExternalLink, HelpCircle, LayoutGrid } from "lucide-react"; import { useCallback, useEffect, useState } from "react"; import { Link } from "react-router-dom"; export function Topbar() { const [backendOk, setBackendOk] = useState(null); const checkHealth = useCallback(async () => { try { const r = await fetch(apiPath("/api/v1/health")); if (!r.ok) throw new Error(`HTTP ${r.status}`); const j = await r.json().catch(() => ({})); setBackendOk((j as { status?: string }).status === "ok"); } catch { setBackendOk(false); } }, []); useEffect(() => { checkHealth(); const interval = setInterval(checkHealth, 10_000); let unlisten: (() => void) | undefined; import("@tauri-apps/api/event") .then(({ listen }) => { listen("backend-status", (event) => { if (event.payload === "ready") { checkHealth(); } else if (event.payload.startsWith("error:")) { setBackendOk(false); } }).then((off) => { unlisten = off; }); }) .catch(() => {}); return () => { clearInterval(interval); if (unlisten) unlisten(); }; }, [checkHealth]); return (

windows-computer-use-mcp ยท dev UI

{/* System Status Indicator */}
{backendOk && ( )} {backendOk === null ? "Connecting..." : backendOk ? "System Online" : "Offline"}
{/* Global Apps Navigation */} Switch Application
{APPS_CATALOG.map((app) => ( {app.label} ))}
); }