matcha icon indicating copy to clipboard operation
matcha copied to clipboard

BUG: formatRelativeDate "just now" vs "1 min ago" gap

Open andrinoff opened this issue 7 months ago • 2 comments

Describe the bug

The formatRelativeDate function in tui/inbox.go has a logic gap between "just now" and "1 min ago". If a message is exactly 1 minute old, it might show incorrectly or there might be a jitter in display.

To reproduce

  1. Receive an email.
  2. Watch the relative date as it transitions from "just now" to "1 min ago".

Expected behavior

Seamless transition between relative time units.

Additional context

	case d < time.Minute:
		return "just now"
	case d < time.Hour:
		mins := int(d.Minutes())
		if mins == 1 {
			return "1 min ago"
		}

If d is exactly time.Minute, it falls into the second case, but int(d.Minutes()) might be 1. It works, but the thresholds could be more precise.

andrinoff avatar Apr 16 '26 13:04 andrinoff

This has had no activity for 30 days. It will be closed in 14 days unless updated. Comment or remove the stale label to keep it open.

floatpanebot avatar May 17 '26 05:05 floatpanebot

Closing due to inactivity. Reopen if still relevant.

floatpanebot avatar May 31 '26 06:05 floatpanebot