fix(tui): show context-aware Enter hint in hotbar
CI / test (pull_request) Successful in 1m49s
CI / lint (pull_request) Successful in 1m12s
CI / vulncheck (pull_request) Successful in 50s

When cursor is on a group row, hotbar now shows [Enter]Expand or
[Enter]Collapse instead of [Enter]Detail, matching actual behavior.
This commit is contained in:
2026-06-30 17:09:58 -04:00
parent dc79e2baaa
commit 835844314e
+9 -1
View File
@@ -295,7 +295,15 @@ func (m Model) renderFooter(_ dashboardStats) string {
} else if m.detailOpen {
keys = "[i]Close [h]History [s]SLA [e]Edit [m]Maint [l]Logs [S]Settings [T]Theme [q]Quit"
} else {
keys = "[/]Filter [i]Info [Enter]Detail [n]New [e]Edit [d]Del [m]Maint [l]Logs [S]Settings [T]Theme [q]Quit"
enterHint := "[Enter]Detail"
if m.cursor < len(m.sites) && m.sites[m.cursor].Type == "group" {
if m.collapsed[m.sites[m.cursor].ID] {
enterHint = "[Enter]Expand"
} else {
enterHint = "[Enter]Collapse"
}
}
keys = "[/]Filter [i]Info " + enterHint + " [n]New [e]Edit [d]Del [m]Maint [l]Logs [S]Settings [T]Theme [q]Quit"
}
line := m.st.subtleStyle.Render(keys)