Allow queued confirmation during source pause

This commit is contained in:
Codex committed 2026-10-14 09:42:21 +02:00
1 parent a22913129a
commit b96ab42add
4 files changed
+51 -5

No files matched your search

+6 -1
View File
@@ -654,7 +654,12 @@ class ScraperService {
if (action === 'inspect' || action === 'confirm') {
const item = this.state.queue.find(entry => entry.id === id);
if (!item || Object.values(this.state.currentIds || {}).includes(item.id)) throw new Error('Job not found or already active');
if (this.state.sourcePaused[item.source] || item.failure?.kind === 'access') throw new Error('Review the source access block before inspecting or confirming');
// Confirmation only changes the persisted queue. The work loop still
// refuses to start jobs for a paused source, so an admin can approve an
// already inspected edition without accidentally retrying blocked access.
if (item.failure?.kind === 'access' || (action === 'inspect' && this.state.sourcePaused[item.source])) {
throw new Error('Review the source access block before inspecting');
}
if (action === 'confirm') {
if (item.status !== 'ready' || item.kind !== 'inspection') throw new Error('Inspect the source first');
item.confirmedSourceTitle = item.sourceTitle;