Files
MindSift/internal/api/voice_tail_test.go
T
sandrodachandClaude Opus 5.5 6f2eb08489
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m33s
fix: deepen opens the linked note, task list columns in "Alle Aufgaben", Whisper repeats, date field
- The deepen buttons of task rows and Kanban cards open an already linked note (accent colour)
  instead of creating another one; the server refuses a second note for a linked task as well.
- "Alle Aufgaben" uses each task's own list columns for the status selector, dot and detail.
- Whisper: send vad_filter (STT_VAD_FILTER, default on) and drop a verbatim repeated tail of
  sentences or words from the transcript.
- Task detail: narrower time field, wider date field in the desktop sidebar.

v0.37.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 13:28:52 +01:00

21 lines
991 B
Go

package api
import "testing"
// Whisper sometimes repeats earlier sentences or the last words at the end of a longer recording.
func TestDropRepeatedTail(t *testing.T) {
for _, tc := range []struct{ in, want string }{
{"Morgen den Filter wechseln. Dann die Heizung prüfen. Morgen den Filter wechseln.", "Morgen den Filter wechseln. Dann die Heizung prüfen."},
{"Erst einkaufen. Dann kochen. Danach abwaschen. Dann kochen. Danach abwaschen.", "Erst einkaufen. Dann kochen. Danach abwaschen."},
{"bitte die neue Version auf dem Server einspielen bitte die neue Version auf dem Server einspielen", "bitte die neue Version auf dem Server einspielen"},
// Nothing repeated, or only a short word: unchanged
{"Ja. Nein. Ja.", "Ja. Nein. Ja."},
{"Kauf Milch, Brot und Eier. Und Butter.", "Kauf Milch, Brot und Eier. Und Butter."},
{"", ""},
} {
if got := dropRepeatedTail(tc.in); got != tc.want {
t.Errorf("dropRepeatedTail(%q) = %q, want %q", tc.in, got, tc.want)
}
}
}