fix(ui): tick relative timestamps client-side so long-open tabs don't go stale #29
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?
Relative timestamps ("2h ago") were computed once at server render and never updated, so a page left open drifted further from reality the longer it sat — a job-detail page rendered an hour ago kept showing "2h ago" when the truth was "3h ago".
formatRelTimenow wraps its label in<time data-rel-ts=…>, and both layouts (base.html,chromeless.html) carry a small ticker that re-renders every 30s.internal/server/ui/funcs_test.gogo vet ./...andgo test ./internal/server/ui/green