detached 8cf3f3c

fix(config): persist performance profile from webui save

commit
8cf3f3c02150a9bb890b8eb56c0c586f167519a6
author
brice · · 2025-12-28 19:15 UTC
committer
brice · · 2025-12-29 17:28 UTC
parent
8db9a6a
signature
unsigned
3 files · +14 -0
M internal/application/port/webui_config.go +6 -0
@@ -5,11 +5,17 @@ import "context"
55 // WebUIConfig represents the subset of configuration editable in dumb://config.
66 type WebUIConfig struct {
77 Appearance WebUIAppearanceConfig `json:"appearance"`
8+ Performance WebUIPerformanceConfig `json:"performance"`
89 DefaultUIScale float64 `json:"default_ui_scale"`
910 DefaultSearchEngine string `json:"default_search_engine"`
1011 SearchShortcuts map[string]SearchShortcut `json:"search_shortcuts"`
1112 }
1213
14+// WebUIPerformanceConfig represents performance settings editable in dumb://config.
15+type WebUIPerformanceConfig struct {
16+ Profile string `json:"profile"`
17+}
18+
1319 type WebUIAppearanceConfig struct {
1420 SansFont string `json:"sans_font"`
1521 SerifFont string `json:"serif_font"`
@@ -5,11 +5,17 @@ import "context"
5 // WebUIConfig represents the subset of configuration editable in dumb://config.5 // WebUIConfig represents the subset of configuration editable in dumb://config.
6 type WebUIConfig struct {6 type WebUIConfig struct {
7 Appearance WebUIAppearanceConfig `json:"appearance"`7 Appearance WebUIAppearanceConfig `json:"appearance"`
8+ Performance WebUIPerformanceConfig `json:"performance"`
8 DefaultUIScale float64 `json:"default_ui_scale"`9 DefaultUIScale float64 `json:"default_ui_scale"`
9 DefaultSearchEngine string `json:"default_search_engine"`10 DefaultSearchEngine string `json:"default_search_engine"`
10 SearchShortcuts map[string]SearchShortcut `json:"search_shortcuts"`11 SearchShortcuts map[string]SearchShortcut `json:"search_shortcuts"`
11 }12 }
12 13
14+// WebUIPerformanceConfig represents performance settings editable in dumb://config.
15+type WebUIPerformanceConfig struct {
16+ Profile string `json:"profile"`
17+}
18+
13 type WebUIAppearanceConfig struct {19 type WebUIAppearanceConfig struct {
14 SansFont string `json:"sans_font"`20 SansFont string `json:"sans_font"`
15 SerifFont string `json:"serif_font"`21 SerifFont string `json:"serif_font"`
M internal/infrastructure/config/loader.go +3 -0
@@ -266,6 +266,9 @@ func (m *Manager) Save(cfg *Config) error {
266266 m.viper.Set("default_ui_scale", cfg.DefaultUIScale)
267267 m.viper.Set("default_search_engine", cfg.DefaultSearchEngine)
268268
269+ // Performance profile (requires browser restart to take effect)
270+ m.viper.Set("performance.profile", string(cfg.Performance.Profile))
271+
269272 if err := m.viper.WriteConfig(); err != nil {
270273 return fmt.Errorf("failed to write config: %w", err)
271274 }
@@ -266,6 +266,9 @@ func (m *Manager) Save(cfg *Config) error {
266 m.viper.Set("default_ui_scale", cfg.DefaultUIScale)266 m.viper.Set("default_ui_scale", cfg.DefaultUIScale)
267 m.viper.Set("default_search_engine", cfg.DefaultSearchEngine)267 m.viper.Set("default_search_engine", cfg.DefaultSearchEngine)
268 268
269+ // Performance profile (requires browser restart to take effect)
270+ m.viper.Set("performance.profile", string(cfg.Performance.Profile))
271+
269 if err := m.viper.WriteConfig(); err != nil {272 if err := m.viper.WriteConfig(); err != nil {
270 return fmt.Errorf("failed to write config: %w", err)273 return fmt.Errorf("failed to write config: %w", err)
271 }274 }
M internal/infrastructure/config/webui_gateway.go +5 -0
@@ -60,5 +60,10 @@ func (g *WebUIConfigGateway) SaveWebUIConfig(ctx context.Context, cfg port.WebUI
6060 current.SearchShortcuts = shortcuts
6161 }
6262
63+ // Performance profile (requires restart to take effect)
64+ if cfg.Performance.Profile != "" {
65+ current.Performance.Profile = PerformanceProfile(cfg.Performance.Profile)
66+ }
67+
6368 return g.mgr.Save(current)
6469 }
@@ -60,5 +60,10 @@ func (g *WebUIConfigGateway) SaveWebUIConfig(ctx context.Context, cfg port.WebUI
60 current.SearchShortcuts = shortcuts60 current.SearchShortcuts = shortcuts
61 }61 }
62 62
63+ // Performance profile (requires restart to take effect)
64+ if cfg.Performance.Profile != "" {
65+ current.Performance.Profile = PerformanceProfile(cfg.Performance.Profile)
66+ }
67+
63 return g.mgr.Save(current)68 return g.mgr.Save(current)
64 }69 }

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