diff --git a/tui/tui.go b/tui/tui.go index 0fce5b7..9479252 100644 --- a/tui/tui.go +++ b/tui/tui.go @@ -2210,15 +2210,15 @@ func (m *model) keepMenuVisible() { } func footerControls(width int) string { - full := "Tab focus click select header sort right-click menu a actions o open c copy s sort m members v group d detail l layout r refresh wheel scroll / filter # jump ? help q quit" + full := "Tab focus click select right-click menu a actions header sort wheel scroll / filter # jump o open c copy s sort m members v group d detail r refresh l layout ? help q quit" if lipgloss.Width(full) <= maxInt(1, width-2) { return full } - compact := "Tab focus click select right-click menu a actions o open c copy s sort m members v group d detail l layout r refresh / filter # jump ? help q quit" + compact := "Tab focus click select right-click menu a actions wheel scroll / filter # jump r refresh ? help q quit" if lipgloss.Width(compact) <= maxInt(1, width-2) { return compact } - return "Tab panes click menu a actions o open c copy s sort m members v group d detail l layout r refresh / filter # jump ? help q quit" + return "Tab focus click right-click menu a actions / filter # jump ? help q quit" } func (m model) footerLocation() string { diff --git a/tui/tui_test.go b/tui/tui_test.go index c1946fd..b35ff68 100644 --- a/tui/tui_test.go +++ b/tui/tui_test.go @@ -647,11 +647,32 @@ func TestDetailModeToggleStartsFullLikeGitcrawl(t *testing.T) { if !strings.Contains(full, "Properties") || !strings.Contains(full, "IDs") { t.Fatalf("full detail should include metadata sections:\n%s", full) } + m.width = 190 if !strings.Contains(stripANSI(m.View()), "d detail") { t.Fatalf("footer should expose detail toggle:\n%s", stripANSI(m.View())) } } +func TestFooterControlsPrioritizeGitcrawlMuscleMemory(t *testing.T) { + full := footerControls(190) + for _, want := range []string{"right-click menu", "a actions", "header sort", "wheel scroll", "/ filter", "# jump", "r refresh", "d detail"} { + if !strings.Contains(full, want) { + t.Fatalf("wide footer missing %q:\n%s", want, full) + } + } + compact := footerControls(122) + for _, want := range []string{"right-click menu", "a actions", "wheel scroll", "/ filter", "# jump", "r refresh", "? help", "q quit"} { + if !strings.Contains(compact, want) { + t.Fatalf("compact footer missing %q:\n%s", want, compact) + } + } + for _, noisy := range []string{"o open", "c copy", "v group", "l layout"} { + if strings.Contains(compact, noisy) { + t.Fatalf("compact footer should match gitcrawl priority before app extras %q:\n%s", noisy, compact) + } + } +} + func TestChatMembersDefaultToNewestFirstLikeGitcrawl(t *testing.T) { m := newModel(Options{ Title: "slacrawl archive",