Preserve waiting queue jobs and clarify documentation - #45
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00f44b9c6e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const removable=rows.filter(item=>QUEUE_TERMINAL_STATES.has(item.state)).length; | ||
| const clearButton=$(`.clear-queue[data-kind="${kind}"]`); | ||
| if(clearButton)clearButton.disabled=!removable; |
There was a problem hiding this comment.
Allow clearing terminal rows beyond the first queue page
When a queue has at least 200 waiting/running jobs plus older terminal jobs, /api/queue and /api/reconcile-queue return only the first 200 rows and order all active rows before terminal rows, so this filter finds zero removable entries and disables Clear even though the DELETE endpoint has terminal rows to remove. Use a server-provided terminal count or otherwise keep the action available when terminal rows may exist beyond the response limit.
Useful? React with 👍 / 👎.
Summary
QUEUEDandRUNNINGworkWhy
The previous cleanup query deleted every non-running row, including jobs still waiting in the FIFO. The repository homepage also led with development tooling before explaining Stowarr's purpose and operating model.
Verification
git diff --checkpasses