Fix high prio recommendations, add error / health screen

This commit is contained in:
2026-07-28 15:40:11 +02:00
parent 948f3e1a79
commit 7511311297
19 changed files with 1885 additions and 148 deletions

View File

@@ -57,9 +57,10 @@ type ThreadConfig struct {
}
type CacheConfig struct {
Enabled bool `toml:"enabled"`
MaxAge configDuration `toml:"max_age"`
Directory string `toml:"directory"`
Enabled bool `toml:"enabled"`
MaxAge configDuration `toml:"max_age"`
Directory string `toml:"directory"`
MaxEntries int `toml:"max_entries"`
}
type EditingConfig struct {
@@ -86,7 +87,9 @@ func defaultConfig() Config {
StatusOrder: []string{"unresolved", "outdated", "resolved"},
WithinStatus: "file",
},
Cache: CacheConfig{Enabled: true, MaxAge: configDuration{7 * 24 * time.Hour}},
Cache: CacheConfig{
Enabled: true, MaxAge: configDuration{7 * 24 * time.Hour}, MaxEntries: 200,
},
Editing: EditingConfig{Mode: "vim"},
KeyBindings: defaultKeyBindings(),
}
@@ -178,6 +181,9 @@ func validateConfig(config Config) error {
if config.Cache.MaxAge.Duration < 0 {
return fmt.Errorf("cache.max_age must not be negative")
}
if config.Cache.MaxEntries < 10 || config.Cache.MaxEntries > 10000 {
return fmt.Errorf("cache.max_entries must be between 10 and 10000")
}
switch config.Editing.Mode {
case "standard", "vim":
default: