Graph view: unique pill keys for chunk jobs (second duplicate-key consumer)

The graph page's pipeline pills keyed rows by run.chatId — the source id,
shared by every chunk job of a fan-out (the dock got the same fix in
8f66f47; this consumer was missed). /api/graph/status rows now carry an
id (the registry job key: source id, or 'src#i'), and the pills key by
it. chatId stays the SOURCE id — the reveal refetch and per-run cost
refresh track chatId SETS, which dedupe naturally and fire when the
source's LAST row leaves the feed.
This commit is contained in:
amosblomqvist
2026-09-29 01:26:23 +03:00
parent 3d9d20794c
commit 4001c3465b
2 changed files with 10 additions and 2 deletions
+5
View File
@@ -13,6 +13,11 @@ export const dynamic = "force-dynamic";
export async function GET() {
const runs = extractionStatuses().map((run) => ({
// Unique row id (the registry job key: source id, or "src#i" for
// chunk jobs) — one source's rows share chatId, and React keys on
// it would collide. chatId stays the SOURCE id: reveal/cost
// tracking in the view is source-scoped by design.
id: run.part ? `${run.chatId}#${run.part.i}` : run.chatId,
chatId: run.chatId,
// The run's own label (the file path for notes imports) wins; chat
// runs fall back to the chat store's title. Chunk jobs append their