Dashboard: Nuggets attention line counts uploads still open in the workflow and clears when finished; v2.21.0
Publish Container / build (push) Successful in 16m6s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-12 12:02:30 -04:00
1 parent 35d3c9ca33
commit e6bef529e6
5 files changed
+19 -8

No files matched your search

+3 -1
View File
@@ -2,6 +2,7 @@ import { Resend } from 'resend'
import { readdir } from 'node:fs/promises'
import { requireAdminAuth } from '../auth.js'
import { buildSeasonCheck } from '../season-check.js'
import { countPendingUploads } from './nuggets-workflow.js'
import { state } from '../state.js'
import { getStorageStatus, loadUserProgress } from '../data.js'
import { getStudyCatalog } from '../study-helpers.js'
@@ -152,6 +153,7 @@ async function buildNuggets() {
const weekAgo = Date.now() - 7 * DAY_MS
return {
uploadsThisWeek: entries.filter(e => new Date(e.uploadedAt).getTime() >= weekAgo).length,
pending: await countPendingUploads(),
latest: entries.slice(0, 3).map(e => ({ hostName: e.hostName, episodeName: e.episodeName, uploadedAt: e.uploadedAt })),
entries: entries.slice(0, 10),
}
@@ -236,7 +238,7 @@ export function register(app) {
reengagement: buildReengagement(),
studyProgress,
latestEpisode,
nuggets: { uploadsThisWeek: nuggets.uploadsThisWeek, latest: nuggets.latest },
nuggets: { uploadsThisWeek: nuggets.uploadsThisWeek, pending: nuggets.pending, latest: nuggets.latest },
health,
lastBroadcast,
comments: {