4 Commits
Author SHA1 Message Date
hauke 7a45d20f46 chore #14740: release 0.2.4 2026-11-10 12:54:12 +01:00
haukeandClaude Opus 5.5 802a6f81fd fix #14740: compact open-count badge in the sidebar header
Review found two bugs in 0ae6ed3: the " · N offen" suffix lost its
leading space to Svelte's whitespace trimming, and the header wrapped
the record button + gear onto a second line whenever N > 0, at both
the ~288px default and the 260px sidebar floor.

Replaces the text suffix with a small rounded count badge (same blue
as the row dots) right after "Gespräche", with title/aria-label "N
offen", and tightens the header so it fits on one line even at the
260px floor with a two-digit count. Also gives the row dot a thin
white ring so it stays visible on the selected row's tinted
background.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-10 12:20:57 +01:00
haukeandClaude Opus 5.5 0ae6ed304f feat #14740: done only once uploaded
A done call only shows "fertig" once its transcript reached this
build's backend (uploaded_here); otherwise it's "bereit zum
Hochladen". The list row gets a blue dot for anything needing action
(ready to upload or not transcribed yet), and the sidebar header shows
"Gespräche · N offen".

Adds ListState/needs_action to CallListItem, computed in
recorder-core so the UI doesn't re-implement the rule.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-10 12:09:08 +01:00
hauke 183c135b1d chore #14740: update feed 0.2.3 2026-11-09 15:08:10 +01:00
10 changed files with 205 additions and 22 deletions
Generated
+1 -1
View File
@@ -445,7 +445,7 @@ dependencies = [
[[package]]
name = "call-recorder"
version = "0.2.3"
version = "0.2.4"
dependencies = [
"async-trait",
"chrono",
+113
View File
@@ -18,6 +18,15 @@ pub struct CallListItem {
/// Whole seconds from start to end; 0 while recording.
pub duration_secs: i64,
pub status: CallStatus,
/// What the status pill shows and whether the row needs the user's
/// attention — see [`ListState`]. Computed from `status` and
/// [`uploaded_here`] so the UI does not re-implement the rule.
pub list_state: ListState,
/// Whether this row needs the user to act on it (the dot in
/// `CallList.svelte` and the sidebar header's "N offen" count). Equal
/// to `list_state.needs_action()`, kept as its own field so the UI
/// does not need to know `ListState`'s variants to filter by it.
pub needs_action: bool,
pub interrupted: bool,
/// The name the user gave the call, if any.
pub title: Option<String>,
@@ -35,12 +44,15 @@ impl CallListItem {
/// row. Nothing is deleted; the fields are just not shown as set.
pub fn of(call: &Call, backend_url: &str) -> Self {
let uploaded = uploaded_here(call, backend_url);
let list_state = ListState::of(call.status, uploaded);
Self {
id: call.id,
app: call.app.clone(),
started_at: call.started_at,
duration_secs: duration_secs(call),
status: call.status,
list_state,
needs_action: list_state.needs_action(),
interrupted: call.interrupted,
title: call.title.clone(),
crm_transcript_id: if uploaded {
@@ -53,6 +65,45 @@ impl CallListItem {
}
}
/// What the call list row (and the detail header's pill) shows about a
/// call's status. Mirrors [`CallStatus`] one-to-one, except that `Done`
/// splits in two: a call is only ever shown as done ("fertig") once its
/// transcript has actually reached *this build's* backend ([`uploaded_here`]);
/// otherwise — never uploaded, or uploaded to a different backend — it is
/// `ReadyToUpload` ("bereit zum Hochladen"), because from this build's
/// point of view the CRM has not seen it yet.
#[derive(Serialize, Clone, Copy, Debug, PartialEq, Eq)]
#[serde(rename_all = "snake_case")]
pub enum ListState {
Recording,
AwaitingDecision,
Processing,
Failed,
Done,
ReadyToUpload,
}
impl ListState {
fn of(status: CallStatus, uploaded_here: bool) -> Self {
match status {
CallStatus::Recording => ListState::Recording,
CallStatus::AwaitingDecision => ListState::AwaitingDecision,
CallStatus::Processing => ListState::Processing,
CallStatus::Failed => ListState::Failed,
CallStatus::Done if uploaded_here => ListState::Done,
CallStatus::Done => ListState::ReadyToUpload,
}
}
/// Whether a row in this state needs the user to act on it: not yet
/// transcribed, or transcribed but not uploaded here. Excludes
/// `Failed` (already shown in red) and the transient
/// `Recording`/`Processing` states.
pub fn needs_action(self) -> bool {
matches!(self, ListState::AwaitingDecision | ListState::ReadyToUpload)
}
}
/// Whole seconds from `started_at` to `ended_at`; 0 while the call has not
/// ended (and never negative).
pub fn duration_secs(call: &Call) -> i64 {
@@ -318,6 +369,8 @@ mod tests {
started_at: at(10, 14, 0),
duration_secs: 60,
status: CallStatus::AwaitingDecision,
list_state: ListState::AwaitingDecision,
needs_action: true,
interrupted: true,
title: None,
crm_transcript_id: None,
@@ -351,6 +404,64 @@ mod tests {
assert!(uploaded_here(&c, BACKEND));
}
#[test]
fn done_is_fertig_only_once_uploaded_to_this_backend() {
let mut c = call(Some(at(10, 15, 0)));
c.status = CallStatus::Done;
// Never uploaded.
assert_eq!(
CallListItem::of(&c, BACKEND).list_state,
ListState::ReadyToUpload
);
// Uploaded, but to a different backend.
c.crm_transcript_id = Some("4711".into());
c.crm_base_url = Some(OTHER_BACKEND.into());
assert_eq!(
CallListItem::of(&c, BACKEND).list_state,
ListState::ReadyToUpload
);
// Uploaded to this build's backend.
c.crm_base_url = Some(BACKEND.into());
assert_eq!(CallListItem::of(&c, BACKEND).list_state, ListState::Done);
}
#[test]
fn needs_action_marks_awaiting_and_ready_to_upload_only() {
let mut c = call(Some(at(10, 15, 0)));
c.status = CallStatus::AwaitingDecision;
assert!(CallListItem::of(&c, BACKEND).needs_action, "awaiting");
c.status = CallStatus::Done;
assert!(
CallListItem::of(&c, BACKEND).needs_action,
"done, never uploaded"
);
for status in [
CallStatus::Processing,
CallStatus::Failed,
CallStatus::Recording,
] {
c.status = status;
assert!(
!CallListItem::of(&c, BACKEND).needs_action,
"{status:?} must not show the dot"
);
}
c.status = CallStatus::Done;
c.crm_transcript_id = Some("4711".into());
c.crm_base_url = Some(BACKEND.into());
assert!(
!CallListItem::of(&c, BACKEND).needs_action,
"done and uploaded here"
);
}
#[test]
fn an_upload_to_another_backend_is_hidden_from_the_list_item() {
// Uploaded to OTHER_BACKEND; this build's backend is BACKEND: the
@@ -503,6 +614,8 @@ mod tests {
"started_at": serde_json::to_value(at(10, 14, 0)).unwrap(),
"duration_secs": 60,
"status": "failed",
"list_state": "failed",
"needs_action": false,
"interrupted": false,
"title": "Reklamation",
"crm_transcript_id": null,
+4 -4
View File
@@ -1,10 +1,10 @@
{
"version": "0.2.2",
"pub_date": "2026-11-09T11:05:43Z",
"version": "0.2.3",
"pub_date": "2026-11-09T13:59:09Z",
"platforms": {
"windows-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUdGpRa1ZvalU2SVB0NjJZT09kazJxZlBBWi9tQWZFSUtZVTRaVnNDdnFsSUJZeDc2QWZybytFL2lUR1E5QStWY3k5Tk5xSUMxM1M3TFlhU1A5VUNkNzh0UlBvVDRMcndnPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzk0MjIyMzIxCWZpbGU6R2VzcHLDpGNoc3Jla29yZGVyXzAuMi4yX3g2NC1zZXR1cC5leGUJdmVyc2lvbjowLjIuMgpObWpiWWJKc1hodm1penNPc3BDM244elhiQ0kvUmF2ZUZVKzJSTkZ2aVArQzRTSUIvUXZ6Y0VYSUU1R3k3eFBnU1pid1ZMRHpDak9GYWtzYXdrSmlEZz09Cg==",
"url": "https://gitea.euvino.eu/public/call-recorder/releases/download/v0.2.2/Gespraechsrekorder_0.2.2_x64-setup.exe"
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUdGpRa1ZvalU2SUVjMGZZenR3QnZJN001NFBrcm41UnFQQUZPcXVZaXFyem43b3ZkR0dsTG9MQWR2aWxuWVdyVnlSb3lUN1hmZ0hqR0w4VkVRT2hNSlZqZit2bWc5a0E0PQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzk0MjMyNzIzCWZpbGU6R2VzcHLDpGNoc3Jla29yZGVyXzAuMi4zX3g2NC1zZXR1cC5leGUJdmVyc2lvbjowLjIuMwpkUWd5TS81eko5bDFMWm81YURPb3o2U1Z2NEtVQmM2L21XOW02MUhSVmE5WDdpNGVFR01VNkljRmNhREpuUUw2eXp2WXJSL1llM3FvZUtnMXhDakVDUT09Cg==",
"url": "https://gitea.euvino.eu/public/call-recorder/releases/download/v0.2.3/Gespraechsrekorder_0.2.3_x64-setup.exe"
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "call-recorder"
version = "0.2.3"
version = "0.2.4"
description = "Gesprächsrekorder desktop app"
edition = "2021"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Gesprächsrekorder",
"version": "0.2.3",
"version": "0.2.4",
"identifier": "eu.euvino.callrecorder",
"build": {
"frontendDist": "../ui/dist",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "ui",
"private": true,
"version": "0.2.3",
"version": "0.2.4",
"type": "module",
"scripts": {
"dev": "vite",
+20 -2
View File
@@ -28,12 +28,15 @@
aria-current={call.id === selectedId}
onclick={() => onselect(call.id)}
>
{#if call.needs_action}
<span class="dot" title="Offen" aria-label="Offen"></span>
{/if}
<span class="title">{call.title ?? appLine(call)}</span>
<span class="meta">
<span class="muted">
{call.title ? `${appLine(call)} · ` : ''}{formatListTime(call.started_at)}
</span>
<StatusPill status={call.status} interrupted={call.interrupted} />
<StatusPill state={call.list_state} interrupted={call.interrupted} />
</span>
</button>
</li>
@@ -53,11 +56,12 @@
}
.row {
position: relative;
display: flex;
flex-direction: column;
gap: 3px;
width: 100%;
padding: 9px 10px;
padding: 9px 10px 9px 18px;
border: none;
border-radius: 8px;
background: none;
@@ -67,6 +71,20 @@
cursor: pointer;
}
.dot {
position: absolute;
left: 7px;
top: 50%;
transform: translateY(-50%);
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--primary);
/* A thin ring so the dot stays visible against the selected row's
primary-soft background (and the hover background). */
box-shadow: 0 0 0 2px var(--surface);
}
.row:hover {
background: var(--bg);
}
+11 -5
View File
@@ -1,21 +1,22 @@
<script lang="ts">
import type { CallStatus } from './api'
import type { ListState } from './api'
let { status, interrupted = false }: { status: CallStatus; interrupted?: boolean } = $props()
let { state, interrupted = false }: { state: ListState; interrupted?: boolean } = $props()
const pills: Record<CallStatus, { text: string; kind: string }> = {
const pills: Record<ListState, { text: string; kind: string }> = {
done: { text: 'fertig', kind: 'done' },
ready_to_upload: { text: 'bereit zum Hochladen', kind: 'ready' },
processing: { text: 'wird verarbeitet…', kind: 'processing' },
awaiting_decision: { text: 'nicht transkribiert', kind: 'awaiting' },
failed: { text: 'fehlgeschlagen', kind: 'failed' },
recording: { text: 'Aufnahme läuft', kind: 'recording' },
}
let pill = $derived(pills[status])
let pill = $derived(pills[state])
</script>
<span class="pill status {pill.kind}">
{pill.text}{#if interrupted && status === 'awaiting_decision'}, unterbrochen{/if}
{pill.text}{#if interrupted && state === 'awaiting_decision'}, unterbrochen{/if}
</span>
<style>
@@ -28,6 +29,11 @@
color: var(--ok);
}
.ready {
background: var(--primary-soft);
color: var(--primary);
}
.processing {
background: #fff4d6;
color: #8a6100;
+16
View File
@@ -79,6 +79,18 @@ export interface PendingPrompt extends CallBrief {
export type CallStatus = 'recording' | 'awaiting_decision' | 'processing' | 'done' | 'failed'
/** What the status pill shows and whether the row needs the user's
* attention. Mirrors `CallStatus`, except `done` splits into `done`
* (uploaded to this build's backend — "fertig") and `ready_to_upload`
* (not uploaded here yet — "bereit zum Hochladen"). */
export type ListState =
| 'recording'
| 'awaiting_decision'
| 'processing'
| 'failed'
| 'done'
| 'ready_to_upload'
/** A row of the main window's call list. Times are RFC 3339. */
export interface CallListItem {
id: CallId
@@ -87,6 +99,10 @@ export interface CallListItem {
/** 0 while recording. */
duration_secs: number
status: CallStatus
list_state: ListState
/** Whether this row needs the user to act on it (the dot in the list,
* counted in the sidebar header's "N offen"). */
needs_action: boolean
interrupted: boolean
/** The name the user gave the call, if any. */
title: string | null
+37 -7
View File
@@ -326,13 +326,17 @@
// A failed start (e.g. missing key) also marks the call failed; its
// error is then shown once, in the failure box.
let shownActionError = $derived(actionError !== detail?.call.error ? actionError : '')
// Calls that still need the user's attention (not transcribed, or
// transcribed but not uploaded here) — shown as "Gespräche · N offen".
let openCount = $derived(calls.filter((c) => c.needs_action).length)
</script>
<main class="main">
<UpdateBanner />
<aside class="sidebar">
<header class="sidebar-header">
<h1>Gespräche</h1>
<h1>Gespräche{#if openCount > 0}<span class="open-count" title="{openCount} offen" aria-label="{openCount} offen">{openCount}</span>{/if}</h1>
<div class="header-actions">
<button
class="btn small record-btn"
@@ -381,7 +385,7 @@
<button class="edit-title" title="Titel ändern" onclick={startTitleEdit}>✎</button>
</h1>
{/if}
<StatusPill status={call.status} interrupted={call.interrupted} />
<StatusPill state={call.list_state} interrupted={call.interrupted} />
</div>
{#if editingTitle}
<p class="muted subline">Enter speichert, Esc bricht ab. Leer = Standardtitel.</p>
@@ -527,21 +531,47 @@
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 12px 10px 16px;
gap: 4px;
padding: 12px 6px 8px 10px;
border-bottom: 1px solid var(--border);
}
.sidebar-header h1 {
font-size: 16px;
flex: 0 1 auto;
min-width: 0;
font-size: 15px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.open-count {
display: inline-flex;
align-items: center;
justify-content: center;
margin-left: 4px;
min-width: 14px;
height: 14px;
padding: 0 3px;
border-radius: 999px;
background: var(--primary-soft);
color: var(--primary);
font-size: 10px;
font-weight: 700;
line-height: 1;
vertical-align: middle;
}
.header-actions {
display: flex;
flex-shrink: 0;
align-items: center;
gap: 6px;
gap: 3px;
}
.record-btn {
padding: 2px 6px;
font-size: 11px;
white-space: nowrap;
}
@@ -558,9 +588,9 @@
.gear {
color: var(--muted);
font-size: 18px;
font-size: 15px;
line-height: 1;
padding: 4px 6px;
padding: 3px 4px;
border-radius: 6px;
text-decoration: none;
}