(task)
| 2327 | } |
| 2328 | |
| 2329 | function renderDailyTaskStatus(task) { |
| 2330 | if (!task) return; |
| 2331 | if (task.status === "completed" && task.push) { |
| 2332 | renderPush(task.push); |
| 2333 | return; |
| 2334 | } |
| 2335 | const preview = task.preview_push || {}; |
| 2336 | const metadata = preview.metadata || {}; |
| 2337 | state.push = null; |
| 2338 | state.selected.clear(); |
| 2339 | state.skipped.clear(); |
| 2340 | state.later.clear(); |
| 2341 | $("candidateStat").textContent = task.fetched_count ?? metadata.total_fetched ?? metadata.fetched_count ?? 0; |
| 2342 | $("filteredStat").textContent = task.ranked_count ?? metadata.ranked_count ?? 0; |
| 2343 | $("latestPushStat").textContent = "-"; |
| 2344 | $("readingQueueStat").textContent = "0"; |
| 2345 | $("pushMeta").textContent = ui().papers.taskStatus(task); |
| 2346 | $("paperList").className = "paper-list empty syncing"; |
| 2347 | $("paperList").textContent = ui().papers.taskPending; |
| 2348 | updateSelectionSummary(); |
| 2349 | } |
| 2350 | |
| 2351 | async function pollDailyTask(taskId, immediatePush = null, userId = currentUser(), pollToken = state.dailyPollToken) { |
| 2352 | if (!taskId) { |
no test coverage detected