feat(web): tell the user when a video track was ignored, in every state
A Teams meeting with the camera off is still a video file. It is accepted, only its audio is transcribed, and the page says so in queued, transcribing, done and failed -- not just at the end. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,6 +60,7 @@ templ uploadStatus(u domain.UploadedTranscript, chatEnabled bool) {
|
||||
switch u.Status {
|
||||
case domain.UploadDone:
|
||||
<div class="upload-status upload-done" role="status">
|
||||
@videoNotice(u.HadVideo)
|
||||
<p>
|
||||
Transcribed { uploads.FormatDuration(time.Duration(u.AudioSeconds * float64(time.Second))) }
|
||||
of audio by <span class="chip">{ u.Endpoint }</span>.
|
||||
@@ -74,6 +75,7 @@ templ uploadStatus(u domain.UploadedTranscript, chatEnabled bool) {
|
||||
</div>
|
||||
case domain.UploadFailed:
|
||||
<div class="upload-status upload-failed flash flash-error" role="alert">
|
||||
@videoNotice(u.HadVideo)
|
||||
<p>{ uploadFailureMessage(u.ErrorKind) }</p>
|
||||
</div>
|
||||
default:
|
||||
@@ -84,6 +86,7 @@ templ uploadStatus(u domain.UploadedTranscript, chatEnabled bool) {
|
||||
hx-trigger={ "every " + uploadPollEvery }
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
@videoNotice(u.HadVideo)
|
||||
if u.Status == domain.UploadTranscribing {
|
||||
<p>Transcribing… a long recording takes a few minutes.</p>
|
||||
} else {
|
||||
@@ -108,3 +111,15 @@ templ UploadChatPage(u domain.UploadedTranscript, v chatView) {
|
||||
</article>
|
||||
}
|
||||
}
|
||||
|
||||
// videoNotice tells the user a video track was present and what became of it. A
|
||||
// Teams meeting with the camera off is still a video file; it is accepted, only the
|
||||
// audio is transcribed, and the picture is thrown away — so say so, in every state,
|
||||
// instead of leaving the user to wonder (ADR-033).
|
||||
templ videoNotice(hadVideo bool) {
|
||||
if hadVideo {
|
||||
<p class="muted video-notice">
|
||||
This file contained a video track. Only its audio was used; the video was discarded and nothing from it was kept.
|
||||
</p>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user