ui(relTime): tick relative timestamps client-side #28

Merged
steve merged 2 commits from fix-stale-reltime into main 2026-05-15 21:14:09 +01:00
Owner

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".

formatRelTime now 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.

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". `formatRelTime` now 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.
steve added 1 commit 2026-05-10 07:38:18 +01:00
ui(relTime): tick relative timestamps client-side so long-open tabs don't freeze
CI / Test (rest) (pull_request) Successful in 9s
CI / Test (store) (pull_request) Successful in 6s
CI / Build (windows/amd64) (pull_request) Successful in 8s
CI / Build (linux/amd64) (pull_request) Successful in 7s
CI / Lint (pull_request) Successful in 19s
CI / Build (linux/arm64) (pull_request) Successful in 7s
e2e / Playwright vs docker-compose (pull_request) Successful in 1m26s
CI / Test (server-http) (pull_request) Successful in 2m34s
28ef9750d3
formatRelTime now wraps its label in <time data-rel-ts=...>, and
both layouts include a small ticker that re-renders every 30s.
Without this, a job-detail page rendered an hour ago kept showing
'2h ago' when the wall-clock truth was '3h ago'.
steve added 1 commit 2026-05-15 21:05:47 +01:00
Merge branch 'main' into fix-stale-reltime
CI / Test (store) (pull_request) Successful in 1m15s
CI / Lint (pull_request) Successful in 19s
CI / Build (windows/amd64) (pull_request) Successful in 25s
CI / Test (server-http) (pull_request) Successful in 2m2s
CI / Test (rest) (pull_request) Successful in 2m12s
CI / Build (linux/amd64) (pull_request) Successful in 26s
CI / Build (linux/arm64) (pull_request) Successful in 26s
e2e / Playwright vs docker-compose (pull_request) Successful in 2m59s
a4d705db6b
steve merged commit 06748f5582 into main 2026-05-15 21:14:09 +01:00
steve deleted branch fix-stale-reltime 2026-05-15 21:14:09 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: steve/restic-manager#28