detached 6bf5e05

refactor(config): remove unused video acceleration and codec preference config

commit
6bf5e054faa676b9740edd225850f5063d70f59a
author
brice · · 2025-12-18 17:21 UTC
parent
ef844de
signature
unsigned
5 files · +13 -270
M internal/infrastructure/config/defaults.go +4 -47
@@ -10,9 +10,7 @@ const (
1010 defaultMaxHistoryItems = 20 // items
1111
1212 // Logging defaults
13- defaultMaxLogSizeMB = 100 // MB
14- defaultMaxBackups = 3 // backup files
15- defaultMaxLogAgeDays = 7 // days
13+ defaultMaxLogAgeDays = 7 // days
1614
1715 // Appearance defaults
1816 defaultFontSize = 16 // points
@@ -80,20 +78,11 @@ func DefaultConfig() *Config {
8078 },
8179 Logging: LoggingConfig{
8280 Level: "info",
83- Format: "text", // text or json
84- Filename: "", // empty means stdout
85- MaxSize: defaultMaxLogSizeMB, // MB
86- MaxBackups: defaultMaxBackups,
87- MaxAge: defaultMaxLogAgeDays, // days
88- Compress: true,
81+ Format: "text", // text or json
82+ MaxAge: defaultMaxLogAgeDays,
8983 LogDir: getDefaultLogDir(),
9084 EnableFileLog: true,
91- CaptureStdout: false,
92- CaptureStderr: false,
93- CaptureCOutput: false, // Disabled by default to avoid performance impact
9485 CaptureConsole: false, // Disabled by default
95- DebugFile: "debug.log",
96- VerboseWebKit: false,
9786 },
9887 Appearance: AppearanceConfig{
9988 SansFont: "Fira Sans",
@@ -120,40 +109,8 @@ func DefaultConfig() *Config {
120109 },
121110 ColorScheme: "default", // default follows system theme
122111 },
123- VideoAcceleration: VideoAccelerationConfig{
124- EnableVAAPI: true,
125- AutoDetectGPU: true,
126- VAAPIDriverName: "", // TODO: implement in Step 18 - will be auto-detected
127- EnableAllDrivers: true,
128- LegacyVAAPI: false,
129- },
130- CodecPreferences: CodecConfig{
131- PreferredCodecs: "av1,h264", // AV1 first, but allow VP9 fallback for higher resolutions
132- ForceAV1: false, // Use smart AV1 negotiation instead of forcing
133- BlockVP9: false, // Allow VP9 for higher resolutions
134- BlockVP8: false, // Allow VP8 fallback for ad segments (lower priority)
135- AV1HardwareOnly: false, // Allow software AV1 fallback
136- DisableVP9Hardware: false, // Allow VP9 hardware for high res content
137- VideoBufferSizeMB: 64, // Larger buffer for bursty Twitch/AV1 segments
138- QueueBufferTimeSec: 20, // More buffering time for smooth playback
139- CustomUserAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15", // WebKitGTK default (same as Epiphany)
140- AV1MaxResolution: "1080p", // Optimal AV1 up to 1080p, fallback to VP9 for higher res
141- DisableTwitchCodecControl: true, // Disable codec control on Twitch by default (prevents theater/fullscreen freezing)
142- },
143112 Debug: DebugConfig{
144- EnableDevTools: true,
145- EnableWebKitDebug: false,
146- WebKitDebugCategories: "Network:preconnectTo,ContentFilters",
147- EnableFilteringDebug: false,
148- EnableWebViewDebug: false,
149- LogWebKitCrashes: true, // Always log crashes
150- EnableScriptDebug: false,
151- EnableGeneralDebug: false,
152- EnableWorkspaceDebug: false,
153- EnableFocusDebug: false,
154- EnableCSSDebug: false,
155- EnableFocusMetrics: false,
156- EnablePaneCloseDebug: false,
113+ EnableDevTools: true,
157114 },
158115 RenderingMode: RenderingModeGPU,
159116 DefaultWebpageZoom: 1.2, // 120% default zoom for better readability
@@ -10,9 +10,7 @@ const (
10 defaultMaxHistoryItems = 20 // items10 defaultMaxHistoryItems = 20 // items
11 11
12 // Logging defaults12 // Logging defaults
13- defaultMaxLogSizeMB = 100 // MB13+ defaultMaxLogAgeDays = 7 // days
14- defaultMaxBackups = 3 // backup files
15- defaultMaxLogAgeDays = 7 // days
16 14
17 // Appearance defaults15 // Appearance defaults
18 defaultFontSize = 16 // points16 defaultFontSize = 16 // points
@@ -80,20 +78,11 @@ func DefaultConfig() *Config {
80 },78 },
81 Logging: LoggingConfig{79 Logging: LoggingConfig{
82 Level: "info",80 Level: "info",
83- Format: "text", // text or json81+ Format: "text", // text or json
84- Filename: "", // empty means stdout82+ MaxAge: defaultMaxLogAgeDays,
85- MaxSize: defaultMaxLogSizeMB, // MB
86- MaxBackups: defaultMaxBackups,
87- MaxAge: defaultMaxLogAgeDays, // days
88- Compress: true,
89 LogDir: getDefaultLogDir(),83 LogDir: getDefaultLogDir(),
90 EnableFileLog: true,84 EnableFileLog: true,
91- CaptureStdout: false,
92- CaptureStderr: false,
93- CaptureCOutput: false, // Disabled by default to avoid performance impact
94 CaptureConsole: false, // Disabled by default85 CaptureConsole: false, // Disabled by default
95- DebugFile: "debug.log",
96- VerboseWebKit: false,
97 },86 },
98 Appearance: AppearanceConfig{87 Appearance: AppearanceConfig{
99 SansFont: "Fira Sans",88 SansFont: "Fira Sans",
@@ -120,40 +109,8 @@ func DefaultConfig() *Config {
120 },109 },
121 ColorScheme: "default", // default follows system theme110 ColorScheme: "default", // default follows system theme
122 },111 },
123- VideoAcceleration: VideoAccelerationConfig{
124- EnableVAAPI: true,
125- AutoDetectGPU: true,
126- VAAPIDriverName: "", // TODO: implement in Step 18 - will be auto-detected
127- EnableAllDrivers: true,
128- LegacyVAAPI: false,
129- },
130- CodecPreferences: CodecConfig{
131- PreferredCodecs: "av1,h264", // AV1 first, but allow VP9 fallback for higher resolutions
132- ForceAV1: false, // Use smart AV1 negotiation instead of forcing
133- BlockVP9: false, // Allow VP9 for higher resolutions
134- BlockVP8: false, // Allow VP8 fallback for ad segments (lower priority)
135- AV1HardwareOnly: false, // Allow software AV1 fallback
136- DisableVP9Hardware: false, // Allow VP9 hardware for high res content
137- VideoBufferSizeMB: 64, // Larger buffer for bursty Twitch/AV1 segments
138- QueueBufferTimeSec: 20, // More buffering time for smooth playback
139- CustomUserAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15", // WebKitGTK default (same as Epiphany)
140- AV1MaxResolution: "1080p", // Optimal AV1 up to 1080p, fallback to VP9 for higher res
141- DisableTwitchCodecControl: true, // Disable codec control on Twitch by default (prevents theater/fullscreen freezing)
142- },
143 Debug: DebugConfig{112 Debug: DebugConfig{
144- EnableDevTools: true,113+ EnableDevTools: true,
145- EnableWebKitDebug: false,
146- WebKitDebugCategories: "Network:preconnectTo,ContentFilters",
147- EnableFilteringDebug: false,
148- EnableWebViewDebug: false,
149- LogWebKitCrashes: true, // Always log crashes
150- EnableScriptDebug: false,
151- EnableGeneralDebug: false,
152- EnableWorkspaceDebug: false,
153- EnableFocusDebug: false,
154- EnableCSSDebug: false,
155- EnableFocusMetrics: false,
156- EnablePaneCloseDebug: false,
157 },114 },
158 RenderingMode: RenderingModeGPU,115 RenderingMode: RenderingModeGPU,
159 DefaultWebpageZoom: 1.2, // 120% default zoom for better readability116 DefaultWebpageZoom: 1.2, // 120% default zoom for better readability
M internal/infrastructure/config/loader.go +0 -90
@@ -56,44 +56,6 @@ func NewManager() (*Manager, error) {
5656 return nil, fmt.Errorf("failed to bind DUMBER_DEFAULT_UI_SCALE: %w", err)
5757 }
5858
59- // Video acceleration environment variable bindings
60- // These use system-standard env vars (LIBVA_*, GST_*, WEBKIT_*) and DUMBER_* prefix
61- videoAccelEnvBindings := map[string]string{
62- "video_acceleration.enable_vaapi": "DUMBER_VIDEO_ACCELERATION_ENABLE",
63- "video_acceleration.auto_detect_gpu": "DUMBER_VIDEO_AUTO_DETECT",
64- "video_acceleration.vaapi_driver_name": "LIBVA_DRIVER_NAME",
65- "video_acceleration.enable_all_drivers": "GST_VAAPI_ALL_DRIVERS",
66- "video_acceleration.legacy_vaapi": "WEBKIT_GST_ENABLE_LEGACY_VAAPI",
67- }
68-
69- for key, env := range videoAccelEnvBindings {
70- if err := v.BindEnv(key, env); err != nil {
71- return nil, fmt.Errorf("failed to bind environment variable %s: %w", env, err)
72- }
73- }
74-
75- // Codec preferences environment variable bindings
76- // These use DUMBER_* prefix for shorter, more convenient env var names
77- codecEnvBindings := map[string]string{
78- "codec_preferences.preferred_codecs": "DUMBER_PREFERRED_CODECS",
79- "codec_preferences.force_av1": "DUMBER_FORCE_AV1",
80- "codec_preferences.block_vp9": "DUMBER_BLOCK_VP9",
81- "codec_preferences.block_vp8": "DUMBER_BLOCK_VP8",
82- "codec_preferences.av1_hardware_only": "DUMBER_AV1_HW_ONLY",
83- "codec_preferences.disable_vp9_hardware": "DUMBER_DISABLE_VP9_HW",
84- "codec_preferences.video_buffer_size_mb": "DUMBER_VIDEO_BUFFER_MB",
85- "codec_preferences.queue_buffer_time_sec": "DUMBER_QUEUE_BUFFER_SEC",
86- "codec_preferences.custom_user_agent": "DUMBER_CUSTOM_UA",
87- "codec_preferences.av1_max_resolution": "DUMBER_AV1_MAX_RES",
88- "codec_preferences.disable_twitch_codec_control": "DUMBER_DISABLE_TWITCH_CODEC",
89- }
90-
91- for key, env := range codecEnvBindings {
92- if err := v.BindEnv(key, env); err != nil {
93- return nil, fmt.Errorf("failed to bind environment variable %s: %w", env, err)
94- }
95- }
96-
9759 // Logging environment variable bindings
9860 if err := v.BindEnv("logging.level", "DUMBER_LOG_LEVEL"); err != nil {
9961 return nil, fmt.Errorf("failed to bind DUMBER_LOG_LEVEL: %w", err)
@@ -172,17 +134,6 @@ func (m *Manager) Load() error {
172134 config.RenderingMode = RenderingModeAuto
173135 }
174136
175- // TODO: implement in Step 18 - Auto-detect GPU if enabled and driver name is not set
176- // if config.VideoAcceleration.AutoDetectGPU && config.VideoAcceleration.VAAPIDriverName == "" {
177- // gpuInfo := gpu.DetectGPU()
178- // if gpuInfo.SupportsVAAPI() {
179- // config.VideoAcceleration.VAAPIDriverName = gpuInfo.GetVAAPIDriverName()
180- // }
181- // }
182-
183- // TODO: implement in Step 18 - Validate and configure codec preferences based on GPU
184- // config = m.validateAndConfigureCodecPreferences(config)
185-
186137 // Validate ColorScheme setting using switch statement
187138 switch config.Appearance.ColorScheme {
188139 case "prefer-dark", "prefer-light", ThemeDefault:
@@ -270,34 +221,13 @@ func (m *Manager) setDefaults() {
270221 // Logging defaults
271222 m.viper.SetDefault("logging.level", defaults.Logging.Level)
272223 m.viper.SetDefault("logging.format", defaults.Logging.Format)
273- m.viper.SetDefault("logging.filename", defaults.Logging.Filename)
274- m.viper.SetDefault("logging.max_size", defaults.Logging.MaxSize)
275- m.viper.SetDefault("logging.max_backups", defaults.Logging.MaxBackups)
276224 m.viper.SetDefault("logging.max_age", defaults.Logging.MaxAge)
277- m.viper.SetDefault("logging.compress", defaults.Logging.Compress)
278225 m.viper.SetDefault("logging.log_dir", defaults.Logging.LogDir)
279226 m.viper.SetDefault("logging.enable_file_log", defaults.Logging.EnableFileLog)
280- m.viper.SetDefault("logging.capture_stdout", defaults.Logging.CaptureStdout)
281- m.viper.SetDefault("logging.capture_stderr", defaults.Logging.CaptureStderr)
282- m.viper.SetDefault("logging.capture_c_output", defaults.Logging.CaptureCOutput)
283227 m.viper.SetDefault("logging.capture_console", defaults.Logging.CaptureConsole)
284- m.viper.SetDefault("logging.debug_file", defaults.Logging.DebugFile)
285- m.viper.SetDefault("logging.verbose_webkit", defaults.Logging.VerboseWebKit)
286228
287229 // Debug defaults
288230 m.viper.SetDefault("debug.enable_devtools", defaults.Debug.EnableDevTools)
289- m.viper.SetDefault("debug.enable_webkit_debug", defaults.Debug.EnableWebKitDebug)
290- m.viper.SetDefault("debug.webkit_debug_categories", defaults.Debug.WebKitDebugCategories)
291- m.viper.SetDefault("debug.enable_filtering_debug", defaults.Debug.EnableFilteringDebug)
292- m.viper.SetDefault("debug.enable_webview_debug", defaults.Debug.EnableWebViewDebug)
293- m.viper.SetDefault("debug.log_webkit_crashes", defaults.Debug.LogWebKitCrashes)
294- m.viper.SetDefault("debug.enable_script_debug", defaults.Debug.EnableScriptDebug)
295- m.viper.SetDefault("debug.enable_general_debug", defaults.Debug.EnableGeneralDebug)
296- m.viper.SetDefault("debug.enable_workspace_debug", defaults.Debug.EnableWorkspaceDebug)
297- m.viper.SetDefault("debug.enable_focus_debug", defaults.Debug.EnableFocusDebug)
298- m.viper.SetDefault("debug.enable_css_debug", defaults.Debug.EnableCSSDebug)
299- m.viper.SetDefault("debug.enable_focus_metrics", defaults.Debug.EnableFocusMetrics)
300- m.viper.SetDefault("debug.enable_pane_close_debug", defaults.Debug.EnablePaneCloseDebug)
301231
302232 // Appearance defaults
303233 m.viper.SetDefault("appearance.sans_font", defaults.Appearance.SansFont)
@@ -308,26 +238,6 @@ func (m *Manager) setDefaults() {
308238 m.viper.SetDefault("appearance.dark_palette", defaults.Appearance.DarkPalette)
309239 m.viper.SetDefault("appearance.color_scheme", defaults.Appearance.ColorScheme)
310240
311- // Video acceleration defaults
312- m.viper.SetDefault("video_acceleration.enable_vaapi", defaults.VideoAcceleration.EnableVAAPI)
313- m.viper.SetDefault("video_acceleration.auto_detect_gpu", defaults.VideoAcceleration.AutoDetectGPU)
314- m.viper.SetDefault("video_acceleration.vaapi_driver_name", defaults.VideoAcceleration.VAAPIDriverName)
315- m.viper.SetDefault("video_acceleration.enable_all_drivers", defaults.VideoAcceleration.EnableAllDrivers)
316- m.viper.SetDefault("video_acceleration.legacy_vaapi", defaults.VideoAcceleration.LegacyVAAPI)
317-
318- // Codec preferences defaults
319- m.viper.SetDefault("codec_preferences.preferred_codecs", defaults.CodecPreferences.PreferredCodecs)
320- m.viper.SetDefault("codec_preferences.force_av1", defaults.CodecPreferences.ForceAV1)
321- m.viper.SetDefault("codec_preferences.block_vp9", defaults.CodecPreferences.BlockVP9)
322- m.viper.SetDefault("codec_preferences.block_vp8", defaults.CodecPreferences.BlockVP8)
323- m.viper.SetDefault("codec_preferences.av1_hardware_only", defaults.CodecPreferences.AV1HardwareOnly)
324- m.viper.SetDefault("codec_preferences.disable_vp9_hardware", defaults.CodecPreferences.DisableVP9Hardware)
325- m.viper.SetDefault("codec_preferences.video_buffer_size_mb", defaults.CodecPreferences.VideoBufferSizeMB)
326- m.viper.SetDefault("codec_preferences.queue_buffer_time_sec", defaults.CodecPreferences.QueueBufferTimeSec)
327- m.viper.SetDefault("codec_preferences.custom_user_agent", defaults.CodecPreferences.CustomUserAgent)
328- m.viper.SetDefault("codec_preferences.av1_max_resolution", defaults.CodecPreferences.AV1MaxResolution)
329- m.viper.SetDefault("codec_preferences.disable_twitch_codec_control", defaults.CodecPreferences.DisableTwitchCodecControl)
330-
331241 // Rendering defaults
332242 m.viper.SetDefault("rendering_mode", string(RenderingModeGPU))
333243 m.viper.SetDefault("default_webpage_zoom", defaults.DefaultWebpageZoom)
@@ -56,44 +56,6 @@ func NewManager() (*Manager, error) {
56 return nil, fmt.Errorf("failed to bind DUMBER_DEFAULT_UI_SCALE: %w", err)56 return nil, fmt.Errorf("failed to bind DUMBER_DEFAULT_UI_SCALE: %w", err)
57 }57 }
58 58
59- // Video acceleration environment variable bindings
60- // These use system-standard env vars (LIBVA_*, GST_*, WEBKIT_*) and DUMBER_* prefix
61- videoAccelEnvBindings := map[string]string{
62- "video_acceleration.enable_vaapi": "DUMBER_VIDEO_ACCELERATION_ENABLE",
63- "video_acceleration.auto_detect_gpu": "DUMBER_VIDEO_AUTO_DETECT",
64- "video_acceleration.vaapi_driver_name": "LIBVA_DRIVER_NAME",
65- "video_acceleration.enable_all_drivers": "GST_VAAPI_ALL_DRIVERS",
66- "video_acceleration.legacy_vaapi": "WEBKIT_GST_ENABLE_LEGACY_VAAPI",
67- }
68-
69- for key, env := range videoAccelEnvBindings {
70- if err := v.BindEnv(key, env); err != nil {
71- return nil, fmt.Errorf("failed to bind environment variable %s: %w", env, err)
72- }
73- }
74-
75- // Codec preferences environment variable bindings
76- // These use DUMBER_* prefix for shorter, more convenient env var names
77- codecEnvBindings := map[string]string{
78- "codec_preferences.preferred_codecs": "DUMBER_PREFERRED_CODECS",
79- "codec_preferences.force_av1": "DUMBER_FORCE_AV1",
80- "codec_preferences.block_vp9": "DUMBER_BLOCK_VP9",
81- "codec_preferences.block_vp8": "DUMBER_BLOCK_VP8",
82- "codec_preferences.av1_hardware_only": "DUMBER_AV1_HW_ONLY",
83- "codec_preferences.disable_vp9_hardware": "DUMBER_DISABLE_VP9_HW",
84- "codec_preferences.video_buffer_size_mb": "DUMBER_VIDEO_BUFFER_MB",
85- "codec_preferences.queue_buffer_time_sec": "DUMBER_QUEUE_BUFFER_SEC",
86- "codec_preferences.custom_user_agent": "DUMBER_CUSTOM_UA",
87- "codec_preferences.av1_max_resolution": "DUMBER_AV1_MAX_RES",
88- "codec_preferences.disable_twitch_codec_control": "DUMBER_DISABLE_TWITCH_CODEC",
89- }
90-
91- for key, env := range codecEnvBindings {
92- if err := v.BindEnv(key, env); err != nil {
93- return nil, fmt.Errorf("failed to bind environment variable %s: %w", env, err)
94- }
95- }
96-
97 // Logging environment variable bindings59 // Logging environment variable bindings
98 if err := v.BindEnv("logging.level", "DUMBER_LOG_LEVEL"); err != nil {60 if err := v.BindEnv("logging.level", "DUMBER_LOG_LEVEL"); err != nil {
99 return nil, fmt.Errorf("failed to bind DUMBER_LOG_LEVEL: %w", err)61 return nil, fmt.Errorf("failed to bind DUMBER_LOG_LEVEL: %w", err)
@@ -172,17 +134,6 @@ func (m *Manager) Load() error {
172 config.RenderingMode = RenderingModeAuto134 config.RenderingMode = RenderingModeAuto
173 }135 }
174 136
175- // TODO: implement in Step 18 - Auto-detect GPU if enabled and driver name is not set
176- // if config.VideoAcceleration.AutoDetectGPU && config.VideoAcceleration.VAAPIDriverName == "" {
177- // gpuInfo := gpu.DetectGPU()
178- // if gpuInfo.SupportsVAAPI() {
179- // config.VideoAcceleration.VAAPIDriverName = gpuInfo.GetVAAPIDriverName()
180- // }
181- // }
182-
183- // TODO: implement in Step 18 - Validate and configure codec preferences based on GPU
184- // config = m.validateAndConfigureCodecPreferences(config)
185-
186 // Validate ColorScheme setting using switch statement137 // Validate ColorScheme setting using switch statement
187 switch config.Appearance.ColorScheme {138 switch config.Appearance.ColorScheme {
188 case "prefer-dark", "prefer-light", ThemeDefault:139 case "prefer-dark", "prefer-light", ThemeDefault:
@@ -270,34 +221,13 @@ func (m *Manager) setDefaults() {
270 // Logging defaults221 // Logging defaults
271 m.viper.SetDefault("logging.level", defaults.Logging.Level)222 m.viper.SetDefault("logging.level", defaults.Logging.Level)
272 m.viper.SetDefault("logging.format", defaults.Logging.Format)223 m.viper.SetDefault("logging.format", defaults.Logging.Format)
273- m.viper.SetDefault("logging.filename", defaults.Logging.Filename)
274- m.viper.SetDefault("logging.max_size", defaults.Logging.MaxSize)
275- m.viper.SetDefault("logging.max_backups", defaults.Logging.MaxBackups)
276 m.viper.SetDefault("logging.max_age", defaults.Logging.MaxAge)224 m.viper.SetDefault("logging.max_age", defaults.Logging.MaxAge)
277- m.viper.SetDefault("logging.compress", defaults.Logging.Compress)
278 m.viper.SetDefault("logging.log_dir", defaults.Logging.LogDir)225 m.viper.SetDefault("logging.log_dir", defaults.Logging.LogDir)
279 m.viper.SetDefault("logging.enable_file_log", defaults.Logging.EnableFileLog)226 m.viper.SetDefault("logging.enable_file_log", defaults.Logging.EnableFileLog)
280- m.viper.SetDefault("logging.capture_stdout", defaults.Logging.CaptureStdout)
281- m.viper.SetDefault("logging.capture_stderr", defaults.Logging.CaptureStderr)
282- m.viper.SetDefault("logging.capture_c_output", defaults.Logging.CaptureCOutput)
283 m.viper.SetDefault("logging.capture_console", defaults.Logging.CaptureConsole)227 m.viper.SetDefault("logging.capture_console", defaults.Logging.CaptureConsole)
284- m.viper.SetDefault("logging.debug_file", defaults.Logging.DebugFile)
285- m.viper.SetDefault("logging.verbose_webkit", defaults.Logging.VerboseWebKit)
286 228
287 // Debug defaults229 // Debug defaults
288 m.viper.SetDefault("debug.enable_devtools", defaults.Debug.EnableDevTools)230 m.viper.SetDefault("debug.enable_devtools", defaults.Debug.EnableDevTools)
289- m.viper.SetDefault("debug.enable_webkit_debug", defaults.Debug.EnableWebKitDebug)
290- m.viper.SetDefault("debug.webkit_debug_categories", defaults.Debug.WebKitDebugCategories)
291- m.viper.SetDefault("debug.enable_filtering_debug", defaults.Debug.EnableFilteringDebug)
292- m.viper.SetDefault("debug.enable_webview_debug", defaults.Debug.EnableWebViewDebug)
293- m.viper.SetDefault("debug.log_webkit_crashes", defaults.Debug.LogWebKitCrashes)
294- m.viper.SetDefault("debug.enable_script_debug", defaults.Debug.EnableScriptDebug)
295- m.viper.SetDefault("debug.enable_general_debug", defaults.Debug.EnableGeneralDebug)
296- m.viper.SetDefault("debug.enable_workspace_debug", defaults.Debug.EnableWorkspaceDebug)
297- m.viper.SetDefault("debug.enable_focus_debug", defaults.Debug.EnableFocusDebug)
298- m.viper.SetDefault("debug.enable_css_debug", defaults.Debug.EnableCSSDebug)
299- m.viper.SetDefault("debug.enable_focus_metrics", defaults.Debug.EnableFocusMetrics)
300- m.viper.SetDefault("debug.enable_pane_close_debug", defaults.Debug.EnablePaneCloseDebug)
301 231
302 // Appearance defaults232 // Appearance defaults
303 m.viper.SetDefault("appearance.sans_font", defaults.Appearance.SansFont)233 m.viper.SetDefault("appearance.sans_font", defaults.Appearance.SansFont)
@@ -308,26 +238,6 @@ func (m *Manager) setDefaults() {
308 m.viper.SetDefault("appearance.dark_palette", defaults.Appearance.DarkPalette)238 m.viper.SetDefault("appearance.dark_palette", defaults.Appearance.DarkPalette)
309 m.viper.SetDefault("appearance.color_scheme", defaults.Appearance.ColorScheme)239 m.viper.SetDefault("appearance.color_scheme", defaults.Appearance.ColorScheme)
310 240
311- // Video acceleration defaults
312- m.viper.SetDefault("video_acceleration.enable_vaapi", defaults.VideoAcceleration.EnableVAAPI)
313- m.viper.SetDefault("video_acceleration.auto_detect_gpu", defaults.VideoAcceleration.AutoDetectGPU)
314- m.viper.SetDefault("video_acceleration.vaapi_driver_name", defaults.VideoAcceleration.VAAPIDriverName)
315- m.viper.SetDefault("video_acceleration.enable_all_drivers", defaults.VideoAcceleration.EnableAllDrivers)
316- m.viper.SetDefault("video_acceleration.legacy_vaapi", defaults.VideoAcceleration.LegacyVAAPI)
317-
318- // Codec preferences defaults
319- m.viper.SetDefault("codec_preferences.preferred_codecs", defaults.CodecPreferences.PreferredCodecs)
320- m.viper.SetDefault("codec_preferences.force_av1", defaults.CodecPreferences.ForceAV1)
321- m.viper.SetDefault("codec_preferences.block_vp9", defaults.CodecPreferences.BlockVP9)
322- m.viper.SetDefault("codec_preferences.block_vp8", defaults.CodecPreferences.BlockVP8)
323- m.viper.SetDefault("codec_preferences.av1_hardware_only", defaults.CodecPreferences.AV1HardwareOnly)
324- m.viper.SetDefault("codec_preferences.disable_vp9_hardware", defaults.CodecPreferences.DisableVP9Hardware)
325- m.viper.SetDefault("codec_preferences.video_buffer_size_mb", defaults.CodecPreferences.VideoBufferSizeMB)
326- m.viper.SetDefault("codec_preferences.queue_buffer_time_sec", defaults.CodecPreferences.QueueBufferTimeSec)
327- m.viper.SetDefault("codec_preferences.custom_user_agent", defaults.CodecPreferences.CustomUserAgent)
328- m.viper.SetDefault("codec_preferences.av1_max_resolution", defaults.CodecPreferences.AV1MaxResolution)
329- m.viper.SetDefault("codec_preferences.disable_twitch_codec_control", defaults.CodecPreferences.DisableTwitchCodecControl)
330-
331 // Rendering defaults241 // Rendering defaults
332 m.viper.SetDefault("rendering_mode", string(RenderingModeGPU))242 m.viper.SetDefault("rendering_mode", string(RenderingModeGPU))
333 m.viper.SetDefault("default_webpage_zoom", defaults.DefaultWebpageZoom)243 m.viper.SetDefault("default_webpage_zoom", defaults.DefaultWebpageZoom)
M internal/infrastructure/config/schema.go +9 -98
@@ -6,13 +6,11 @@ type Config struct {
66 History HistoryConfig `mapstructure:"history" yaml:"history" toml:"history"`
77 SearchShortcuts map[string]SearchShortcut `mapstructure:"search_shortcuts" yaml:"search_shortcuts" toml:"search_shortcuts"`
88 // DefaultSearchEngine is the URL template for the default search engine (must contain %s placeholder)
9- DefaultSearchEngine string `mapstructure:"default_search_engine" yaml:"default_search_engine" toml:"default_search_engine"`
10- Dmenu DmenuConfig `mapstructure:"dmenu" yaml:"dmenu" toml:"dmenu"`
11- Logging LoggingConfig `mapstructure:"logging" yaml:"logging" toml:"logging"`
12- Appearance AppearanceConfig `mapstructure:"appearance" yaml:"appearance" toml:"appearance"`
13- VideoAcceleration VideoAccelerationConfig `mapstructure:"video_acceleration" yaml:"video_acceleration" toml:"video_acceleration"`
14- CodecPreferences CodecConfig `mapstructure:"codec_preferences" yaml:"codec_preferences" toml:"codec_preferences"`
15- Debug DebugConfig `mapstructure:"debug" yaml:"debug" toml:"debug"`
9+ DefaultSearchEngine string `mapstructure:"default_search_engine" yaml:"default_search_engine" toml:"default_search_engine"`
10+ Dmenu DmenuConfig `mapstructure:"dmenu" yaml:"dmenu" toml:"dmenu"`
11+ Logging LoggingConfig `mapstructure:"logging" yaml:"logging" toml:"logging"`
12+ Appearance AppearanceConfig `mapstructure:"appearance" yaml:"appearance" toml:"appearance"`
13+ Debug DebugConfig `mapstructure:"debug" yaml:"debug" toml:"debug"`
1614 // RenderingMode controls GPU/CPU rendering selection for WebKit
1715 RenderingMode RenderingMode `mapstructure:"rendering_mode" yaml:"rendering_mode" toml:"rendering_mode"`
1816 // DefaultWebpageZoom sets the default zoom level for pages without saved zoom settings (1.0 = 100%, 1.2 = 120%)
@@ -71,27 +69,16 @@ type DmenuConfig struct {
7169
7270 // LoggingConfig holds logging configuration.
7371 type LoggingConfig struct {
74- Level string `mapstructure:"level" yaml:"level" toml:"level"`
75- Format string `mapstructure:"format" yaml:"format" toml:"format"`
76- Filename string `mapstructure:"filename" yaml:"filename" toml:"filename"`
77- MaxSize int `mapstructure:"max_size" yaml:"max_size" toml:"max_size"`
78- MaxBackups int `mapstructure:"max_backups" yaml:"max_backups" toml:"max_backups"`
79- MaxAge int `mapstructure:"max_age" yaml:"max_age" toml:"max_age"`
80- Compress bool `mapstructure:"compress" yaml:"compress" toml:"compress"`
72+ Level string `mapstructure:"level" yaml:"level" toml:"level"`
73+ Format string `mapstructure:"format" yaml:"format" toml:"format"`
74+ MaxAge int `mapstructure:"max_age" yaml:"max_age" toml:"max_age"`
8175
8276 // File output configuration
8377 LogDir string `mapstructure:"log_dir" yaml:"log_dir" toml:"log_dir"`
8478 EnableFileLog bool `mapstructure:"enable_file_log" yaml:"enable_file_log" toml:"enable_file_log"`
8579
86- // Capture settings
87- CaptureStdout bool `mapstructure:"capture_stdout" yaml:"capture_stdout" toml:"capture_stdout" json:"capture_stdout"`
88- CaptureStderr bool `mapstructure:"capture_stderr" yaml:"capture_stderr" toml:"capture_stderr" json:"capture_stderr"`
89- CaptureCOutput bool `mapstructure:"capture_c_output" yaml:"capture_c_output" toml:"capture_c_output" json:"capture_c_output"`
80+ // Capture browser console to logs
9081 CaptureConsole bool `mapstructure:"capture_console" yaml:"capture_console" toml:"capture_console" json:"capture_console"`
91-
92- // Debug output
93- DebugFile string `mapstructure:"debug_file" yaml:"debug_file" toml:"debug_file"`
94- VerboseWebKit bool `mapstructure:"verbose_webkit" yaml:"verbose_webkit" toml:"verbose_webkit"`
9582 }
9683
9784 // AppearanceConfig holds UI/rendering preferences.
@@ -119,45 +106,6 @@ type ColorPalette struct {
119106 Border string `mapstructure:"border" yaml:"border" toml:"border" json:"border"`
120107 }
121108
122-// VideoAccelerationConfig holds video hardware acceleration preferences.
123-type VideoAccelerationConfig struct {
124- EnableVAAPI bool `mapstructure:"enable_vaapi" yaml:"enable_vaapi" toml:"enable_vaapi"`
125- AutoDetectGPU bool `mapstructure:"auto_detect_gpu" yaml:"auto_detect_gpu" toml:"auto_detect_gpu"`
126- VAAPIDriverName string `mapstructure:"vaapi_driver_name" yaml:"vaapi_driver_name" toml:"vaapi_driver_name"`
127- EnableAllDrivers bool `mapstructure:"enable_all_drivers" yaml:"enable_all_drivers" toml:"enable_all_drivers"`
128- LegacyVAAPI bool `mapstructure:"legacy_vaapi" yaml:"legacy_vaapi" toml:"legacy_vaapi"`
129-}
130-
131-// CodecConfig holds video codec preferences and handling
132-type CodecConfig struct {
133- // Codec preference order (e.g., "av1,h264,vp8")
134- PreferredCodecs string `mapstructure:"preferred_codecs" yaml:"preferred_codecs" toml:"preferred_codecs"`
135-
136- // Force specific codec for platforms
137- ForceAV1 bool `mapstructure:"force_av1" yaml:"force_av1" toml:"force_av1"`
138-
139- // Block problematic codecs
140- BlockVP9 bool `mapstructure:"block_vp9" yaml:"block_vp9" toml:"block_vp9"`
141- BlockVP8 bool `mapstructure:"block_vp8" yaml:"block_vp8" toml:"block_vp8"`
142-
143- // Hardware acceleration per codec
144- AV1HardwareOnly bool `mapstructure:"av1_hardware_only" yaml:"av1_hardware_only" toml:"av1_hardware_only"`
145- DisableVP9Hardware bool `mapstructure:"disable_vp9_hardware" yaml:"disable_vp9_hardware" toml:"disable_vp9_hardware"`
146-
147- // Buffer configuration for smooth playback
148- VideoBufferSizeMB int `mapstructure:"video_buffer_size_mb" yaml:"video_buffer_size_mb" toml:"video_buffer_size_mb"`
149- QueueBufferTimeSec int `mapstructure:"queue_buffer_time_sec" yaml:"queue_buffer_time_sec" toml:"queue_buffer_time_sec"`
150-
151- // Custom User-Agent for codec negotiation
152- CustomUserAgent string `mapstructure:"custom_user_agent" yaml:"custom_user_agent" toml:"custom_user_agent"`
153-
154- // Maximum resolution for AV1 codec (720p, 1080p, 1440p, 4k, unlimited)
155- AV1MaxResolution string `mapstructure:"av1_max_resolution" yaml:"av1_max_resolution" toml:"av1_max_resolution"`
156-
157- // Site-specific codec control settings
158- DisableTwitchCodecControl bool `mapstructure:"disable_twitch_codec_control" yaml:"disable_twitch_codec_control" toml:"disable_twitch_codec_control"`
159-}
160-
161109 // ContentFilteringConfig holds content filtering and ad blocking preferences
162110 type ContentFilteringConfig struct {
163111 // Enabled controls whether ad blocking is active (default: true)
@@ -178,43 +126,6 @@ type OmniboxConfig struct {
178126 type DebugConfig struct {
179127 // Enable browser developer tools (F12, Inspect Element in context menu)
180128 EnableDevTools bool `mapstructure:"enable_devtools" yaml:"enable_devtools" toml:"enable_devtools"`
181-
182- // Enable WebKit internal debug logging
183- EnableWebKitDebug bool `mapstructure:"enable_webkit_debug" yaml:"enable_webkit_debug" toml:"enable_webkit_debug"`
184-
185- // WebKit debug categories (comma-separated)
186- // Common values: "Network:preconnectTo", "ContentFilters", "Loading", "JavaScript"
187- WebKitDebugCategories string `mapstructure:"webkit_debug_categories" yaml:"webkit_debug_categories" toml:"webkit_debug_categories"`
188-
189- // Enable content filtering debug logs
190- EnableFilteringDebug bool `mapstructure:"enable_filtering_debug" yaml:"enable_filtering_debug" toml:"enable_filtering_debug"`
191-
192- // Enable detailed WebView state logging
193- EnableWebViewDebug bool `mapstructure:"enable_webview_debug" yaml:"enable_webview_debug" toml:"enable_webview_debug"`
194-
195- // Log WebKit crashes and errors to file
196- LogWebKitCrashes bool `mapstructure:"log_webkit_crashes" yaml:"log_webkit_crashes" toml:"log_webkit_crashes"`
197-
198- // Enable script injection debug logs
199- EnableScriptDebug bool `mapstructure:"enable_script_debug" yaml:"enable_script_debug" toml:"enable_script_debug"`
200-
201- // Enable general debug mode (equivalent to DUMBER_DEBUG env var)
202- EnableGeneralDebug bool `mapstructure:"enable_general_debug" yaml:"enable_general_debug" toml:"enable_general_debug"`
203-
204- // Enable workspace navigation and focus debug logs
205- EnableWorkspaceDebug bool `mapstructure:"enable_workspace_debug" yaml:"enable_workspace_debug" toml:"enable_workspace_debug"`
206-
207- // Enable focus state machine debug logs
208- EnableFocusDebug bool `mapstructure:"enable_focus_debug" yaml:"enable_focus_debug" toml:"enable_focus_debug"`
209-
210- // Enable CSS reconciler debug logs
211- EnableCSSDebug bool `mapstructure:"enable_css_debug" yaml:"enable_css_debug" toml:"enable_css_debug"`
212-
213- // Enable focus metrics tracking
214- EnableFocusMetrics bool `mapstructure:"enable_focus_metrics" yaml:"enable_focus_metrics" toml:"enable_focus_metrics"`
215-
216- // Enable detailed pane close instrumentation and tree snapshots
217- EnablePaneCloseDebug bool `mapstructure:"enable_pane_close_debug" yaml:"enable_pane_close_debug" toml:"enable_pane_close_debug"`
218129 }
219130
220131 // WorkspaceConfig captures layout, pane, and tab behaviour preferences.
@@ -6,13 +6,11 @@ type Config struct {
6 History HistoryConfig `mapstructure:"history" yaml:"history" toml:"history"`6 History HistoryConfig `mapstructure:"history" yaml:"history" toml:"history"`
7 SearchShortcuts map[string]SearchShortcut `mapstructure:"search_shortcuts" yaml:"search_shortcuts" toml:"search_shortcuts"`7 SearchShortcuts map[string]SearchShortcut `mapstructure:"search_shortcuts" yaml:"search_shortcuts" toml:"search_shortcuts"`
8 // DefaultSearchEngine is the URL template for the default search engine (must contain %s placeholder)8 // DefaultSearchEngine is the URL template for the default search engine (must contain %s placeholder)
9- DefaultSearchEngine string `mapstructure:"default_search_engine" yaml:"default_search_engine" toml:"default_search_engine"`9+ DefaultSearchEngine string `mapstructure:"default_search_engine" yaml:"default_search_engine" toml:"default_search_engine"`
10- Dmenu DmenuConfig `mapstructure:"dmenu" yaml:"dmenu" toml:"dmenu"`10+ Dmenu DmenuConfig `mapstructure:"dmenu" yaml:"dmenu" toml:"dmenu"`
11- Logging LoggingConfig `mapstructure:"logging" yaml:"logging" toml:"logging"`11+ Logging LoggingConfig `mapstructure:"logging" yaml:"logging" toml:"logging"`
12- Appearance AppearanceConfig `mapstructure:"appearance" yaml:"appearance" toml:"appearance"`12+ Appearance AppearanceConfig `mapstructure:"appearance" yaml:"appearance" toml:"appearance"`
13- VideoAcceleration VideoAccelerationConfig `mapstructure:"video_acceleration" yaml:"video_acceleration" toml:"video_acceleration"`13+ Debug DebugConfig `mapstructure:"debug" yaml:"debug" toml:"debug"`
14- CodecPreferences CodecConfig `mapstructure:"codec_preferences" yaml:"codec_preferences" toml:"codec_preferences"`
15- Debug DebugConfig `mapstructure:"debug" yaml:"debug" toml:"debug"`
16 // RenderingMode controls GPU/CPU rendering selection for WebKit14 // RenderingMode controls GPU/CPU rendering selection for WebKit
17 RenderingMode RenderingMode `mapstructure:"rendering_mode" yaml:"rendering_mode" toml:"rendering_mode"`15 RenderingMode RenderingMode `mapstructure:"rendering_mode" yaml:"rendering_mode" toml:"rendering_mode"`
18 // DefaultWebpageZoom sets the default zoom level for pages without saved zoom settings (1.0 = 100%, 1.2 = 120%)16 // DefaultWebpageZoom sets the default zoom level for pages without saved zoom settings (1.0 = 100%, 1.2 = 120%)
@@ -71,27 +69,16 @@ type DmenuConfig struct {
71 69
72 // LoggingConfig holds logging configuration.70 // LoggingConfig holds logging configuration.
73 type LoggingConfig struct {71 type LoggingConfig struct {
74- Level string `mapstructure:"level" yaml:"level" toml:"level"`72+ Level string `mapstructure:"level" yaml:"level" toml:"level"`
75- Format string `mapstructure:"format" yaml:"format" toml:"format"`73+ Format string `mapstructure:"format" yaml:"format" toml:"format"`
76- Filename string `mapstructure:"filename" yaml:"filename" toml:"filename"`74+ MaxAge int `mapstructure:"max_age" yaml:"max_age" toml:"max_age"`
77- MaxSize int `mapstructure:"max_size" yaml:"max_size" toml:"max_size"`
78- MaxBackups int `mapstructure:"max_backups" yaml:"max_backups" toml:"max_backups"`
79- MaxAge int `mapstructure:"max_age" yaml:"max_age" toml:"max_age"`
80- Compress bool `mapstructure:"compress" yaml:"compress" toml:"compress"`
81 75
82 // File output configuration76 // File output configuration
83 LogDir string `mapstructure:"log_dir" yaml:"log_dir" toml:"log_dir"`77 LogDir string `mapstructure:"log_dir" yaml:"log_dir" toml:"log_dir"`
84 EnableFileLog bool `mapstructure:"enable_file_log" yaml:"enable_file_log" toml:"enable_file_log"`78 EnableFileLog bool `mapstructure:"enable_file_log" yaml:"enable_file_log" toml:"enable_file_log"`
85 79
86- // Capture settings80+ // Capture browser console to logs
87- CaptureStdout bool `mapstructure:"capture_stdout" yaml:"capture_stdout" toml:"capture_stdout" json:"capture_stdout"`
88- CaptureStderr bool `mapstructure:"capture_stderr" yaml:"capture_stderr" toml:"capture_stderr" json:"capture_stderr"`
89- CaptureCOutput bool `mapstructure:"capture_c_output" yaml:"capture_c_output" toml:"capture_c_output" json:"capture_c_output"`
90 CaptureConsole bool `mapstructure:"capture_console" yaml:"capture_console" toml:"capture_console" json:"capture_console"`81 CaptureConsole bool `mapstructure:"capture_console" yaml:"capture_console" toml:"capture_console" json:"capture_console"`
91-
92- // Debug output
93- DebugFile string `mapstructure:"debug_file" yaml:"debug_file" toml:"debug_file"`
94- VerboseWebKit bool `mapstructure:"verbose_webkit" yaml:"verbose_webkit" toml:"verbose_webkit"`
95 }82 }
96 83
97 // AppearanceConfig holds UI/rendering preferences.84 // AppearanceConfig holds UI/rendering preferences.
@@ -119,45 +106,6 @@ type ColorPalette struct {
119 Border string `mapstructure:"border" yaml:"border" toml:"border" json:"border"`106 Border string `mapstructure:"border" yaml:"border" toml:"border" json:"border"`
120 }107 }
121 108
122-// VideoAccelerationConfig holds video hardware acceleration preferences.
123-type VideoAccelerationConfig struct {
124- EnableVAAPI bool `mapstructure:"enable_vaapi" yaml:"enable_vaapi" toml:"enable_vaapi"`
125- AutoDetectGPU bool `mapstructure:"auto_detect_gpu" yaml:"auto_detect_gpu" toml:"auto_detect_gpu"`
126- VAAPIDriverName string `mapstructure:"vaapi_driver_name" yaml:"vaapi_driver_name" toml:"vaapi_driver_name"`
127- EnableAllDrivers bool `mapstructure:"enable_all_drivers" yaml:"enable_all_drivers" toml:"enable_all_drivers"`
128- LegacyVAAPI bool `mapstructure:"legacy_vaapi" yaml:"legacy_vaapi" toml:"legacy_vaapi"`
129-}
130-
131-// CodecConfig holds video codec preferences and handling
132-type CodecConfig struct {
133- // Codec preference order (e.g., "av1,h264,vp8")
134- PreferredCodecs string `mapstructure:"preferred_codecs" yaml:"preferred_codecs" toml:"preferred_codecs"`
135-
136- // Force specific codec for platforms
137- ForceAV1 bool `mapstructure:"force_av1" yaml:"force_av1" toml:"force_av1"`
138-
139- // Block problematic codecs
140- BlockVP9 bool `mapstructure:"block_vp9" yaml:"block_vp9" toml:"block_vp9"`
141- BlockVP8 bool `mapstructure:"block_vp8" yaml:"block_vp8" toml:"block_vp8"`
142-
143- // Hardware acceleration per codec
144- AV1HardwareOnly bool `mapstructure:"av1_hardware_only" yaml:"av1_hardware_only" toml:"av1_hardware_only"`
145- DisableVP9Hardware bool `mapstructure:"disable_vp9_hardware" yaml:"disable_vp9_hardware" toml:"disable_vp9_hardware"`
146-
147- // Buffer configuration for smooth playback
148- VideoBufferSizeMB int `mapstructure:"video_buffer_size_mb" yaml:"video_buffer_size_mb" toml:"video_buffer_size_mb"`
149- QueueBufferTimeSec int `mapstructure:"queue_buffer_time_sec" yaml:"queue_buffer_time_sec" toml:"queue_buffer_time_sec"`
150-
151- // Custom User-Agent for codec negotiation
152- CustomUserAgent string `mapstructure:"custom_user_agent" yaml:"custom_user_agent" toml:"custom_user_agent"`
153-
154- // Maximum resolution for AV1 codec (720p, 1080p, 1440p, 4k, unlimited)
155- AV1MaxResolution string `mapstructure:"av1_max_resolution" yaml:"av1_max_resolution" toml:"av1_max_resolution"`
156-
157- // Site-specific codec control settings
158- DisableTwitchCodecControl bool `mapstructure:"disable_twitch_codec_control" yaml:"disable_twitch_codec_control" toml:"disable_twitch_codec_control"`
159-}
160-
161 // ContentFilteringConfig holds content filtering and ad blocking preferences109 // ContentFilteringConfig holds content filtering and ad blocking preferences
162 type ContentFilteringConfig struct {110 type ContentFilteringConfig struct {
163 // Enabled controls whether ad blocking is active (default: true)111 // Enabled controls whether ad blocking is active (default: true)
@@ -178,43 +126,6 @@ type OmniboxConfig struct {
178 type DebugConfig struct {126 type DebugConfig struct {
179 // Enable browser developer tools (F12, Inspect Element in context menu)127 // Enable browser developer tools (F12, Inspect Element in context menu)
180 EnableDevTools bool `mapstructure:"enable_devtools" yaml:"enable_devtools" toml:"enable_devtools"`128 EnableDevTools bool `mapstructure:"enable_devtools" yaml:"enable_devtools" toml:"enable_devtools"`
181-
182- // Enable WebKit internal debug logging
183- EnableWebKitDebug bool `mapstructure:"enable_webkit_debug" yaml:"enable_webkit_debug" toml:"enable_webkit_debug"`
184-
185- // WebKit debug categories (comma-separated)
186- // Common values: "Network:preconnectTo", "ContentFilters", "Loading", "JavaScript"
187- WebKitDebugCategories string `mapstructure:"webkit_debug_categories" yaml:"webkit_debug_categories" toml:"webkit_debug_categories"`
188-
189- // Enable content filtering debug logs
190- EnableFilteringDebug bool `mapstructure:"enable_filtering_debug" yaml:"enable_filtering_debug" toml:"enable_filtering_debug"`
191-
192- // Enable detailed WebView state logging
193- EnableWebViewDebug bool `mapstructure:"enable_webview_debug" yaml:"enable_webview_debug" toml:"enable_webview_debug"`
194-
195- // Log WebKit crashes and errors to file
196- LogWebKitCrashes bool `mapstructure:"log_webkit_crashes" yaml:"log_webkit_crashes" toml:"log_webkit_crashes"`
197-
198- // Enable script injection debug logs
199- EnableScriptDebug bool `mapstructure:"enable_script_debug" yaml:"enable_script_debug" toml:"enable_script_debug"`
200-
201- // Enable general debug mode (equivalent to DUMBER_DEBUG env var)
202- EnableGeneralDebug bool `mapstructure:"enable_general_debug" yaml:"enable_general_debug" toml:"enable_general_debug"`
203-
204- // Enable workspace navigation and focus debug logs
205- EnableWorkspaceDebug bool `mapstructure:"enable_workspace_debug" yaml:"enable_workspace_debug" toml:"enable_workspace_debug"`
206-
207- // Enable focus state machine debug logs
208- EnableFocusDebug bool `mapstructure:"enable_focus_debug" yaml:"enable_focus_debug" toml:"enable_focus_debug"`
209-
210- // Enable CSS reconciler debug logs
211- EnableCSSDebug bool `mapstructure:"enable_css_debug" yaml:"enable_css_debug" toml:"enable_css_debug"`
212-
213- // Enable focus metrics tracking
214- EnableFocusMetrics bool `mapstructure:"enable_focus_metrics" yaml:"enable_focus_metrics" toml:"enable_focus_metrics"`
215-
216- // Enable detailed pane close instrumentation and tree snapshots
217- EnablePaneCloseDebug bool `mapstructure:"enable_pane_close_debug" yaml:"enable_pane_close_debug" toml:"enable_pane_close_debug"`
218 }129 }
219 130
220 // WorkspaceConfig captures layout, pane, and tab behaviour preferences.131 // WorkspaceConfig captures layout, pane, and tab behaviour preferences.
M internal/infrastructure/config/validation.go +0 -24
@@ -138,31 +138,7 @@ func validateConfig(config *Config) error {
138138 }
139139 }
140140
141- // Validate codec buffer sizes
142- if config.CodecPreferences.VideoBufferSizeMB < 0 {
143- validationErrors = append(validationErrors, "codec_preferences.video_buffer_size_mb must be non-negative")
144- }
145- if config.CodecPreferences.QueueBufferTimeSec < 0 {
146- validationErrors = append(validationErrors, "codec_preferences.queue_buffer_time_sec must be non-negative")
147- }
148-
149- // Validate AV1 max resolution using switch statement
150- if config.CodecPreferences.AV1MaxResolution != "" {
151- switch config.CodecPreferences.AV1MaxResolution {
152- case "720p", "1080p", "1440p", "4k", "unlimited":
153- // Valid
154- default:
155- validationErrors = append(validationErrors, fmt.Sprintf("codec_preferences.av1_max_resolution must be one of: 720p, 1080p, 1440p, 4k, unlimited (got: %s)", config.CodecPreferences.AV1MaxResolution))
156- }
157- }
158-
159141 // Validate logging values
160- if config.Logging.MaxSize < 0 {
161- validationErrors = append(validationErrors, "logging.max_size must be non-negative")
162- }
163- if config.Logging.MaxBackups < 0 {
164- validationErrors = append(validationErrors, "logging.max_backups must be non-negative")
165- }
166142 if config.Logging.MaxAge < 0 {
167143 validationErrors = append(validationErrors, "logging.max_age must be non-negative")
168144 }
@@ -138,31 +138,7 @@ func validateConfig(config *Config) error {
138 }138 }
139 }139 }
140 140
141- // Validate codec buffer sizes
142- if config.CodecPreferences.VideoBufferSizeMB < 0 {
143- validationErrors = append(validationErrors, "codec_preferences.video_buffer_size_mb must be non-negative")
144- }
145- if config.CodecPreferences.QueueBufferTimeSec < 0 {
146- validationErrors = append(validationErrors, "codec_preferences.queue_buffer_time_sec must be non-negative")
147- }
148-
149- // Validate AV1 max resolution using switch statement
150- if config.CodecPreferences.AV1MaxResolution != "" {
151- switch config.CodecPreferences.AV1MaxResolution {
152- case "720p", "1080p", "1440p", "4k", "unlimited":
153- // Valid
154- default:
155- validationErrors = append(validationErrors, fmt.Sprintf("codec_preferences.av1_max_resolution must be one of: 720p, 1080p, 1440p, 4k, unlimited (got: %s)", config.CodecPreferences.AV1MaxResolution))
156- }
157- }
158-
159 // Validate logging values141 // Validate logging values
160- if config.Logging.MaxSize < 0 {
161- validationErrors = append(validationErrors, "logging.max_size must be non-negative")
162- }
163- if config.Logging.MaxBackups < 0 {
164- validationErrors = append(validationErrors, "logging.max_backups must be non-negative")
165- }
166 if config.Logging.MaxAge < 0 {142 if config.Logging.MaxAge < 0 {
167 validationErrors = append(validationErrors, "logging.max_age must be non-negative")143 validationErrors = append(validationErrors, "logging.max_age must be non-negative")
168 }144 }
M internal/infrastructure/config/watcher.go +0 -11
@@ -81,17 +81,6 @@ func (m *Manager) reload() error {
8181 config.RenderingMode = RenderingModeAuto
8282 }
8383
84- // TODO: implement in Step 18 - Auto-detect GPU if enabled and driver name is not set
85- // if config.VideoAcceleration.AutoDetectGPU && config.VideoAcceleration.VAAPIDriverName == "" {
86- // gpuInfo := gpu.DetectGPU()
87- // if gpuInfo.SupportsVAAPI() {
88- // config.VideoAcceleration.VAAPIDriverName = gpuInfo.GetVAAPIDriverName()
89- // }
90- // }
91-
92- // TODO: implement in Step 18 - Validate and configure codec preferences based on GPU
93- // config = m.validateAndConfigureCodecPreferences(config)
94-
9584 // Validate ColorScheme setting using switch statement
9685 switch config.Appearance.ColorScheme {
9786 case "prefer-dark", "prefer-light", ThemeDefault:
@@ -81,17 +81,6 @@ func (m *Manager) reload() error {
81 config.RenderingMode = RenderingModeAuto81 config.RenderingMode = RenderingModeAuto
82 }82 }
83 83
84- // TODO: implement in Step 18 - Auto-detect GPU if enabled and driver name is not set
85- // if config.VideoAcceleration.AutoDetectGPU && config.VideoAcceleration.VAAPIDriverName == "" {
86- // gpuInfo := gpu.DetectGPU()
87- // if gpuInfo.SupportsVAAPI() {
88- // config.VideoAcceleration.VAAPIDriverName = gpuInfo.GetVAAPIDriverName()
89- // }
90- // }
91-
92- // TODO: implement in Step 18 - Validate and configure codec preferences based on GPU
93- // config = m.validateAndConfigureCodecPreferences(config)
94-
95 // Validate ColorScheme setting using switch statement84 // Validate ColorScheme setting using switch statement
96 switch config.Appearance.ColorScheme {85 switch config.Appearance.ColorScheme {
97 case "prefer-dark", "prefer-light", ThemeDefault:86 case "prefer-dark", "prefer-light", ThemeDefault:

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