Add the TUI.

A table with one row per URL, a level-colored log pane and a status bar.
New alerts flash their row and ring the bell. Keys pause, force checks,
open the product page or cart link, and reload the config, which is
validated first and applied in place, keeping each URL's timing.
Headless mode and the TUI now share one watcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
OverlordandClaude Bot committed 2026-10-14 12:25:26 +02:00
1 parent 8f0eda5d4d
commit a19e6fa711
14 files changed
+1359 -105

No files matched your search

+6 -3
View File
@@ -73,10 +73,12 @@ func TestCooldown(t *testing.T) {
for _, st := range steps {
if strings.HasSuffix(st.name, "new rate") { fx.rate = 1.30 }
a, why, err := e.Consider(ctx, it, st.report, start.Add(st.after))
d, err := e.Consider(ctx, it, st.report, start.Add(st.after))
if err != nil { t.Fatalf("%s: %v", st.name, err) }
if fired := a != nil; fired != st.fires { t.Errorf("%s: fired = %v, want %v (%s)", st.name, fired, st.fires, why) }
a := d.Alert
if fired := a != nil; fired != st.fires { t.Errorf("%s: fired = %v, want %v (%s)", st.name, fired, st.fires, d.Reason) }
if !d.Qualifies { t.Errorf("%s: does not qualify: %s", st.name, d.Reason) }
if a == nil { continue }
prev := ""
@@ -121,7 +123,8 @@ func TestQualify(t *testing.T) {
}
for _, c := range cases {
a, why, err := NewEngine(time.Hour, c.fx, nil).Consider(ctx, c.item, c.report, now)
d, err := NewEngine(time.Hour, c.fx, nil).Consider(ctx, c.item, c.report, now)
a, why := d.Alert, d.Reason
switch {
case c.want == "fire" && a == nil: