Advertise the rule screens in the key help

The bottom help still described 4 as "rules" from before the rules list
existed, and never mentioned 5 at all, so the new screen was unreachable
unless you already knew about it.

The transactions line had also outgrown the window: at 137 characters it ran
past the edge of a normal terminal and "q quit" was simply gone. Help now
wraps to the window width instead of being cut off, and that line is shorter.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-09 02:09:42 +02:00
co-authored by Claude Opus 5
parent c2eba53fd4
commit 3eca8f5376
3 changed files with 62 additions and 6 deletions
+12 -5
View File
@@ -1111,7 +1111,14 @@ func (m *Model) View() string {
b.WriteString(statusStyle.Render(m.status))
}
b.WriteString("\n")
b.WriteString(helpStyle.Render(m.help()))
// Wrap the key list rather than letting the terminal cut it off: the keys
// at the end are as important as the ones at the start, and "q quit" was
// the first casualty on a narrow window.
help := helpStyle
if m.width > 0 {
help = help.Width(m.width)
}
b.WriteString(help.Render(m.help()))
return b.String()
}
@@ -1252,17 +1259,17 @@ func (m *Model) help() string {
}
switch m.view {
case viewAccounts:
return "enter open · 2 transactions · 3 report · 4 rules · i import · r retag · q quit"
return "enter open · 2 transactions · 3 report · 4 new rule · 5 rules · i import · r retag · q quit"
case viewRules:
return "tab/↑↓ field · pgup/pgdn scroll list · enter save rule · esc back · ctrl+c quit"
case viewRuleList:
if m.confirm != confirmNone {
return "y confirm · any other key cancels"
}
return "d delete rule · p prune all unused · r refresh counts · 4 rule builder · esc back · q quit"
return "d delete rule · p prune all unused · r refresh counts · 4 new rule · 1 accounts · esc back · q quit"
case viewReport:
return "1 accounts · 2 transactions · 4 rules · u untagged · a all accounts · q quit"
return "1 accounts · 2 transactions · 4 new rule · 5 rules · u untagged · a all accounts · q quit"
default:
return "t tag · x transfer · c clear · / search · u untagged · a all · i import · r retag · 4 rules · 1 accounts · 3 report · q quit"
return "t tag · x transfer · c clear · / search · u untagged · a all · i import · r retag · 4 new rule · 5 rules · q quit"
}
}