diff --git a/app/api/graph/status/route.ts b/app/api/graph/status/route.ts index cedf82f..82dbde3 100644 --- a/app/api/graph/status/route.ts +++ b/app/api/graph/status/route.ts @@ -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 diff --git a/components/graph-view.tsx b/components/graph-view.tsx index 5f7297a..a2b2a28 100644 --- a/components/graph-view.tsx +++ b/components/graph-view.tsx @@ -1067,7 +1067,10 @@ export function GraphView() { // merge is its own graph change and must surface immediately, not wait // for the whole feed to drain. A redundant fetch on aborted runs is // free — the same doctrine as the deletion-refresh path below. - const [pipelineRuns, setPipelineRuns] = useState<{ chatId: string; title: string; phase: string; startedAt: number }[]>([]); + // Row ids are the registry JOB keys (source id, or "src#i" for chunk + // jobs) — unique per pill; chatId stays the SOURCE id (reveal/cost + // tracking is source-scoped). + const [pipelineRuns, setPipelineRuns] = useState<{ id: string; chatId: string; title: string; phase: string; startedAt: number }[]>([]); useEffect(() => { let cancelled = false; let prevIds = new Set(); @@ -1552,7 +1555,7 @@ export function GraphView() { {costs && costs.runs.length > 0 && } {pipelineRuns.map((run) => (