detached 5a2d950

fix(ui): avoid GTK critical on overlay removal

commit
5a2d9504330a8ae12fe0e08c6c559b8c01f241ef
author
brice · · 2025-12-27 15:55 UTC
parent
8556458
signature
unsigned
2 files · +17 -3
M internal/ui/app.go +5 -1
@@ -525,7 +525,11 @@ func (a *App) attachTabPickerToActivePane() {
525525 continue
526526 }
527527 if oldPV := view.GetPaneView(a.tabPickerPaneID); oldPV != nil {
528- oldPV.RemoveOverlayWidget(a.tabPickerWidget)
528+ if parent := a.tabPickerWidget.GetParent(); parent == oldPV.Overlay() {
529+ oldPV.RemoveOverlayWidget(a.tabPickerWidget)
530+ } else if parent != nil {
531+ a.tabPickerWidget.Unparent()
532+ }
529533 break
530534 }
531535 }
@@ -525,7 +525,11 @@ func (a *App) attachTabPickerToActivePane() {
525 continue525 continue
526 }526 }
527 if oldPV := view.GetPaneView(a.tabPickerPaneID); oldPV != nil {527 if oldPV := view.GetPaneView(a.tabPickerPaneID); oldPV != nil {
528- oldPV.RemoveOverlayWidget(a.tabPickerWidget)528+ if parent := a.tabPickerWidget.GetParent(); parent == oldPV.Overlay() {
529+ oldPV.RemoveOverlayWidget(a.tabPickerWidget)
530+ } else if parent != nil {
531+ a.tabPickerWidget.Unparent()
532+ }
529 break533 break
530 }534 }
531 }535 }
M internal/ui/component/workspace_view.go +12 -2
@@ -608,7 +608,13 @@ func (wv *WorkspaceView) hideOmniboxInternal() {
608608
609609 // Remove from pane overlay
610610 if pv := wv.paneViews[wv.omniboxPaneID]; pv != nil && wv.omniboxWidget != nil {
611- pv.RemoveOverlayWidget(wv.omniboxWidget)
611+ // The omnibox widget may have been reparented during a rebuild/move.
612+ // Avoid GTK criticals by only removing from the overlay that owns it.
613+ if parent := wv.omniboxWidget.GetParent(); parent == pv.Overlay() {
614+ pv.RemoveOverlayWidget(wv.omniboxWidget)
615+ } else if parent != nil {
616+ wv.omniboxWidget.Unparent()
617+ }
612618 }
613619
614620 // Clear references
@@ -715,7 +721,11 @@ func (wv *WorkspaceView) hideFindBarInternal() {
715721 wv.findBar.Hide()
716722
717723 if pv := wv.paneViews[wv.findBarPaneID]; pv != nil && wv.findBarWidget != nil {
718- pv.RemoveOverlayWidget(wv.findBarWidget)
724+ if parent := wv.findBarWidget.GetParent(); parent == pv.Overlay() {
725+ pv.RemoveOverlayWidget(wv.findBarWidget)
726+ } else if parent != nil {
727+ wv.findBarWidget.Unparent()
728+ }
719729 }
720730
721731 wv.findBar = nil
@@ -608,7 +608,13 @@ func (wv *WorkspaceView) hideOmniboxInternal() {
608 608
609 // Remove from pane overlay609 // Remove from pane overlay
610 if pv := wv.paneViews[wv.omniboxPaneID]; pv != nil && wv.omniboxWidget != nil {610 if pv := wv.paneViews[wv.omniboxPaneID]; pv != nil && wv.omniboxWidget != nil {
611- pv.RemoveOverlayWidget(wv.omniboxWidget)611+ // The omnibox widget may have been reparented during a rebuild/move.
612+ // Avoid GTK criticals by only removing from the overlay that owns it.
613+ if parent := wv.omniboxWidget.GetParent(); parent == pv.Overlay() {
614+ pv.RemoveOverlayWidget(wv.omniboxWidget)
615+ } else if parent != nil {
616+ wv.omniboxWidget.Unparent()
617+ }
612 }618 }
613 619
614 // Clear references620 // Clear references
@@ -715,7 +721,11 @@ func (wv *WorkspaceView) hideFindBarInternal() {
715 wv.findBar.Hide()721 wv.findBar.Hide()
716 722
717 if pv := wv.paneViews[wv.findBarPaneID]; pv != nil && wv.findBarWidget != nil {723 if pv := wv.paneViews[wv.findBarPaneID]; pv != nil && wv.findBarWidget != nil {
718- pv.RemoveOverlayWidget(wv.findBarWidget)724+ if parent := wv.findBarWidget.GetParent(); parent == pv.Overlay() {
725+ pv.RemoveOverlayWidget(wv.findBarWidget)
726+ } else if parent != nil {
727+ wv.findBarWidget.Unparent()
728+ }
719 }729 }
720 730
721 wv.findBar = nil731 wv.findBar = nil

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