diff --git a/pkg/tui/account.go b/pkg/tui/account.go index c77d0e7..ddfd68a 100644 --- a/pkg/tui/account.go +++ b/pkg/tui/account.go @@ -129,13 +129,13 @@ func (m Model) scrollToAccountDetailItem() Model { vpH := m.account.detailViewport.Height offset := m.account.detailViewport.YOffset - // If item is above viewport, scroll up to show it - if targetY < offset { - m.account.detailViewport.SetYOffset(targetY) + // 1-item buffer: scroll when the NEXT item would be off-screen, + // not when the current item hits the very edge + if targetY-itemHeight < offset { + m.account.detailViewport.SetYOffset(targetY - itemHeight) } - // If item is below viewport, scroll down to show it - if targetY+itemHeight > offset+vpH { - m.account.detailViewport.SetYOffset(targetY - vpH + itemHeight) + if targetY+itemHeight+itemHeight > offset+vpH { + m.account.detailViewport.SetYOffset(targetY - vpH + itemHeight + itemHeight) } return m diff --git a/pkg/tui/account_orders.go b/pkg/tui/account_orders.go index 3b24bc5..5f52f48 100644 --- a/pkg/tui/account_orders.go +++ b/pkg/tui/account_orders.go @@ -88,7 +88,7 @@ func (m Model) buildOrderCard(order models.Order, boxWidth int, isSelected bool) var itemBox lipgloss.Style if isSelected { - itemBox = base.BorderForeground(m.theme.Accent()) + itemBox = base.BorderForeground(m.theme.Highlight()) } else { itemBox = base.BorderForeground(m.theme.Border()) }