detached b7da822

fix: keep fresh-window single-tab bars hidden

commit
b7da822381d50e9ad11a253c208b5c6e734f5694
author
brice · · 2026-04-14 17:45 UTC
parent
9488c51
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +8 -4
M internal/ui/app_browser_launch_test.go +7 -3
@@ -224,9 +224,10 @@ func TestApp_OpenFreshWindowTargetsNewWindowTabBar(t *testing.T) {
224224 },
225225 mainWindow: oldWindow,
226226 tabCoord: coordinator.NewTabCoordinator(context.Background(), coordinator.TabCoordinatorConfig{
227- TabsUC: tabsUC,
228- Tabs: tabs,
229- MainWindow: oldWindow,
227+ TabsUC: tabsUC,
228+ Tabs: tabs,
229+ MainWindow: oldWindow,
230+ HideTabBarWhenSingleTab: true,
230231 }),
231232 workspaceViews: make(map[entity.TabID]*component.WorkspaceView),
232233 }
@@ -249,4 +250,7 @@ func TestApp_OpenFreshWindowTargetsNewWindowTabBar(t *testing.T) {
249250 if got := windowTabBarActiveID(t, oldWindow); got != "" {
250251 t.Fatalf("old window tab bar active tab = %q, want empty", got)
251252 }
253+ if got := newWindow.TabBar().Box().GetVisible(); got {
254+ t.Fatalf("new window tab bar visible = %v, want false", got)
255+ }
252256 }
@@ -224,9 +224,10 @@ func TestApp_OpenFreshWindowTargetsNewWindowTabBar(t *testing.T) {
224 },224 },
225 mainWindow: oldWindow,225 mainWindow: oldWindow,
226 tabCoord: coordinator.NewTabCoordinator(context.Background(), coordinator.TabCoordinatorConfig{226 tabCoord: coordinator.NewTabCoordinator(context.Background(), coordinator.TabCoordinatorConfig{
227- TabsUC: tabsUC,227+ TabsUC: tabsUC,
228- Tabs: tabs,228+ Tabs: tabs,
229- MainWindow: oldWindow,229+ MainWindow: oldWindow,
230+ HideTabBarWhenSingleTab: true,
230 }),231 }),
231 workspaceViews: make(map[entity.TabID]*component.WorkspaceView),232 workspaceViews: make(map[entity.TabID]*component.WorkspaceView),
232 }233 }
@@ -249,4 +250,7 @@ func TestApp_OpenFreshWindowTargetsNewWindowTabBar(t *testing.T) {
249 if got := windowTabBarActiveID(t, oldWindow); got != "" {250 if got := windowTabBarActiveID(t, oldWindow); got != "" {
250 t.Fatalf("old window tab bar active tab = %q, want empty", got)251 t.Fatalf("old window tab bar active tab = %q, want empty", got)
251 }252 }
253+ if got := newWindow.TabBar().Box().GetVisible(); got {
254+ t.Fatalf("new window tab bar visible = %v, want false", got)
255+ }
252 }256 }
M internal/ui/coordinator/tab.go +1 -1
@@ -357,7 +357,7 @@ func (c *TabCoordinator) UpdateBarVisibility(ctx context.Context) {
357357 return
358358 }
359359
360- tabCount := c.tabs.Count()
360+ tabCount := c.mainWindow.TabBar().Count()
361361 shouldShow := tabCount > 1
362362
363363 log.Debug().Int("tab_count", tabCount).Bool("should_show", shouldShow).Msg("setting tab bar visibility")
@@ -357,7 +357,7 @@ func (c *TabCoordinator) UpdateBarVisibility(ctx context.Context) {
357 return357 return
358 }358 }
359 359
360- tabCount := c.tabs.Count()360+ tabCount := c.mainWindow.TabBar().Count()
361 shouldShow := tabCount > 1361 shouldShow := tabCount > 1
362 362
363 log.Debug().Int("tab_count", tabCount).Bool("should_show", shouldShow).Msg("setting tab bar visibility")363 log.Debug().Int("tab_count", tabCount).Bool("should_show", shouldShow).Msg("setting tab bar visibility")

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