detached 312aa52

test(ui): isolate gtk display probe environment

commit
312aa5200546b254c83ab9e885019f177c4f99b6
author
brice · · 2026-06-20 13:25 UTC
parent
5a781c9
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +6 -0
M internal/ui/app_browser_launch_test.go +6 -0
@@ -306,6 +306,8 @@ func requireGTKDisplayApp(t *testing.T) *gtk.Application {
306306 }
307307
308308 func Test_testHasUsableGTKDisplay_PureProbe(t *testing.T) {
309+ t.Setenv("GDK_BACKEND", "")
310+
309311 t.Run("no display env vars", func(t *testing.T) {
310312 t.Setenv("DISPLAY", "")
311313 t.Setenv("WAYLAND_DISPLAY", "")
@@ -596,6 +598,8 @@ func Test_testHasX11Auth_MalformedRecords(t *testing.T) {
596598 }
597599
598600 func Test_testHasUsableWaylandDisplay_PureProbe(t *testing.T) {
601+ t.Setenv("GDK_BACKEND", "")
602+
599603 t.Run("no WAYLAND_DISPLAY", func(t *testing.T) {
600604 t.Setenv("WAYLAND_DISPLAY", "")
601605 if got := testHasUsableWaylandDisplay(); got {
@@ -626,6 +630,8 @@ func Test_testHasUsableWaylandDisplay_PureProbe(t *testing.T) {
626630 }
627631
628632 func Test_testHasUsableX11Display_PureProbe(t *testing.T) {
633+ t.Setenv("GDK_BACKEND", "")
634+
629635 t.Run("no DISPLAY", func(t *testing.T) {
630636 t.Setenv("DISPLAY", "")
631637 if got := testHasUsableX11Display(); got {
@@ -306,6 +306,8 @@ func requireGTKDisplayApp(t *testing.T) *gtk.Application {
306 }306 }
307 307
308 func Test_testHasUsableGTKDisplay_PureProbe(t *testing.T) {308 func Test_testHasUsableGTKDisplay_PureProbe(t *testing.T) {
309+ t.Setenv("GDK_BACKEND", "")
310+
309 t.Run("no display env vars", func(t *testing.T) {311 t.Run("no display env vars", func(t *testing.T) {
310 t.Setenv("DISPLAY", "")312 t.Setenv("DISPLAY", "")
311 t.Setenv("WAYLAND_DISPLAY", "")313 t.Setenv("WAYLAND_DISPLAY", "")
@@ -596,6 +598,8 @@ func Test_testHasX11Auth_MalformedRecords(t *testing.T) {
596 }598 }
597 599
598 func Test_testHasUsableWaylandDisplay_PureProbe(t *testing.T) {600 func Test_testHasUsableWaylandDisplay_PureProbe(t *testing.T) {
601+ t.Setenv("GDK_BACKEND", "")
602+
599 t.Run("no WAYLAND_DISPLAY", func(t *testing.T) {603 t.Run("no WAYLAND_DISPLAY", func(t *testing.T) {
600 t.Setenv("WAYLAND_DISPLAY", "")604 t.Setenv("WAYLAND_DISPLAY", "")
601 if got := testHasUsableWaylandDisplay(); got {605 if got := testHasUsableWaylandDisplay(); got {
@@ -626,6 +630,8 @@ func Test_testHasUsableWaylandDisplay_PureProbe(t *testing.T) {
626 }630 }
627 631
628 func Test_testHasUsableX11Display_PureProbe(t *testing.T) {632 func Test_testHasUsableX11Display_PureProbe(t *testing.T) {
633+ t.Setenv("GDK_BACKEND", "")
634+
629 t.Run("no DISPLAY", func(t *testing.T) {635 t.Run("no DISPLAY", func(t *testing.T) {
630 t.Setenv("DISPLAY", "")636 t.Setenv("DISPLAY", "")
631 if got := testHasUsableX11Display(); got {637 if got := testHasUsableX11Display(); got {

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