detached 6e3936d

fix(cli): name list chrome heights

commit
6e3936de11abe0404614327f53ac175f24e0681a
author
brice · · 2026-07-04 07:29 UTC
parent
da71e78
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +8 -3
M internal/cli/model/dmenu.go +5 -2
@@ -64,7 +64,10 @@ type dmenuLoadedMsg struct {
6464 err error
6565 }
6666
67-const defaultDmenuHistoryLimit = 500
67+const (
68+ defaultDmenuHistoryLimit = 500
69+ dmenuListChromeHeight = 6
70+)
6871
6972 // Init implements tea.Model.
7073 func (m DmenuModel) Init() tea.Cmd {
@@ -174,7 +177,7 @@ func (m *DmenuModel) updateList() {
174177 // Create list
175178 listHeight := max(
176179 // Account for search, help
177- m.height-6, 5)
180+ m.height-dmenuListChromeHeight, 5)
178181
179182 m.list = styles.NewHistoryList(m.theme, items, m.width, listHeight)
180183 }
@@ -64,7 +64,10 @@ type dmenuLoadedMsg struct {
64 err error64 err error
65 }65 }
66 66
67-const defaultDmenuHistoryLimit = 50067+const (
68+ defaultDmenuHistoryLimit = 500
69+ dmenuListChromeHeight = 6
70+)
68 71
69 // Init implements tea.Model.72 // Init implements tea.Model.
70 func (m DmenuModel) Init() tea.Cmd {73 func (m DmenuModel) Init() tea.Cmd {
@@ -174,7 +177,7 @@ func (m *DmenuModel) updateList() {
174 // Create list177 // Create list
175 listHeight := max(178 listHeight := max(
176 // Account for search, help179 // Account for search, help
177- m.height-6, 5)180+ m.height-dmenuListChromeHeight, 5)
178 181
179 m.list = styles.NewHistoryList(m.theme, items, m.width, listHeight)182 m.list = styles.NewHistoryList(m.theme, items, m.width, listHeight)
180 }183 }
M internal/cli/model/history.go +3 -1
@@ -20,6 +20,8 @@ import (
2020 "github.com/bnema/dumber/internal/logging"
2121 )
2222
23+const historyListChromeHeight = 8
24+
2325 // HistoryModel is the Bubble Tea model for interactive history browser.
2426 type HistoryModel struct {
2527 // UI components
@@ -414,7 +416,7 @@ func (m *HistoryModel) updateList() {
414416 // Create new list
415417 listHeight := max(
416418 // Account for tabs, search, help
417- m.height-8, 5)
419+ m.height-historyListChromeHeight, 5)
418420
419421 m.list = styles.NewHistoryList(m.theme, items, m.width, listHeight)
420422 }
@@ -20,6 +20,8 @@ import (
20 "github.com/bnema/dumber/internal/logging"20 "github.com/bnema/dumber/internal/logging"
21 )21 )
22 22
23+const historyListChromeHeight = 8
24+
23 // HistoryModel is the Bubble Tea model for interactive history browser.25 // HistoryModel is the Bubble Tea model for interactive history browser.
24 type HistoryModel struct {26 type HistoryModel struct {
25 // UI components27 // UI components
@@ -414,7 +416,7 @@ func (m *HistoryModel) updateList() {
414 // Create new list416 // Create new list
415 listHeight := max(417 listHeight := max(
416 // Account for tabs, search, help418 // Account for tabs, search, help
417- m.height-8, 5)419+ m.height-historyListChromeHeight, 5)
418 420
419 m.list = styles.NewHistoryList(m.theme, items, m.width, listHeight)421 m.list = styles.NewHistoryList(m.theme, items, m.width, listHeight)
420 }422 }

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