fix(monitor): keep failing publications visible outside the queue page
- The attention lane was derived from page 1 of the queue (limit 50, newest by updated_at), so failures ranked past 50 silently disappeared from "needs attention" as the completed backlog grew. - Fetch attention items with a dedicated request: the API now accepts a comma-separated processing_state list (failed,stalled) and the view prefers that result set over the paged queue. - Batch retry/cancel targets are computed from the same failure set instead of the visible page, so actions reach every failing item. - 全部任务 shows 已显示 N / 共 M plus 加载更多 so rows past 50 are reachable. - Fix pre-existing ui_settings integration test: strict JSON decoding rejects the legacy updated_by field (actor comes from the session). - Tests: view regression (attention item outside the page, load-more affordance) + handler multi-state filter + isolated-DB set filter.
This commit is contained in:
@@ -116,7 +116,7 @@ ORDER BY p.id
|
||||
const countTestPublicationsSQL = `
|
||||
SELECT COUNT(*)
|
||||
FROM test_publications
|
||||
WHERE ($1 = '' OR processing_state = $1) AND ($2 = '' OR target_scope = $2)
|
||||
WHERE ($1 = '' OR processing_state = ANY(string_to_array($1, ','))) AND ($2 = '' OR target_scope = $2)
|
||||
`
|
||||
|
||||
const listTestPublicationsSQL = `
|
||||
@@ -143,7 +143,7 @@ FROM test_publications p
|
||||
JOIN source_item_versions siv ON siv.id = p.source_item_version_id
|
||||
JOIN source_items si ON si.id = siv.source_item_id
|
||||
LEFT JOIN content_objects co ON co.id = siv.content_object_id
|
||||
WHERE ($1 = '' OR p.processing_state = $1) AND ($2 = '' OR p.target_scope = $2) AND p.superseded_at IS NULL
|
||||
WHERE ($1 = '' OR p.processing_state = ANY(string_to_array($1, ','))) AND ($2 = '' OR p.target_scope = $2) AND p.superseded_at IS NULL
|
||||
ORDER BY p.updated_at DESC, p.id
|
||||
LIMIT $3 OFFSET $4
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user