🐛 fix: show feedback when 'Wartet' jobs are already in batch
- 'Ausgewählte starten' on already-queued jobs during upload now shows toast: "X Jobs warten bereits auf ihren Upload-Slot" - Only error/aborted/skipped jobs are added to the running batch (prevents duplicate task creation for already-queued jobs) - Toast confirms when error jobs are added to batch Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6bd49d80b1
commit
f642122726
@ -1354,8 +1354,8 @@ function _markSkippedJobs(result) {
|
||||
|
||||
async function startSelectedUpload() {
|
||||
if (uploading) {
|
||||
// Batch already running — add selected jobs to the running batch
|
||||
const retryable = queueJobs.filter(j => selectedJobIds.has(j.id) && ['queued', 'error', 'aborted', 'skipped'].includes(j.status));
|
||||
// Batch already running — only add error/aborted/skipped jobs (not already-queued ones)
|
||||
const retryable = queueJobs.filter(j => selectedJobIds.has(j.id) && ['error', 'aborted', 'skipped'].includes(j.status));
|
||||
if (retryable.length > 0) {
|
||||
retryable.forEach(j => {
|
||||
j.status = 'queued'; j.error = null; j.result = null;
|
||||
@ -1367,6 +1367,13 @@ async function startSelectedUpload() {
|
||||
});
|
||||
_markSkippedJobs(result);
|
||||
persistQueueStateSoon();
|
||||
showCopyToast(`${retryable.length} Jobs zum laufenden Upload hinzugefügt`);
|
||||
} else {
|
||||
// All selected jobs are already queued/uploading — just inform user
|
||||
const waiting = queueJobs.filter(j => selectedJobIds.has(j.id) && j.status === 'queued');
|
||||
if (waiting.length > 0) {
|
||||
showCopyToast(`${waiting.length} Jobs warten bereits auf ihren Upload-Slot`);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user