From bbcb4f9f5289a1b8284adf9382d21a476726dbf6 Mon Sep 17 00:00:00 2001 From: adrunkhuman <16039109+adrunkhuman@users.noreply.github.com> Date: Sun, 12 Apr 2026 04:55:37 +0200 Subject: [PATCH] Add r: reload hint to league view status bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #32 — the r key was bound to handleReload() in all views but the status bar only advertised it in match view. Default parts now include the hint so users see it after a failed fetch in the league view too. --- internal/ui/view.go | 2 +- internal/ui/view_test.go | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/internal/ui/view.go b/internal/ui/view.go index a807061..9911fe0 100644 --- a/internal/ui/view.go +++ b/internal/ui/view.go @@ -504,7 +504,7 @@ func (m Model) statusBarView() string { if !m.currentFixtureDrillable() { enterHint = "enter: unavail" } - parts = []string{"j/k: move", "h/l: round", enterHint, "esc: selector", "q: quit"} + parts = []string{"j/k: move", "h/l: round", enterHint, "esc: selector", "r: reload", "q: quit"} } left := strings.Join(parts, " · ") diff --git a/internal/ui/view_test.go b/internal/ui/view_test.go index 54fbe5c..bd9b7e7 100644 --- a/internal/ui/view_test.go +++ b/internal/ui/view_test.go @@ -857,6 +857,16 @@ func TestStatusBarViewReflectsFixtureDrillability(t *testing.T) { } } +func TestStatusBarViewLeagueViewIncludesReloadHint(t *testing.T) { + m := sketchModel() + m.width = 120 + + status := m.statusBarView() + if !strings.Contains(status, "r: reload") { + t.Fatalf("expected reload hint in league status bar, got %q", status) + } +} + func TestRenderFixtureWindowAlignsFullFixtureColumns(t *testing.T) { fixtures := []site.Fixture{ {Home: "Bruk-Bet Termalica Nieciecza", Away: "Motor Lublin", Score: "1-2", WhenInfo: "13 marca, 18:00 (3542)", MatchURL: "http://www.90minut.pl/mecz.php?id_mecz=1"},