commit d29ef7c023b8b9513858a21ec8fa930135a717de
parent 66c9a65f269e00918596bc017147b487c472a329
Author: Erik Loualiche <eloualiche@users.noreply.github.com>
Date: Mon, 9 Mar 2026 18:19:35 -0400
Merge pull request #11 from LouLouLibs/fix/help-line-styling
fix: style help line with bold keys and dim descriptions
Diffstat:
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/internal/tui/dashboard.go b/internal/tui/dashboard.go
@@ -367,11 +367,19 @@ func (m DashboardModel) View() string {
if m.filtering {
b.WriteString(helpStyle.Render(fmt.Sprintf(" filter: %s█ (enter apply esc clear)", m.filter)))
} else {
- help := " q quit p pause r resync ↑↓ navigate enter expand v view l logs / filter"
+ help := " " +
+ helpKey("q") + helpDesc("quit") +
+ helpKey("p") + helpDesc("pause") +
+ helpKey("r") + helpDesc("resync") +
+ helpKey("↑↓") + helpDesc("navigate") +
+ helpKey("enter") + helpDesc("expand") +
+ helpKey("v") + helpDesc("view") +
+ helpKey("l") + helpDesc("logs") +
+ helpKey("/") + helpDesc("filter")
if m.filter != "" {
- help += fmt.Sprintf(" [filter: %s]", m.filter)
+ help += dimStyle.Render(fmt.Sprintf(" [filter: %s]", m.filter))
}
- b.WriteString(helpStyle.Render(help))
+ b.WriteString(help)
}
b.WriteString("\n")
@@ -581,6 +589,12 @@ func abbreviatePath(p string, maxLen int) string {
return strings.Join(parts, "/")
}
+// helpKey renders a keyboard shortcut key in normal (bright) style.
+func helpKey(k string) string { return helpKeyStyle.Render(k) + " " }
+
+// helpDesc renders a shortcut description in dim style with spacing.
+func helpDesc(d string) string { return dimStyle.Render(d) + " " }
+
// padRight pads s with spaces to width n, truncating if necessary.
func padRight(s string, n int) string {
if len(s) >= n {
diff --git a/internal/tui/styles.go b/internal/tui/styles.go
@@ -16,4 +16,5 @@ var (
dimStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("8"))
helpStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("8"))
focusedStyle = lipgloss.NewStyle().Bold(true)
+ helpKeyStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("7")).Bold(true)
)