Add more QoL and high prio features
This commit is contained in:
@@ -18,7 +18,8 @@ func TestLoadConfigUsesDefaultsWhenOptionalFileIsMissing(t *testing.T) {
|
||||
if got.Theme != want.Theme ||
|
||||
got.RefreshInterval.Duration != want.RefreshInterval.Duration ||
|
||||
got.Paths.Scroll != want.Paths.Scroll ||
|
||||
got.Display.FoldResolved != want.Display.FoldResolved {
|
||||
got.Display.FoldResolved != want.Display.FoldResolved ||
|
||||
got.Display.CompactReviews != want.Display.CompactReviews {
|
||||
t.Fatalf("defaults = %#v, want %#v", got, want)
|
||||
}
|
||||
}
|
||||
@@ -37,6 +38,7 @@ endpoint = "https://github.example.com/api/graphql"
|
||||
fold_resolved = false
|
||||
thread_list_width_percent = 45
|
||||
dashboard_mode = "hotkey"
|
||||
compact_reviews = false
|
||||
|
||||
[paths]
|
||||
scroll = true
|
||||
@@ -45,6 +47,11 @@ scroll_interval = "125ms"
|
||||
[threads]
|
||||
status_order = ["resolved", "unresolved", "outdated"]
|
||||
within_status = "timestamp"
|
||||
|
||||
[cache]
|
||||
enabled = false
|
||||
max_age = "48h"
|
||||
directory = "/tmp/gh-threads-cache"
|
||||
`
|
||||
if err := os.WriteFile(path, []byte(content), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -60,9 +67,11 @@ within_status = "timestamp"
|
||||
got.Repository != "owner/repo" || !got.ShowAll || got.Limit != 75 ||
|
||||
got.Display.FoldResolved || got.Display.ThreadListWidthPercent != 45 ||
|
||||
got.Display.DashboardMode != "hotkey" ||
|
||||
got.Display.CompactReviews ||
|
||||
!got.Paths.Scroll || got.Paths.ScrollInterval.Duration != 125*time.Millisecond ||
|
||||
strings.Join(got.Threads.StatusOrder, ",") != "resolved,unresolved,outdated" ||
|
||||
got.Threads.WithinStatus != "timestamp" {
|
||||
got.Threads.WithinStatus != "timestamp" || got.Cache.Enabled ||
|
||||
got.Cache.MaxAge.Duration != 48*time.Hour || got.Cache.Directory != "/tmp/gh-threads-cache" {
|
||||
t.Fatalf("config = %#v", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user