diff --git a/internal/tui/feed/convoy.go b/internal/tui/feed/convoy.go index 32390b57..49e47d29 100644 --- a/internal/tui/feed/convoy.go +++ b/internal/tui/feed/convoy.go @@ -305,7 +305,7 @@ func renderConvoyLine(c Convoy, landed bool) string { if landed { // Show checkmark and time since landing - age := formatConvoyAge(time.Since(c.ClosedAt)) + age := formatAge(time.Since(c.ClosedAt)) status := ConvoyLandedStyle.Render("✓") + " " + ConvoyAgeStyle.Render(age+" ago") return fmt.Sprintf(" %s %-20s %s", id, title, status) } @@ -337,16 +337,3 @@ func renderProgressBar(completed, total int) string { return ConvoyProgressStyle.Render(bar) } -// formatConvoyAge formats duration for convoy display -func formatConvoyAge(d time.Duration) string { - if d < time.Minute { - return "just now" - } - if d < time.Hour { - return fmt.Sprintf("%dm", int(d.Minutes())) - } - if d < 24*time.Hour { - return fmt.Sprintf("%dh", int(d.Hours())) - } - return fmt.Sprintf("%dd", int(d.Hours()/24)) -} diff --git a/internal/tui/feed/view.go b/internal/tui/feed/view.go index c99be43a..337f040a 100644 --- a/internal/tui/feed/view.go +++ b/internal/tui/feed/view.go @@ -344,7 +344,7 @@ func (m *Model) renderShortHelp() string { // formatAge formats a duration as a short age string func formatAge(d time.Duration) string { if d < time.Minute { - return fmt.Sprintf("%ds", int(d.Seconds())) + return "just now" } if d < time.Hour { return fmt.Sprintf("%dm", int(d.Minutes()))