Add the Config view: edit and save the settings, applied without a restart

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 23:31:13 +02:00
co-authored by Claude Sonnet 5.5
parent 0ccd02b3c5
commit a4ec9ad71e
25 changed files with 1168 additions and 54 deletions
+5 -4
View File
@@ -7,6 +7,7 @@ import (
"image/color"
"image/jpeg"
"image/png"
"sync/atomic"
"testing"
"time"
@@ -158,11 +159,11 @@ func TestCoverViewDraws(t *testing.T) {
func TestLoadCoverCachesAndDedupes(t *testing.T) {
a := newTestApp(t)
fetches := 0
var fetches atomic.Int32
var buf bytes.Buffer
png.Encode(&buf, stripes(10, 20))
ref := coverRef{key: "k", fetch: func(context.Context) ([]byte, error) {
fetches++
fetches.Add(1)
return buf.Bytes(), nil
}}
@@ -173,8 +174,8 @@ func TestLoadCoverCachesAndDedupes(t *testing.T) {
if len(a.coverCache.waiting["k"]) != 2 {
t.Fatalf("waiters = %d, want 2", len(a.coverCache.waiting["k"]))
}
if fetches > 1 {
t.Errorf("fetched %d times", fetches)
if n := fetches.Load(); n > 1 {
t.Errorf("fetched %d times", n)
}
}