main 5041353

webui_config_test.go RawHistoryFolder

1package dto
2
3import (
4	"testing"
5
6	"github.com/stretchr/testify/require"
7
8	"github.com/bnema/dumber/internal/domain/entity"
9)
10
11func TestWebUIAppearanceWithResolvedThemePreservesColorSchemeAndUsesResolvedValues(t *testing.T) {
12	base := WebUIAppearanceConfig{
13		ColorScheme: "prefer-dark",
14		ExternalTheme: WebUIExternalThemeConfig{
15			Enabled:  true,
16			Provider: "noctalia",
17			Format:   "dumber-json",
18			Path:     "/tmp/theme.json",
19		},
20	}
21	resolved := entity.ResolvedTheme{
22		Fonts: entity.ThemeFonts{
23			SansFont:      "Inter",
24			SerifFont:     "Georgia",
25			MonospaceFont: "JetBrains Mono",
26			GtkFont:       "Adwaita Sans",
27			DefaultSize:   18,
28		},
29		LightPalette: entity.ColorPalette{Background: "#ffffff", Accent: "#0055ff"},
30		DarkPalette:  entity.ColorPalette{Background: "#111111", Accent: "#66aaff"},
31	}
32
33	got := WebUIAppearanceWithResolvedTheme(base, resolved)
34
35	require.Equal(t, "prefer-dark", got.ColorScheme)
36	require.Equal(t, base.ExternalTheme, got.ExternalTheme)
37	require.Equal(t, "Inter", got.SansFont)
38	require.Equal(t, "Georgia", got.SerifFont)
39	require.Equal(t, "JetBrains Mono", got.MonospaceFont)
40	require.Equal(t, "Adwaita Sans", got.GtkFont)
41	require.Equal(t, 18, got.DefaultFontSize)
42	require.Equal(t, "#ffffff", got.LightPalette.Background)
43	require.Equal(t, "#0055ff", got.LightPalette.Accent)
44	require.Equal(t, "#111111", got.DarkPalette.Background)
45	require.Equal(t, "#66aaff", got.DarkPalette.Accent)
46}

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