Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pm-stack/aggregator/src/server-contexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { filtersFromQuery, ownerKey } from "./views.ts";
import { createWatchdogGapSyncQueue, watchdogDeliveries } from "./activity.ts";
import { loadFeed } from "./feed.ts";
import { AA_PLAN_FACTS } from "./aa.ts";
import { shouldFetchNeedsDrewCensus, type NeedsDrewCensus } from "./needs-drew.ts";
import { shouldFetchNeedsUserCensus, type NeedsUserCensus } from "./needs-drew.ts";
import {
buildHealth,
resolveBuildVersion,
Expand Down Expand Up @@ -394,16 +394,16 @@ export async function loadAttentionContext(opts: { census?: boolean } = {}) {
// the attention page render consumes it, so it opts in; the overview,
// Today, /api/attention.json and /api/coverage.json must not inherit
// that external dependency (Codex P2 on PR #3970).
const wantsCensus = shouldFetchNeedsDrewCensus(opts);
const wantsCensus = shouldFetchNeedsUserCensus(opts);
const [feed, summary, coverage, census] = await Promise.all([
source.attention().catch(() => []),
source.orchestration().catch(() => null),
source.coverage().catch(() => []),
// A source without the census (or a failed sweep) yields null and
// the view renders it as unavailable, never as an empty queue.
wantsCensus
? ((source.needsDrew?.() ?? Promise.resolve(null)).catch(() => null) as Promise<NeedsDrewCensus | null>)
: Promise.resolve<NeedsDrewCensus | null>(null),
? ((source.needsDrew?.() ?? Promise.resolve(null)).catch(() => null) as Promise<NeedsUserCensus | null>)
: Promise.resolve<NeedsUserCensus | null>(null),
]);
// Read the diagnosis AFTER orchestration() has run: the live source
// recomputes it on every orchestration read (#1139).
Expand Down