feat(downloads): front-and-center "active now" panel with live elapsed timers
New ActiveDownloadsPanel pinned at the top of the Downloads tab shows what's running (pulsing dot + live mm:ss timer counting from started_at) and what's queued, so the operator can see activity at a glance without the running filter. Backed by store.loadActive() which fetches running + pending independent of the feed filter; refreshed every 4s by the existing live poll. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ActiveDownloadsPanel />
|
||||
|
||||
<v-alert v-if="store.error" type="error" variant="tonal" closable class="my-4">
|
||||
{{ String(store.error) }}
|
||||
</v-alert>
|
||||
@@ -124,6 +126,7 @@ import DownloadDetailModal from '../downloads/DownloadDetailModal.vue'
|
||||
import DownloadStatChips from './DownloadStatChips.vue'
|
||||
import DownloadActivitySparkline from './DownloadActivitySparkline.vue'
|
||||
import FailingSourcesCard from './FailingSourcesCard.vue'
|
||||
import ActiveDownloadsPanel from './ActiveDownloadsPanel.vue'
|
||||
import MaintenanceMenu from './MaintenanceMenu.vue'
|
||||
import DownloadsFilterPopover from './DownloadsFilterPopover.vue'
|
||||
|
||||
@@ -160,6 +163,7 @@ async function refresh() {
|
||||
store.loadStats(24),
|
||||
store.loadActivity(24),
|
||||
store.loadFailing(),
|
||||
store.loadActive(),
|
||||
])
|
||||
}
|
||||
|
||||
@@ -218,9 +222,10 @@ function startPolling() {
|
||||
if (pollId) return
|
||||
pollId = setInterval(async () => {
|
||||
if (document.hidden) return
|
||||
// Refresh stats + sparkline cheaply every tick; only reload the event
|
||||
// list + failing rollup when there's active work (keeps idle ticks light).
|
||||
await Promise.all([store.loadStats(24), store.loadActivity(24)])
|
||||
// Refresh stats + sparkline + active panel every tick (so new runs
|
||||
// surface within 4s even from idle); only reload the full event list +
|
||||
// failing rollup when there's active work (keeps idle ticks light).
|
||||
await Promise.all([store.loadStats(24), store.loadActivity(24), store.loadActive()])
|
||||
if (liveActive.value) await Promise.all([store.loadFirst(), store.loadFailing()])
|
||||
}, POLL_MS)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user