b2e1acd257
Replace the FilesTab and ActionsTab stubs with real implementations on the ssh_tasks service page. FilesTab (pages/service-tabs/FilesTab.tsx): lifts the operational content from the top-level FileBrowser page into an instance-scoped tab. Directory listing, path bar, ffprobe preview, and job execution all use instance.id as the machine id (replacing the old machine-tab selector + machine_id search param). The initial path is read from ?path= search param so deep links work (resolves the MediaTab row-click navigation). ActionsTab (pages/service-tabs/ActionsTab.tsx): lifts the saved-tasks CRUD + run + history content from the top-level Actions page. instance.id is the fixed default run service -- the old service-selector dropdown is removed (the instance is implicit; switch instances via the service page switcher to run on a different one). MediaTab row-click cross-slice fix: navigates to /services/ssh_tasks/<first-enabled-id>?path=<encoded> when an enabled ssh_tasks instance exists, else falls back to /services/ssh_tasks (which shows the ServiceTypePage resolver/empty state). Resolves the 404 flag from slice 5. service-tabs/index.ts wires the new components; FilesTab/ActionsTab stubs removed. Note: this branch is based on main, not on mobile-responsive-parity, so the tabs lift main's DataTable + column-visibility pattern (no MobileCardRow -- reconciles when the branches merge). Tests: FilesTab (instance-scoped hooks + ?path= deep-link), ActionsTab (instance-scoped task list), MediaTab test mock updated. 94 tests pass (+4); lint/build green. Refs openspec/changes/services-as-hub-ia/ (spec R2.4, tasks slice 6).
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
- @tanstack/react-table — Data tables (media, file browser)
- react-router-dom — Client-side routing
- Tailwind CSS + shadcn/ui — 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 media_library_viewer_api.main:app --reload --port 8000
Build
npm run build
Output goes to frontend/dist/.
Pages
- Dashboard (
/) — Now playing, library stats, configurable widgets and shortcuts, frontend/backend version chips in the shell header - Observability (
/observability) — Thin dashboard: Alertmanager alerts, Prometheus target health, machine status, and Grafana deep-links (no in-app charting) - 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, SSH keys, and setup workflow - Actions (
/actions) — Saved server tasks (shell/python) targeting ssh_tasks services
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. - Observability: Manage only deploys backend + frontend. It connects to existing Grafana/Prometheus/Alertmanager instances; see
docker-compose.observability.ymlfor an optional standalone example stack. A machine can belocal(the API host itself) orssh(a remote host), and the UI treats both the same after configuration.
In development, the Vite proxy handles /api requests automatically. Observability services (Grafana, Prometheus, Alertmanager) are configured in the app on the Services page — there are no observability env vars.