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>
This commit is contained in:
hauke
2026-11-10 12:20:57 +01:00
co-authored by Claude Opus 5.5
parent 0ae6ed304f
commit 802a6f81fd
2 changed files with 29 additions and 13 deletions
+26 -13
View File
@@ -336,7 +336,7 @@
<UpdateBanner />
<aside class="sidebar">
<header class="sidebar-header">
<h1>Gespräche{#if openCount > 0} <span class="open-count">· {openCount} offen</span>{/if}</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"
@@ -529,36 +529,49 @@
.sidebar-header {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 4px 8px;
padding: 14px 12px 10px 16px;
gap: 4px;
padding: 12px 6px 8px 10px;
border-bottom: 1px solid var(--border);
}
.sidebar-header h1 {
flex: 1 1 auto;
flex: 0 1 auto;
min-width: 0;
font-size: 16px;
overflow-wrap: break-word;
font-size: 15px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.open-count {
font-size: 13px;
font-weight: 600;
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);
white-space: nowrap;
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;
}
@@ -575,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;
}