Add pagination or collapse to the download queue display #46
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
Frontend —
shanty-web/frontend/src/pages/dashboard.rs: Add ashow_all_downloadsstate (use_state(|| false)). By default, show only the first 10 items froms.queue.items. Add a "Show all (N)" button that togglesshow_all_downloadsto true, revealing the full list. When collapsed, show a summary line: "... and N more pending".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.
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.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: