mac-worker dashboard UI
React + Tailwind + shadcn/ui front end for the dashboard API, developed against the Rust loopback server rather than embedded in it.
Running
Start the API in one shell, from the repository root:
worker dashboard --port 9173 --no-openThen the UI in another:
cd ui
npm install
npm run devVite serves on http://localhost:5173 and proxies /api to the dashboard. Point it elsewhere with DASHBOARD_ORIGIN=http://127.0.0.1:<port> npm run dev. The proxy keeps the browser same-origin, which matters because the dashboard sends no CORS headers and validates the request Host against its own listener.
Tests
npm testVitest with jsdom and Testing Library. The suite pins the behaviour the Rust client used to guarantee: filters stay local and issue no request, a failed poll keeps the last snapshot instead of blanking the page, a settings draft survives a rejected revision, and every remote string renders as text rather than markup.
Layout
src/lib/api.ts— types mirroring the Rust snapshot projection, and fetch helperssrc/hooks/useSnapshot.ts— two-second snapshot polling, matching the Rust clientsrc/views/— one file per viewsrc/components/ui/— shadcn components, owned by this repository