diff --git a/frontend/src/components/DownloadCenter.tsx b/frontend/src/components/DownloadCenter.tsx index bc29a71..2950b62 100644 --- a/frontend/src/components/DownloadCenter.tsx +++ b/frontend/src/components/DownloadCenter.tsx @@ -191,7 +191,10 @@ function RenameModal({ job, onClose }: { job: DownloadJob; onClose: () => void } function UsageBar() { const { t } = useTranslation(); - const usage = useQuery({ queryKey: ["download-usage"], queryFn: api.downloadUsage }); + // Poll live (like the library list) so the footprint updates the moment the worker finishes an + // edit/download — enqueue only creates a queued job (0 bytes), the size lands asynchronously, so + // a one-shot fetch at enqueue time would show a stale 0 B until a manual reload. + const usage = useLiveQuery(["download-usage"], api.downloadUsage, { intervalMs: 2000 }); const u = usage.data; if (!u) return null; const pct = u.unlimited || !u.max_bytes ? 0 : Math.min(100, (u.footprint_bytes / u.max_bytes) * 100);