๐ŸŽฌ Phase 2 Demo

Batch Download Manager โ€” Visual Walkthrough
Interactive Mockups Operator Guide Feb 2026
6
Batch States
3
API Endpoints
5 min
Default Cooldown
4
Polling Rates

1๏ธโƒฃ State: idle โ€” No Active Batch

Minimal footprint when no batch is running. Collapsed summary of last completed batch.

YouTube Monitor โ€” Batch Progress (idle)
No active batch
โ–พ
Last batch: 9 videos, 8 succeeded, 1 failed โ€” 23 min ago
All videos downloaded
YouTube Monitor โ€” Batch Progress (idle, expanded)
No active batch
โ–ด
Last batch: 9 videos, 8 succeeded, 1 failed โ€” 23 min ago
โœ“FC vs Team Alpha - Season 26 Div 3downloaded
โœ“FC vs Team Beta - Season 26 Div 3downloaded
โœ—FC vs Team Gamma - Match Day 5failed
โœ“FC vs Team Delta - Season 26 Div 3downloaded

2๏ธโƒฃ State: collecting โ€” Preparing Batch

Blue info bar. Short-lived (~1-2s) while querying for downloadable videos.

YouTube Monitor โ€” Batch Progress (collecting)
โ†ป Preparing batch...
Queuing downloadable videos

3๏ธโƒฃ State: downloading โ€” Batch In Progress

Primary state. Emerald green with progress bar, per-item status, and Pause button.

YouTube Monitor โ€” Batch Progress (downloading)
Batch 1 โ€ข 3/9 completed โ€ข 1 failed
44%
โœ“FC vs Team Alpha - Season 26 Div 3downloaded
โœ“FC vs Team Beta - Season 26 Div 3downloaded
โœ“FC vs Team Gamma - Season 26 Div 3downloaded
โœ—FC vs Team Delta - Match Day 5failed
โ†“FC vs Team Epsilon - Season 26 Div 342%
โ†“FC vs Team Zeta - Season 26 Div 318%
โ—‹FC vs Team Eta - Season 26 Div 3queued
โ—‹FC vs Team Theta - Season 26 Div 3queued
โ—‹FC vs Team Iota - Season 26 Div 3queued

Progress bar color: Green when all succeed. Amber when any item fails (shown above).

Pause Confirmation (during downloading)

Pause Confirmation Popup

2 downloads in progress will complete, remaining 3 will wait.

4๏ธโƒฃ State: cooldown โ€” Inter-Batch Cooldown

Amber section with countdown timer in MM:SS monospace format.

YouTube Monitor โ€” Batch Progress (cooldown)
โง Next batch in 4:32
Last batch: 9/9 completed

5๏ธโƒฃ State: paused โ€” Operator Paused

Yellow section with Resume button. One-click resume (no confirmation).

YouTube Monitor โ€” Batch Progress (paused)
โธ Batch paused
3/9 completed โ€ข Paused 2 min ago

6๏ธโƒฃ State: circuit_broken โ€” Circuit Breaker Tripped

Red alert. No action button โ€” reset lives in the Circuit Breaker section above.

YouTube Monitor โ€” Batch Progress (circuit_broken)
โš  Batch stopped โ€” circuit breaker open
3/9 completed, 3 failed โ€ข Downloads paused until reset

๐ŸŽจ UI Feature Details

Progress Bar Behavior

Normal (all succeeding) โ†’ Green
6/9 completed67%
With failures โ†’ Amber
3 completed, 1 failed44%

Formula: Math.round((completed + failed) / total * 100)

Per-Item Status Icons

Status Indicators
โœ“Downloaded โ€” CheckCircle2, emeralddownloaded
โ†“Downloading โ€” Loader2 (spinning), blue + mini bar42%
โœ—Failed โ€” AlertCircle, rosefailed
โ—‹Queued โ€” Clock, slatequeued
โ–ถSkipped โ€” SkipForward, violetskipped

Batch Completion Reasons

ReasonDisplayMeaning
all_completed"All videos downloaded"Every video finished
circuit_breaker"Stopped: circuit breaker tripped"Cookie errors triggered CB
operator_paused"Stopped: paused by operator"Manual pause
no_more_videos"No more eligible videos"Queue empty

Adaptive Polling Intervals

StateIntervalRationale
idle30sLow urgency
collecting2sFast-changing
downloading2sActive progress
cooldown5sTimer accuracy
paused15sWaiting for operator
circuit_broken15sWaiting for reset

Page Layout Position

YouTube Monitor Page Layout
Header + Error Banner
Circuit Breaker Status (conditional)
โ–ถ BATCH PROGRESS SECTION (NEW)
Connection Card
Stats Overview
Feed Items Table

๐Ÿ‘ค Operator User Guide

Starting a Batch

Batches start automatically when auto-sync finds new videos and auto_download_enabled is true.

Auto-sync runs every sync_interval_minutes (default 10)

Batch manager collects up to youtube_max_parallel_downloads (default 9) videos

Downloads begin โ€” batch section shows progress

Cooldown after completion โ€” waits batch_cooldown_minutes (default 5)

Pausing Downloads

Click Pause or call POST /api/youtube/batch/pause

Confirm during active downloads (inline popup shows impact)

In-flight complete โ€” remaining videos wait

Section turns yellow with Resume button

Resuming Downloads

Click Resume (one-click, no confirmation) or POST /api/youtube/batch/resume

New batch starts immediately if ready videos exist

Handling Circuit Breaker Trips

Batch section turns red โ€” "Batch stopped โ€” circuit breaker open"

Refresh cookies โ€” export from browser, copy youtube_cookies.txt

Reset circuit breaker via button or POST /api/youtube/downloads/circuit-reset

Batch auto-resumes when circuit closes

Changing Cooldown Duration

curl -X PUT -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"value": "10"}' \ http://localhost:3002/api/settings/batch_cooldown_minutes

Takes effect immediately. No restart needed.

๐Ÿ”Œ API Reference

MethodEndpointAuthPhasePurpose
GET/api/youtube/downloads/circuit-statusUserP1Circuit breaker state
POST/api/youtube/downloads/circuit-resetOperatorP1Manual circuit reset
GET/api/youtube/feed?status=skippedUserP1List skipped videos
POST/api/youtube/feed/:videoId/retryUserP1Retry single video
POST/api/youtube/feed/bulk-retryUserP1Retry all failed
GET/api/youtube/queueUserP0Active download queue
GET/api/youtube/batch/statusUserP2Current batch progress
POST/api/youtube/batch/pauseOperatorP2Pause batch processing
POST/api/youtube/batch/resumeOperatorP2Resume batch processing