detached b0dae66

fix(favicon): populate stacked title bar favicons from cache on stack creation

When panes are converted from splits to stacks, new title bars are
created with default icons. The cached favicon textures were never
applied to these newly-created title bars because resolveCommittedFavicon
had already run (during the original page load) before the stack existed.

Now populates favicons from the texture cache immediately after stacked
view callbacks are set up, using each pane's current WebView URI.
commit
b0dae66947f4b399f6bcd39335ccf406d3b991f3
author
brice · · 2026-03-13 06:02 UTC
parent
929f98f
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +30 -0
M internal/ui/coordinator/workspace.go +30 -0
@@ -1713,6 +1713,36 @@ func (c *WorkspaceCoordinator) SetupStackedPaneCallbacks(ctx context.Context, ws
17131713 c.onStackedPaneClose(ctx, entity.PaneID(paneID))
17141714 })
17151715
1716+ // Populate stacked title bar favicons from cache.
1717+ // When panes are stacked (split → stack conversion) or restored from session,
1718+ // the title bars are created with default icons. We need to apply any cached
1719+ // favicon textures so they display correctly without waiting for a new navigation.
1720+ if fa := c.contentCoord.FaviconAdapter(); fa != nil {
1721+ for i, child := range node.Children {
1722+ if child.Pane == nil {
1723+ continue
1724+ }
1725+ // Try to get the pane's current URI from its WebView
1726+ uri := child.Pane.URI
1727+ if wv := c.contentCoord.GetWebView(child.Pane.ID); wv != nil {
1728+ if currentURI := wv.URI(); currentURI != "" {
1729+ uri = currentURI
1730+ }
1731+ }
1732+ if uri == "" {
1733+ continue
1734+ }
1735+ if texture := fa.GetTextureByURL(uri); texture != nil {
1736+ if err := stackedView.UpdateFaviconTexture(i, texture); err == nil {
1737+ log.Debug().
1738+ Str("pane_id", string(child.Pane.ID)).
1739+ Str("domain", domainurl.ExtractDomain(uri)).
1740+ Msg("populated stacked title bar favicon from cache")
1741+ }
1742+ }
1743+ }
1744+ }
1745+
17161746 log.Debug().
17171747 Str("stack_id", node.ID).
17181748 Int("stack_size", len(node.Children)).
@@ -1713,6 +1713,36 @@ func (c *WorkspaceCoordinator) SetupStackedPaneCallbacks(ctx context.Context, ws
1713 c.onStackedPaneClose(ctx, entity.PaneID(paneID))1713 c.onStackedPaneClose(ctx, entity.PaneID(paneID))
1714 })1714 })
1715 1715
1716+ // Populate stacked title bar favicons from cache.
1717+ // When panes are stacked (split → stack conversion) or restored from session,
1718+ // the title bars are created with default icons. We need to apply any cached
1719+ // favicon textures so they display correctly without waiting for a new navigation.
1720+ if fa := c.contentCoord.FaviconAdapter(); fa != nil {
1721+ for i, child := range node.Children {
1722+ if child.Pane == nil {
1723+ continue
1724+ }
1725+ // Try to get the pane's current URI from its WebView
1726+ uri := child.Pane.URI
1727+ if wv := c.contentCoord.GetWebView(child.Pane.ID); wv != nil {
1728+ if currentURI := wv.URI(); currentURI != "" {
1729+ uri = currentURI
1730+ }
1731+ }
1732+ if uri == "" {
1733+ continue
1734+ }
1735+ if texture := fa.GetTextureByURL(uri); texture != nil {
1736+ if err := stackedView.UpdateFaviconTexture(i, texture); err == nil {
1737+ log.Debug().
1738+ Str("pane_id", string(child.Pane.ID)).
1739+ Str("domain", domainurl.ExtractDomain(uri)).
1740+ Msg("populated stacked title bar favicon from cache")
1741+ }
1742+ }
1743+ }
1744+ }
1745+
1716 log.Debug().1746 log.Debug().
1717 Str("stack_id", node.ID).1747 Str("stack_id", node.ID).
1718 Int("stack_size", len(node.Children)).1748 Int("stack_size", len(node.Children)).

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