detached 929f98f

fix(favicon): guard against nil texture overwriting good favicon in GetOrFetch callback

The async GetOrFetch callback could return nil (WebKit DB empty at commit
time, DuckDuckGo ICO parse failure) and overwrite a valid favicon that was
already set by an earlier notify::favicon signal. Skip nil results since
they mean 'could not resolve', not 'no favicon exists'.
commit
929f98fa3f544f2407440bc11fbb09b12ea0c3db
author
brice · · 2026-03-13 05:57 UTC
parent
4b76d6b
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +6 -0
M internal/ui/coordinator/content.go +6 -0
@@ -1091,6 +1091,12 @@ func (c *ContentCoordinator) resolveCommittedFavicon(ctx context.Context, paneID
10911091 // Capture current generation to guard against stale callbacks
10921092 gen := wv.Generation()
10931093 c.faviconAdapter.GetOrFetch(ctx, uri, func(texture *gdk.Texture) {
1094+ // Skip nil results — a nil means "couldn't resolve", not "no favicon".
1095+ // Without this guard, a late nil callback can overwrite a good favicon
1096+ // that was already set by an earlier onFaviconChanged signal.
1097+ if texture == nil {
1098+ return
1099+ }
10941100 // Verify WebView is still bound to pane and hasn't been reused
10951101 if wv.Generation() != gen {
10961102 return
@@ -1091,6 +1091,12 @@ func (c *ContentCoordinator) resolveCommittedFavicon(ctx context.Context, paneID
1091 // Capture current generation to guard against stale callbacks1091 // Capture current generation to guard against stale callbacks
1092 gen := wv.Generation()1092 gen := wv.Generation()
1093 c.faviconAdapter.GetOrFetch(ctx, uri, func(texture *gdk.Texture) {1093 c.faviconAdapter.GetOrFetch(ctx, uri, func(texture *gdk.Texture) {
1094+ // Skip nil results — a nil means "couldn't resolve", not "no favicon".
1095+ // Without this guard, a late nil callback can overwrite a good favicon
1096+ // that was already set by an earlier onFaviconChanged signal.
1097+ if texture == nil {
1098+ return
1099+ }
1094 // Verify WebView is still bound to pane and hasn't been reused1100 // Verify WebView is still bound to pane and hasn't been reused
1095 if wv.Generation() != gen {1101 if wv.Generation() != gen {
1096 return1102 return

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