fix: correct scroll height estimates and improve order selection visibility

The scroll-to-item calculations used wrong item heights (7/5 instead of
9/7) and ignored the 5-line title header offset, causing the viewport to
under-scroll. Selected order cards now light up in accent color for
better visibility across terminal themes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-25 22:00:44 +02:00
parent 79c8238f1b
commit 34bb7a7c7f
2 changed files with 27 additions and 8 deletions

View File

@@ -51,7 +51,12 @@ func (m Model) buildOrderCard(order models.Order, boxWidth int, isSelected bool,
// Order header line: "Order #123" left, "Jan 02 2026 PAID" right
nameStyle := m.theme.TextAccent().Bold(true)
// When selected, item preview text uses accent color instead of dim
// so the whole card "lights up" — much more visible than border color alone
dimStyle := m.theme.TextDim()
if isSelected {
dimStyle = m.theme.TextAccent()
}
statusStyle := m.theme.TextHighlight().Bold(true)