Files
manage/frontend
Developer 3dc1b31fc3 feat(frontend): slice 7b — Media on TanStack Table (server pagination)
Web UI rework. Completes the DataGrid migration (7a + 7b):
- pages/Media.tsx off @mui/x-data-grid + @mui/material onto DataTable:
  15 locked columns (title/series/season/episode/type/year/runtime_min/
  size/bitrate/hdr/video/resolution/date_added/library/path);
  enablePagination + manualPagination + rowCount from queryResult.total;
  page state (pageIndex/pageSize) -> offset/limit into useMediaQuery;
  onRowClick -> navigate('/files?path=...') preserved; stable path-derived
  getRowId so selection survives server paging; column-visibility toggle.
  Hard rule honored: NO sorting, NO resizing (visibility-only).
- Migrate Media shell (Select/Input/Progress/Card/grid/Typography/Tabs).
- Media component tests (column set + row-click nav).
- Harness fix: polyfill ResizeObserver in test/setup.ts — jsdom lacks it
  and Radix primitives (Select/ScrollArea/etc.) reference it; was causing
  cross-test failures once Media pulled shadcn Select into the pool.

Gate: build + lint + test green (23 files / 64 tests).
2026-06-17 18:33:59 +00:00
..
2026-05-04 13:50:53 +02:00
2026-05-07 15:17:31 +02:00
2026-05-04 16:59:06 +02:00
2026-05-04 13:50:53 +02:00
2026-05-07 15:17:31 +02:00

Manage Frontend

React + TypeScript SPA for Manage, consuming the FastAPI backend.

Tech Stack

  • Vite — Build tool
  • React 18+ — UI framework
  • TypeScript — Type safety
  • @tanstack/react-query — Data fetching/caching
  • ag-grid-react — Data tables (media, file browser)
  • recharts — Monitoring charts
  • react-router-dom — Client-side routing
  • Tailwind CSS — Styling

Setup

cd frontend
npm install

Development

npm run dev

Runs on http://localhost:5173 with API requests proxied to http://localhost:8000.

Make sure the backend is running:

cd ../backend
uvicorn main:app --reload --port 8000

Build

npm run build

Output goes to frontend/dist/.

Pages

  • Dashboard (/) — Now playing, backend-collected per-machine monitoring table with 10-minute averages/min/max, library stats, frontend/backend version chips in the shell header
  • Monitoring (/monitoring) — Per-machine CPU/IO wait/RAM/network/disk charts, collector controls, and backend-collected recent action history
  • Media (/media) — Full-library table with sort/filter/search
  • Users (/users) — Read-only Jellyfin user list with optional Jellyseerr enrichment
  • File Browser (/files) — Remote directory browsing, ffprobe preview, jobs
  • Settings (/settings) — Persistent monitoring machine definitions and setup workflow

Environment Variables

Set VITE_API_URL and any OIDC variables directly in your shell or Compose build args if the API is not at http://localhost:8000. The frontend version defaults to the package.json version and can be overridden with VITE_APP_VERSION and VITE_APP_BUILD_INFO when you need explicit deployed labels.

VITE_API_URL=http://your-backend-host:8000

Configuration workflow examples

  • Local development: run docker compose -f docker-compose.dev.yml up --build, then open the app and add monitoring machines in the Settings tab.
  • Production: export the required Compose variables in your shell, run docker compose up --build, and manage local/remote machines from Settings.
  • Dashboard monitoring UI: the dashboard shows a compact, sortable table with one row per configured machine plus poller status.
  • Monitoring UI: the Monitoring tab shows one card per configured machine, including a recent action-history table populated by the backend poller. A machine can be local (the API host itself) or ssh (a remote host), and the UI treats both the same after configuration. The page also shows the backend poller health badge.

In development, the Vite proxy handles /api requests automatically.