Add pagination or collapse to the download queue display #46

Open
opened 2026-03-21 14:22:06 -04:00 by connor · 0 comments
Owner

Description:

The download queue section on the dashboard (shanty-web/frontend/src/pages/dashboard.rs, lines ~315-335) renders all queue items inline in a <table>. The items come from the status API (shanty-web/src/routes/system.rs, get_status() lines ~46-49) which currently returns all pending + downloading + first 5 failed items.

With a large queue (50+ pending items from a "Watch All" on a prolific artist), the page becomes very long and pushes the tagging queue and other content off-screen.

What to change

  1. Frontend — shanty-web/frontend/src/pages/dashboard.rs: Add a show_all_downloads state (use_state(|| false)). By default, show only the first 10 items from s.queue.items. Add a "Show all (N)" button that toggles show_all_downloads to true, revealing the full list. When collapsed, show a summary line: "... and N more pending".

  2. Consider separating failed items: Failed items could be in a collapsible section below the main queue, with a "Show N failed" toggle. This keeps the focus on active/pending items.

  3. Backend — shanty-web/src/routes/system.rs: The status endpoint already limits failed items to 5 (line ~49: .take(5)). Consider also limiting pending items in the response, or add pagination params (?queue_limit=10). However, the frontend already receives all items via the status response — it's simpler to just paginate client-side.

  4. Summary counts: The queue summary (s.queue.pending, s.queue.downloading, s.queue.failed) is already available and displayed. Ensure these counts are always visible even when the item list is collapsed.

Key files

  • shanty-web/frontend/src/pages/dashboard.rs — Download Queue section (lines ~315-335)
  • shanty-web/src/routes/system.rsget_status() queue item collection (lines ~46-49)

Acceptance criteria:

  • Download queue shows at most 10-15 items by default
  • "Show all (N)" button expands to full list
  • Summary counts (pending/downloading/failed) always visible at top
  • Failed items optionally in their own collapsible section
  • Page doesn't get excessively long with large queues
  • Collapsing/expanding doesn't cause layout jumps
**Description:** The download queue section on the dashboard (`shanty-web/frontend/src/pages/dashboard.rs`, lines ~315-335) renders all queue items inline in a `<table>`. The items come from the status API (`shanty-web/src/routes/system.rs`, `get_status()` lines ~46-49) which currently returns all pending + downloading + first 5 failed items. With a large queue (50+ pending items from a "Watch All" on a prolific artist), the page becomes very long and pushes the tagging queue and other content off-screen. ### What to change 1. **Frontend — `shanty-web/frontend/src/pages/dashboard.rs`**: Add a `show_all_downloads` state (`use_state(|| false)`). By default, show only the first 10 items from `s.queue.items`. Add a "Show all (N)" button that toggles `show_all_downloads` to true, revealing the full list. When collapsed, show a summary line: "... and N more pending". 2. **Consider separating failed items**: Failed items could be in a collapsible section below the main queue, with a "Show N failed" toggle. This keeps the focus on active/pending items. 3. **Backend — `shanty-web/src/routes/system.rs`**: The status endpoint already limits failed items to 5 (line ~49: `.take(5)`). Consider also limiting pending items in the response, or add pagination params (`?queue_limit=10`). However, the frontend already receives all items via the status response — it's simpler to just paginate client-side. 4. **Summary counts**: The queue summary (`s.queue.pending`, `s.queue.downloading`, `s.queue.failed`) is already available and displayed. Ensure these counts are always visible even when the item list is collapsed. ### Key files - `shanty-web/frontend/src/pages/dashboard.rs` — Download Queue section (lines ~315-335) - `shanty-web/src/routes/system.rs` — `get_status()` queue item collection (lines ~46-49) **Acceptance criteria:** - [ ] Download queue shows at most 10-15 items by default - [ ] "Show all (N)" button expands to full list - [ ] Summary counts (pending/downloading/failed) always visible at top - [ ] Failed items optionally in their own collapsible section - [ ] Page doesn't get excessively long with large queues - [ ] Collapsing/expanding doesn't cause layout jumps
connor added the MediumPriority label 2026-03-21 14:22:11 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Shanty/Main#46