All Challenges

Progress Bar Queue Manager (Throttled Concurrency)

AngularHardGoogleUberPostman
45:00

Problem Brief

Build an upload/task queue showing multiple `.progress-row` bars where adding tasks queues beyond max concurrency = 2.

Requirements

  • Clicking `[data-testid="enqueue-bar"]` creates a `.progress-row` inside `[data-testid="queue-list"]`.
  • Run at most `2` bars concurrently (`status="running"`) while extra tasks remain `queued`.
  • When a running bar hits `100%` (`status="done"`), automatically promote the next queued bar.
Progressive Hints (1)
  • Schedule a lightweight `setInterval` ticker per active task (or shared ticker) incrementing up to 2 running tasks per tick.
Reference Solution

Stuck? Load the verified reference code into your editor.

Automated Test Suite

2 Test Cases Ready
  • Caps concurrent running progress bars at 2Adding 4 bars sets 2 running and 2 queued immediately
  • Promotes queued bars after running batch finishesAll 4 bars reach done after ticker runs
solution.html
Live Sandboxed Previewiframe sandbox
Starter template loaded — add your <script> logic in the editor (or open Reference Solution) to make the widget interactive.