From b39352dbffbe132b4c245dfc9a0eab6ed7b94182 Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Mon, 13 Jul 2026 20:09:03 -0500 Subject: [PATCH] fix(diarization): clear stale speaker rows on reprocess so Participants pane matches (FR-SPK) Reprocess re-diarizes and upserts the new labels but never deleted the old ones, so get_meeting (Participants pane) kept returning the discarded run's labels (e.g. 83) while the transcript showed the new 5. Clear the meeting's speaker rows before finalize re-inserts the fresh set. --- src-tauri/src/commands.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs index 23e81a1..dd2b74e 100644 --- a/src-tauri/src/commands.rs +++ b/src-tauri/src/commands.rs @@ -1814,6 +1814,17 @@ pub async fn reprocess_transcript( } let speakers = speaker_infos_from_segments(&segments, &speaker_names); + // Drop the previous run's speaker rows before re-inserting the fresh set: + // the old labels key to the discarded clustering, so leaving them stranded + // in the DB makes the Participants pane show ghosts (e.g. 83 old labels + // when the new transcript has 5). finalize_meeting below re-upserts + // `speakers`. (FR-SPK) + state + .store + .clear_speakers(&meeting_id) + .await + .map_err(|e| WaError::new("storage", e.to_string()))?; + let duration_secs = segments .last() .map(|s| (s.end_ms / 1000) as i64)