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:
姚章浩
2026-09-16 08:53:18 +08:00
parent 553eff5f7f
commit 1d6ba6dc2e
10 changed files with 149 additions and 21 deletions
+2 -9
View File
@@ -1414,17 +1414,10 @@
{
"name": "processing_state",
"in": "query",
"description": "解析状态过滤。可传单个状态,或用逗号拼接多个状态(例如 failed,stalled)一次取出全部失败项。",
"schema": {
"type": "string",
"enum": [
"pending",
"processing",
"finalizing",
"completed",
"failed",
"stalled",
"cancelled"
]
"pattern": "^(planned|pending|processing|finalizing|completed|failed|stalled|cancelled)(,(planned|pending|processing|finalizing|completed|failed|stalled|cancelled))*$"
}
},
{