Every useLive() call opened its own EventSource, and the library page and a
model's Jobs tab call it twice. Over plain HTTP a browser allows 6 connections
per host, so with three library tabs open the third took ~10 s to load and its
requests never got an answer; a fourth tab didn't load.
- /api/live answers one short request with the job snapshot (left out when the
client already has that version) and, for job pages, new log lines.
- src/lib/live-store.ts runs one poller per query per tab, shared by every
component showing it, paused while the tab is hidden, with backoff on errors.
One router.refresh() per finished job instead of one per component.
- The worker dot reads the status from that poll; it only asks /api/status
(every 10 s) when nothing else is polled.
- The worker status no longer carries the heartbeat time (it changed every 5 s,
so every idle stream re-sent its snapshot) and rounds free space to MiB.
- Removes /api/stream: its sleep() added an abort listener per second to the
request signal and never removed it.
- Job actions poll right away after starting or cancelling a job; drops
approveJob/rejectJob, whose routes went away in 0.15.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EooZ9biu7kFNB4eDJrwQc5
- Worker queue with per-model exclusivity and MAX_CONCURRENT_DOWNLOADS,
spawns `hf download --revision <sha> --local-dir ... --include <exact paths>`
with HF_TOKEN via env only
- Progress from bytes on disk (final + .incomplete files matched by etag),
per job and per file, with speed and ETA; post-download size/etag check
- Job logs (sanitized), cancel, graceful interrupt on shutdown,
partial-file cleanup (hf 2.1.1 does not resume partials)
- Single-worker DB lease, free-space check
- SSE live updates for library, model and job pages
- Dockerfile + compose.yaml (web, worker, data/models volumes)
- HF_HUB_DISABLE_XET default on for measurable progress
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>