From 38f100a83e8ba87de52cfc5aa4e23b847daf419d Mon Sep 17 00:00:00 2001 From: Igor Loskutov Date: Mon, 9 Feb 2026 14:28:11 -0500 Subject: [PATCH] fix: invalidate individual transcript query on TRANSCRIPT_STATUS user event The UserEventsProvider only invalidated the list query on status changes. The detail page's useTranscriptGet was never refreshed, so it never redirected to /processing on reprocess. --- www/app/lib/UserEventsProvider.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/www/app/lib/UserEventsProvider.tsx b/www/app/lib/UserEventsProvider.tsx index 1b58d3d2..611b1f99 100644 --- a/www/app/lib/UserEventsProvider.tsx +++ b/www/app/lib/UserEventsProvider.tsx @@ -5,7 +5,12 @@ import { useQueryClient } from "@tanstack/react-query"; import { WEBSOCKET_URL } from "./apiClient"; import { useAuth } from "./AuthProvider"; import { z } from "zod"; -import { invalidateTranscriptLists, TRANSCRIPT_SEARCH_URL } from "./apiHooks"; +import { + invalidateTranscript, + invalidateTranscriptLists, + TRANSCRIPT_SEARCH_URL, +} from "./apiHooks"; +import type { NonEmptyString } from "./utils"; import type { DagTask } from "./dagTypes"; export type { DagTask, DagTaskStatus } from "./dagTypes"; @@ -161,6 +166,12 @@ export function UserEventsProvider({ case "TRANSCRIPT_STATUS": { invalidateList().then(() => {}); const transcriptId = fullMsg.data?.id as string | undefined; + if (transcriptId) { + invalidateTranscript( + queryClient, + transcriptId as NonEmptyString, + ).then(() => {}); + } const status = fullMsg.data?.value as string | undefined; if (transcriptId && status && status !== "processing") { setDagStatusMap((prev) => {