Fix #133: app-wide relative date design #138
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!138
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-133"
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?
Fixes #133.
Every timestamp in the UI now renders through one shared component (
web/src/components/DateTime.jsx) backed by headless-testable helpers inweb/src/lib/format.js(fmtDate/fmtDateTitle/ordinal, Intl only — no new deps):Decisions (documented in format.js): 31-day fixed month boundary (not calendar month); future clamp; fixed English month names for deterministic tier text; GMT offset fallback when Intl yields no zone name. docs/go/12_web_ui.md pins no date display, so no doc change.
Tests: node --test web/test/unit/*.test.js 308/308 green (new dates.test.js: 59s/1h/23h/24h/30d/31d/1y boundaries, ordinals incl. 11/12/13, future, invalid). vite build clean (117 modules). Browser spot-check via CDP on a real server (dark+light, /, /setup, repo commits + commit detail): zero console/page errors; live
Every timestamp renders through a shared <DateTime> component backed by headless-testable helpers in web/src/lib/format.js: <1 day relative ('just now'/'N minutes ago'/'N hours ago'), 1-30 days relative plus ordinal day ('3 days ago - 2nd of September'), 31+ days absolute ('September 28th, 2024'); hover title is the user-local wall time 'YYYY-MM-DD HH:MM <zone>' via Intl short zone name. Sweeps all fmtDate/toLocaleString call sites (issues, pulls, commits, releases, checks, comments, WAL, settings history, keys, orgs).