ui(relTime): tick relative timestamps client-side #28
Reference in New Issue
Block a user
Delete Branch "fix-stale-reltime"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Long-open tabs were showing stale relative timestamps — e.g. a job-detail page rendered an hour ago kept saying "2h ago" when the wall-clock truth was "3h ago".
formatRelTimenow wraps its label in<time data-rel-ts="...">, and both layouts include a small ticker that re-renders every 30s. Buckets are mirrored between Go (relTimeLabel) and JS — keep them in sync if you change one.Tests added covering the wrapped output, the nil/zero "—" fallback, and the bucket boundaries.