detached 3385561

chore: bump dependencies and soften shutdown audio warning

commit
338556184ea823dfbcb99189c0074744d95b8932
author
brice · · 2026-05-15 13:21 UTC
parent
27cbd02
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
4 files · +107 -61
M go.mod +18 -15
@@ -8,7 +8,7 @@ require (
88 github.com/bnema/purego v0.11.0-bnema.2
99 github.com/bnema/purego-cef v0.13.0
1010 github.com/bnema/purego-cef2gtk v0.1.1
11- github.com/bnema/purego-pipewire v0.1.2
11+ github.com/bnema/purego-pipewire v0.1.3
1212 github.com/bnema/purego-sqlite v0.1.2
1313 github.com/bnema/puregotk v0.5.2
1414 github.com/charmbracelet/bubbles v1.0.0
@@ -32,25 +32,25 @@ require (
3232 github.com/atotto/clipboard v0.1.4 // indirect
3333 github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
3434 github.com/cenkalti/backoff/v4 v4.3.0 // indirect
35- github.com/charmbracelet/colorprofile v0.4.1 // indirect
36- github.com/charmbracelet/x/ansi v0.11.6 // indirect
35+ github.com/charmbracelet/colorprofile v0.4.3 // indirect
36+ github.com/charmbracelet/x/ansi v0.11.7 // indirect
3737 github.com/charmbracelet/x/cellbuf v0.0.15 // indirect
38+ github.com/charmbracelet/x/exp/golden v0.0.0-20260511125431-fe5d686e0c99 // indirect
3839 github.com/charmbracelet/x/term v0.2.2 // indirect
3940 github.com/cli/browser v1.3.0 // indirect
40- github.com/clipperhouse/displaywidth v0.9.0 // indirect
41- github.com/clipperhouse/stringish v0.1.1 // indirect
42- github.com/clipperhouse/uax29/v2 v2.5.0 // indirect
41+ github.com/clipperhouse/displaywidth v0.11.0 // indirect
42+ github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
4343 github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
4444 github.com/davecgh/go-spew v1.1.1 // indirect
4545 github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
46- github.com/fatih/color v1.16.0 // indirect
46+ github.com/fatih/color v1.19.0 // indirect
4747 github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
4848 github.com/inconshreveable/mousetrap v1.1.0 // indirect
49- github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
49+ github.com/lucasb-eyer/go-colorful v1.4.0 // indirect
5050 github.com/mattn/go-colorable v0.1.14 // indirect
51- github.com/mattn/go-isatty v0.0.21 // indirect
51+ github.com/mattn/go-isatty v0.0.22 // indirect
5252 github.com/mattn/go-localereader v0.0.1 // indirect
53- github.com/mattn/go-runewidth v0.0.19 // indirect
53+ github.com/mattn/go-runewidth v0.0.23 // indirect
5454 github.com/mfridman/interpolate v0.0.2 // indirect
5555 github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
5656 github.com/muesli/cancelreader v0.2.2 // indirect
@@ -61,7 +61,7 @@ require (
6161 github.com/rogpeppe/go-internal v1.14.1 // indirect
6262 github.com/russross/blackfriday/v2 v2.1.0 // indirect
6363 github.com/sagikazarmark/locafero v0.12.0 // indirect
64- github.com/sahilm/fuzzy v0.1.1 // indirect
64+ github.com/sahilm/fuzzy v0.1.2 // indirect
6565 github.com/sethvargo/go-retry v0.3.0 // indirect
6666 github.com/spf13/afero v1.15.0 // indirect
6767 github.com/spf13/cast v1.10.0 // indirect
@@ -69,14 +69,17 @@ require (
6969 github.com/stretchr/objx v0.5.3 // indirect
7070 github.com/subosito/gotenv v1.6.0 // indirect
7171 github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
72+ github.com/xyproto/randomstring v1.2.0 // indirect
7273 go.uber.org/multierr v1.11.0 // indirect
7374 go.yaml.in/yaml/v3 v3.0.4 // indirect
74- golang.org/x/mod v0.35.0 // indirect
75- golang.org/x/net v0.53.0 // indirect
75+ golang.org/x/exp v0.0.0-20260508232706-74f9aab9d74a // indirect
76+ golang.org/x/mod v0.36.0 // indirect
77+ golang.org/x/net v0.54.0 // indirect
7678 golang.org/x/sync v0.20.0 // indirect
7779 golang.org/x/text v0.37.0 // indirect
78- golang.org/x/tools v0.44.0 // indirect
79- gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
80+ golang.org/x/tools v0.45.0 // indirect
81+ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
82+ modernc.org/sqlite v1.50.1 // indirect
8083 )
8184
8285 tool github.com/a-h/templ/cmd/templ
@@ -8,7 +8,7 @@ require (
8 github.com/bnema/purego v0.11.0-bnema.28 github.com/bnema/purego v0.11.0-bnema.2
9 github.com/bnema/purego-cef v0.13.09 github.com/bnema/purego-cef v0.13.0
10 github.com/bnema/purego-cef2gtk v0.1.110 github.com/bnema/purego-cef2gtk v0.1.1
11- github.com/bnema/purego-pipewire v0.1.211+ github.com/bnema/purego-pipewire v0.1.3
12 github.com/bnema/purego-sqlite v0.1.212 github.com/bnema/purego-sqlite v0.1.2
13 github.com/bnema/puregotk v0.5.213 github.com/bnema/puregotk v0.5.2
14 github.com/charmbracelet/bubbles v1.0.014 github.com/charmbracelet/bubbles v1.0.0
@@ -32,25 +32,25 @@ require (
32 github.com/atotto/clipboard v0.1.4 // indirect32 github.com/atotto/clipboard v0.1.4 // indirect
33 github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect33 github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
34 github.com/cenkalti/backoff/v4 v4.3.0 // indirect34 github.com/cenkalti/backoff/v4 v4.3.0 // indirect
35- github.com/charmbracelet/colorprofile v0.4.1 // indirect35+ github.com/charmbracelet/colorprofile v0.4.3 // indirect
36- github.com/charmbracelet/x/ansi v0.11.6 // indirect36+ github.com/charmbracelet/x/ansi v0.11.7 // indirect
37 github.com/charmbracelet/x/cellbuf v0.0.15 // indirect37 github.com/charmbracelet/x/cellbuf v0.0.15 // indirect
38+ github.com/charmbracelet/x/exp/golden v0.0.0-20260511125431-fe5d686e0c99 // indirect
38 github.com/charmbracelet/x/term v0.2.2 // indirect39 github.com/charmbracelet/x/term v0.2.2 // indirect
39 github.com/cli/browser v1.3.0 // indirect40 github.com/cli/browser v1.3.0 // indirect
40- github.com/clipperhouse/displaywidth v0.9.0 // indirect41+ github.com/clipperhouse/displaywidth v0.11.0 // indirect
41- github.com/clipperhouse/stringish v0.1.1 // indirect42+ github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
42- github.com/clipperhouse/uax29/v2 v2.5.0 // indirect
43 github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect43 github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
44 github.com/davecgh/go-spew v1.1.1 // indirect44 github.com/davecgh/go-spew v1.1.1 // indirect
45 github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect45 github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
46- github.com/fatih/color v1.16.0 // indirect46+ github.com/fatih/color v1.19.0 // indirect
47 github.com/go-viper/mapstructure/v2 v2.5.0 // indirect47 github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
48 github.com/inconshreveable/mousetrap v1.1.0 // indirect48 github.com/inconshreveable/mousetrap v1.1.0 // indirect
49- github.com/lucasb-eyer/go-colorful v1.3.0 // indirect49+ github.com/lucasb-eyer/go-colorful v1.4.0 // indirect
50 github.com/mattn/go-colorable v0.1.14 // indirect50 github.com/mattn/go-colorable v0.1.14 // indirect
51- github.com/mattn/go-isatty v0.0.21 // indirect51+ github.com/mattn/go-isatty v0.0.22 // indirect
52 github.com/mattn/go-localereader v0.0.1 // indirect52 github.com/mattn/go-localereader v0.0.1 // indirect
53- github.com/mattn/go-runewidth v0.0.19 // indirect53+ github.com/mattn/go-runewidth v0.0.23 // indirect
54 github.com/mfridman/interpolate v0.0.2 // indirect54 github.com/mfridman/interpolate v0.0.2 // indirect
55 github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect55 github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
56 github.com/muesli/cancelreader v0.2.2 // indirect56 github.com/muesli/cancelreader v0.2.2 // indirect
@@ -61,7 +61,7 @@ require (
61 github.com/rogpeppe/go-internal v1.14.1 // indirect61 github.com/rogpeppe/go-internal v1.14.1 // indirect
62 github.com/russross/blackfriday/v2 v2.1.0 // indirect62 github.com/russross/blackfriday/v2 v2.1.0 // indirect
63 github.com/sagikazarmark/locafero v0.12.0 // indirect63 github.com/sagikazarmark/locafero v0.12.0 // indirect
64- github.com/sahilm/fuzzy v0.1.1 // indirect64+ github.com/sahilm/fuzzy v0.1.2 // indirect
65 github.com/sethvargo/go-retry v0.3.0 // indirect65 github.com/sethvargo/go-retry v0.3.0 // indirect
66 github.com/spf13/afero v1.15.0 // indirect66 github.com/spf13/afero v1.15.0 // indirect
67 github.com/spf13/cast v1.10.0 // indirect67 github.com/spf13/cast v1.10.0 // indirect
@@ -69,14 +69,17 @@ require (
69 github.com/stretchr/objx v0.5.3 // indirect69 github.com/stretchr/objx v0.5.3 // indirect
70 github.com/subosito/gotenv v1.6.0 // indirect70 github.com/subosito/gotenv v1.6.0 // indirect
71 github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect71 github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
72+ github.com/xyproto/randomstring v1.2.0 // indirect
72 go.uber.org/multierr v1.11.0 // indirect73 go.uber.org/multierr v1.11.0 // indirect
73 go.yaml.in/yaml/v3 v3.0.4 // indirect74 go.yaml.in/yaml/v3 v3.0.4 // indirect
74- golang.org/x/mod v0.35.0 // indirect75+ golang.org/x/exp v0.0.0-20260508232706-74f9aab9d74a // indirect
75- golang.org/x/net v0.53.0 // indirect76+ golang.org/x/mod v0.36.0 // indirect
77+ golang.org/x/net v0.54.0 // indirect
76 golang.org/x/sync v0.20.0 // indirect78 golang.org/x/sync v0.20.0 // indirect
77 golang.org/x/text v0.37.0 // indirect79 golang.org/x/text v0.37.0 // indirect
78- golang.org/x/tools v0.44.0 // indirect80+ golang.org/x/tools v0.45.0 // indirect
79- gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect81+ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
82+ modernc.org/sqlite v1.50.1 // indirect
80 )83 )
81 84
82 tool github.com/a-h/templ/cmd/templ85 tool github.com/a-h/templ/cmd/templ
M go.sum +43 -44 generated file: collapsed
M internal/infrastructure/cef/webview_audio_test.go +38 -0
@@ -1,14 +1,18 @@
11 package cef
22
33 import (
4+ "bytes"
45 "context"
56 "errors"
7+ "strings"
68 "testing"
79 "time"
810
911 "github.com/bnema/dumber/internal/application/port"
1012 "github.com/bnema/dumber/internal/infrastructure/audio/null"
13+ "github.com/bnema/dumber/internal/logging"
1114 purecef "github.com/bnema/purego-cef/cef"
15+ "github.com/rs/zerolog"
1216 "github.com/stretchr/testify/assert"
1317 "github.com/stretchr/testify/require"
1418 )
@@ -416,6 +420,40 @@ func TestHandlerSet_OnAudioStreamError_NoActiveStream_DoesNotPanic(t *testing.T)
416420 assert.False(t, wv.audioPlaying.Load())
417421 }
418422
423+func TestHandlerSet_OnAudioStreamError_LogsWarnForNormalError(t *testing.T) {
424+ var logs bytes.Buffer
425+ logger := zerolog.New(&logs).Level(zerolog.DebugLevel)
426+ ctx := logging.WithContext(context.Background(), logger)
427+
428+ wv := &WebView{ctx: ctx}
429+ handlers := &handlerSet{wv: wv}
430+
431+ handlers.OnAudioStreamError(nil, "test error")
432+
433+ output := logs.String()
434+ assert.Contains(t, output, `"level":"warn"`)
435+ assert.Contains(t, output, `"message":"cef: audio stream error"`)
436+ assert.Contains(t, output, `"error":"test error"`)
437+}
438+
439+func TestHandlerSet_OnAudioStreamError_ShutdownSocketCloseLogsDebug(t *testing.T) {
440+ var logs bytes.Buffer
441+ logger := zerolog.New(&logs).Level(zerolog.DebugLevel)
442+ ctx := logging.WithContext(context.Background(), logger)
443+
444+ wv := &WebView{ctx: ctx}
445+ wv.destroyed.Store(true)
446+ handlers := &handlerSet{wv: wv}
447+
448+ handlers.OnAudioStreamError(nil, "Socket closed unexpectedly")
449+
450+ output := logs.String()
451+ assert.Contains(t, output, `"level":"debug"`)
452+ assert.NotContains(t, output, `"level":"warn"`)
453+ assert.Contains(t, output, `"message":"cef: audio stream closed during shutdown"`)
454+ assert.True(t, strings.Contains(output, `"error":"Socket closed unexpectedly"`))
455+}
456+
419457 // TestWebView_Destroy_ClosesAudioStream verifies that destroying
420458 // the WebView closes any active audio stream.
421459 func TestWebView_Destroy_ClosesAudioStream(t *testing.T) {
@@ -1,14 +1,18 @@
1 package cef1 package cef
2 2
3 import (3 import (
4+ "bytes"
4 "context"5 "context"
5 "errors"6 "errors"
7+ "strings"
6 "testing"8 "testing"
7 "time"9 "time"
8 10
9 "github.com/bnema/dumber/internal/application/port"11 "github.com/bnema/dumber/internal/application/port"
10 "github.com/bnema/dumber/internal/infrastructure/audio/null"12 "github.com/bnema/dumber/internal/infrastructure/audio/null"
13+ "github.com/bnema/dumber/internal/logging"
11 purecef "github.com/bnema/purego-cef/cef"14 purecef "github.com/bnema/purego-cef/cef"
15+ "github.com/rs/zerolog"
12 "github.com/stretchr/testify/assert"16 "github.com/stretchr/testify/assert"
13 "github.com/stretchr/testify/require"17 "github.com/stretchr/testify/require"
14 )18 )
@@ -416,6 +420,40 @@ func TestHandlerSet_OnAudioStreamError_NoActiveStream_DoesNotPanic(t *testing.T)
416 assert.False(t, wv.audioPlaying.Load())420 assert.False(t, wv.audioPlaying.Load())
417 }421 }
418 422
423+func TestHandlerSet_OnAudioStreamError_LogsWarnForNormalError(t *testing.T) {
424+ var logs bytes.Buffer
425+ logger := zerolog.New(&logs).Level(zerolog.DebugLevel)
426+ ctx := logging.WithContext(context.Background(), logger)
427+
428+ wv := &WebView{ctx: ctx}
429+ handlers := &handlerSet{wv: wv}
430+
431+ handlers.OnAudioStreamError(nil, "test error")
432+
433+ output := logs.String()
434+ assert.Contains(t, output, `"level":"warn"`)
435+ assert.Contains(t, output, `"message":"cef: audio stream error"`)
436+ assert.Contains(t, output, `"error":"test error"`)
437+}
438+
439+func TestHandlerSet_OnAudioStreamError_ShutdownSocketCloseLogsDebug(t *testing.T) {
440+ var logs bytes.Buffer
441+ logger := zerolog.New(&logs).Level(zerolog.DebugLevel)
442+ ctx := logging.WithContext(context.Background(), logger)
443+
444+ wv := &WebView{ctx: ctx}
445+ wv.destroyed.Store(true)
446+ handlers := &handlerSet{wv: wv}
447+
448+ handlers.OnAudioStreamError(nil, "Socket closed unexpectedly")
449+
450+ output := logs.String()
451+ assert.Contains(t, output, `"level":"debug"`)
452+ assert.NotContains(t, output, `"level":"warn"`)
453+ assert.Contains(t, output, `"message":"cef: audio stream closed during shutdown"`)
454+ assert.True(t, strings.Contains(output, `"error":"Socket closed unexpectedly"`))
455+}
456+
419 // TestWebView_Destroy_ClosesAudioStream verifies that destroying457 // TestWebView_Destroy_ClosesAudioStream verifies that destroying
420 // the WebView closes any active audio stream.458 // the WebView closes any active audio stream.
421 func TestWebView_Destroy_ClosesAudioStream(t *testing.T) {459 func TestWebView_Destroy_ClosesAudioStream(t *testing.T) {
M internal/infrastructure/cef/webview_handlers.go +8 -2
@@ -1080,11 +1080,17 @@ func (h *handlerSet) OnAudioStreamStopped(_ purecef.Browser) {
10801080 // OnAudioStreamError handles stream errors.
10811081 func (h *handlerSet) OnAudioStreamError(_ purecef.Browser, message string) {
10821082 if h.wv.ctx != nil {
1083- logging.FromContext(h.wv.ctx).Warn().
1083+ event := logging.FromContext(h.wv.ctx).Warn()
1084+ logMsg := "cef: audio stream error"
1085+ if h.wv.destroyed.Load() && message == "Socket closed unexpectedly" {
1086+ event = logging.FromContext(h.wv.ctx).Debug()
1087+ logMsg = "cef: audio stream closed during shutdown"
1088+ }
1089+ event.
10841090 Str("error", message).
10851091 Uint64("packets_received", h.wv.audioPacketCount.Load()).
10861092 Uint64("writes_succeeded", h.wv.audioWriteCount.Load()).
1087- Msg("cef: audio stream error")
1093+ Msg(logMsg)
10881094 }
10891095 h.wv.setAudioPlaying(false)
10901096 h.wv.closeAudioStream()
@@ -1080,11 +1080,17 @@ func (h *handlerSet) OnAudioStreamStopped(_ purecef.Browser) {
1080 // OnAudioStreamError handles stream errors.1080 // OnAudioStreamError handles stream errors.
1081 func (h *handlerSet) OnAudioStreamError(_ purecef.Browser, message string) {1081 func (h *handlerSet) OnAudioStreamError(_ purecef.Browser, message string) {
1082 if h.wv.ctx != nil {1082 if h.wv.ctx != nil {
1083- logging.FromContext(h.wv.ctx).Warn().1083+ event := logging.FromContext(h.wv.ctx).Warn()
1084+ logMsg := "cef: audio stream error"
1085+ if h.wv.destroyed.Load() && message == "Socket closed unexpectedly" {
1086+ event = logging.FromContext(h.wv.ctx).Debug()
1087+ logMsg = "cef: audio stream closed during shutdown"
1088+ }
1089+ event.
1084 Str("error", message).1090 Str("error", message).
1085 Uint64("packets_received", h.wv.audioPacketCount.Load()).1091 Uint64("packets_received", h.wv.audioPacketCount.Load()).
1086 Uint64("writes_succeeded", h.wv.audioWriteCount.Load()).1092 Uint64("writes_succeeded", h.wv.audioWriteCount.Load()).
1087- Msg("cef: audio stream error")1093+ Msg(logMsg)
1088 }1094 }
1089 h.wv.setAudioPlaying(false)1095 h.wv.setAudioPlaying(false)
1090 h.wv.closeAudioStream()1096 h.wv.closeAudioStream()

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close