chore: close overview counts and review reliability workplans

This commit is contained in:
2026-06-07 17:36:59 +02:00
parent b14844351c
commit 99a66765f3
6 changed files with 351 additions and 9 deletions

View File

@@ -31,8 +31,8 @@ export function isOpenWorkstream(status) {
return OPEN_WORKSTREAM_STATUSES.includes(normalizeWorkstreamStatus(status));
}
export function isStalledWorkstream(w, staleDays = 7) {
const staleAt = new Date(Date.now() - staleDays * 24 * 60 * 60 * 1000);
export function isStalledWorkstream(w) {
const staleAt = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000);
const openTasks = (w.todo ?? 0) + (w.progress ?? 0) + (w.wait ?? 0);
return ["active", "blocked"].includes(normalizeWorkstreamStatus(w.status))
&& new Date(w.updated_at) < staleAt

View File

@@ -225,7 +225,7 @@ function _workstreamsForMode(mode, rows) {
return allRows.filter(w => normalizeWorkstreamStatus(w.status) === modeValue);
}
if (modeValue === "needs_review") return allRows.filter(needsReviewWorkstream);
if (modeValue === "stalled") return allRows.filter(isStalledWorkstream);
if (modeValue === "stalled") return allRows.filter(w => isStalledWorkstream(w));
const since = _timeCutoff(modeValue);
if (!since) return allRows.filter(w => normalizeWorkstreamStatus(w.status) === "active");