token list: future expiry prints as "just now" at a terminal #286

closed cmc opened this on 2026-09-28 05:23 UTC · bug cli

Discussion

cmc 2026-09-28 05:23 UTC

At a terminal, token list prints a future expiry as "expires just now".

internal/control/token.go:112-116 renders ExpiresAt through relAge, which clamps the duration at zero (max(now.Sub(t), 0), internal/control/term.go:188) and so only handles the past. A token expiring in six days reads "expires just now". Piped output uses stamp and is correct.

  • Render future times as "in 6d" (a relAge counterpart for the future, or a sign-aware relAge), and test both directions.

closed by cmc in commit 2ddf2389c0: control: token list uses expiresText, not relAge, for expiry

2026-09-28 21:49 UTC