From e3288d0654ae99dfab3285e169ce3f66af653142 Mon Sep 17 00:00:00 2001
From: Mathias
Date: Sun, 4 Oct 2026 22:41:42 +0200
Subject: [PATCH] feat(web): the language is named on the recording's page in
every state; the feature says what Other really does (#61)
The label moves from the done fragment to the page header, so queued, transcribing and
failed recordings show it too. The scenario no longer implies a general engine exists. Found
by the PR #62 review.
Co-Authored-By: Claude Sonnet 5.5
---
docs/use-cases/audio_upload.feature | 3 +-
internal/web/uploads.templ | 2 +-
internal/web/uploads_language_handler_test.go | 34 ++++++------
internal/web/uploads_templ.go | 52 +++++++++----------
4 files changed, 47 insertions(+), 44 deletions(-)
diff --git a/docs/use-cases/audio_upload.feature b/docs/use-cases/audio_upload.feature
index 76cc955..7db3219 100644
--- a/docs/use-cases/audio_upload.feature
+++ b/docs/use-cases/audio_upload.feature
@@ -289,4 +289,5 @@ Feature: Upload an audio recording, get a private Swedish transcript, discuss it
Scenario: A recording in another language never reaches the Swedish-only engine
When I choose Other for a recording
- Then the language is left for the engine to detect and no Swedish-only engine or reconcile is used
+ Then the language is left for the engine to detect and the Swedish-only base engine and the reconcile are not used
+ And the engine that does run is the configured one, which is not tuned for other languages
diff --git a/internal/web/uploads.templ b/internal/web/uploads.templ
index d85d1c5..60f9e4b 100644
--- a/internal/web/uploads.templ
+++ b/internal/web/uploads.templ
@@ -57,6 +57,7 @@ templ UploadPage(u domain.UploadedTranscript, chatEnabled bool, now time.Time) {
@Layout("Tapir — " + u.Title) {
@@ -74,7 +75,6 @@ templ uploadStatus(u domain.UploadedTranscript, chatEnabled bool, now time.Time)
Transcribed { uploads.FormatDuration(time.Duration(u.AudioSeconds * float64(time.Second))) }
of audio by { u.Endpoint }.
-
Language: { languageLabel(u.Language) }
if provider, cloud := cloudProvider(u.Endpoint); cloud {
This recording's audio left the homelab: it was transcribed by a cloud service ({ provider })
diff --git a/internal/web/uploads_language_handler_test.go b/internal/web/uploads_language_handler_test.go
index c96bc33..73ea735 100644
--- a/internal/web/uploads_language_handler_test.go
+++ b/internal/web/uploads_language_handler_test.go
@@ -127,23 +127,25 @@ func TestUploadPage_TheFormOffersSwedishPreselectedAndOtherBeforeTheFilePart(t *
assert.Contains(t, b, `