feat #14740: main window with call list and transcript

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
hauke
2026-11-06 09:38:55 +01:00
co-authored by Claude Opus 5.5
parent cfde9690b2
commit d1658f5d9e
15 changed files with 1391 additions and 15 deletions
+29
View File
@@ -286,6 +286,17 @@ impl Store {
Ok(())
}
/// Drops the rename of `speaker_key`, so it shows its default label
/// again. Not an error if it was never renamed.
pub fn remove_speaker_name(&self, id: CallId, speaker_key: &str) -> Result<()> {
let conn = self.conn.lock().unwrap();
conn.execute(
"DELETE FROM speaker_names WHERE call_id = ?1 AND speaker_key = ?2",
params![id, speaker_key],
)?;
Ok(())
}
pub fn speaker_names(&self, id: CallId) -> Result<BTreeMap<String, String>> {
let conn = self.conn.lock().unwrap();
let mut stmt =
@@ -661,6 +672,24 @@ mod tests {
assert_eq!(names.get("remote:1").unwrap(), "Frau Mueller");
}
#[test]
fn a_removed_speaker_name_is_gone() {
let store = Store::open_in_memory().unwrap();
let id = store
.create_call("teams.exe", Local::now(), Path::new(""), Path::new(""))
.unwrap();
store
.set_speaker_name(id, "remote:1", "Frau Probe")
.unwrap();
store.set_speaker_name(id, "remote:2", "Herr Test").unwrap();
store.remove_speaker_name(id, "remote:1").unwrap();
store.remove_speaker_name(id, "remote:3").unwrap(); // never renamed
let names = store.speaker_names(id).unwrap();
assert_eq!(names.keys().collect::<Vec<_>>(), ["remote:2"]);
}
#[test]
fn list_newest_first() {
let store = Store::open_in_memory().unwrap();