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:
@@ -34,7 +34,8 @@ export interface AcceptanceRecord {
|
||||
}
|
||||
|
||||
export interface TestPublicationQuery {
|
||||
processing_state: ProcessingState | ''
|
||||
// A single state, or several at once (joined into a comma list server-side).
|
||||
processing_state: ProcessingState | '' | ProcessingState[]
|
||||
target_scope?: 'internal' | 'external' | ''
|
||||
limit: number
|
||||
offset: number
|
||||
@@ -93,7 +94,7 @@ export function parseTestPublicationsResponse(value: unknown): TestPublicationPa
|
||||
|
||||
export async function fetchTestPublications(query: TestPublicationQuery, signal?: AbortSignal): Promise<TestPublicationPage> {
|
||||
const parameters = new URLSearchParams()
|
||||
if (query.processing_state) parameters.set('processing_state', query.processing_state)
|
||||
if (query.processing_state) parameters.set('processing_state', Array.isArray(query.processing_state) ? query.processing_state.join(',') : query.processing_state)
|
||||
if (query.target_scope) parameters.set('target_scope', query.target_scope)
|
||||
parameters.set('limit', String(query.limit))
|
||||
parameters.set('offset', String(query.offset))
|
||||
|
||||
Reference in New Issue
Block a user