[P2] Time/locale formatting consistency #110
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Parent Epic
#100
Problem
The time range picker shows
1. Apr. 21:31which is German date format. International teams will be confused. Timestamps and durations should be consistently formatted throughout the UI.Current State
1. Apr. 21:31 – now(German locale)2026-04-01 22:31:41(ISO-ish, fine)01/04/2026, 22:33:10(DD/MM/YYYY, different from exchanges)178ms,5.76s,321s(inconsistent units)5.8s,321s(raw seconds for large values — should be5m 21s)Proposed Solution
1. Locale-Aware Date/Time
Use
Intl.DateTimeFormatwith the browser's locale, or provide a locale setting in user preferences:2. Consistent Timestamp Format
Use one format everywhere. Recommendation:
3m agoor22:31:412026-04-01 22:31:412026-04-01 22:31:41.504 UTC+23. Human-Readable Durations
Large durations should break into units:
The current
321sin the KPI strip is confusing — nobody thinks in "321 seconds."Acceptance Criteria
Xm YsformatRelated
Design Specification
Create
ui/src/utils/format.tswith shared formatting functions:formatTimestamp(iso, 'full'|'short'|'time')— UsesIntl.DateTimeFormatwith browser localeformatDuration(ms)—<1s: "123ms",1-60s: "1.23s",60s-1h: "2m 15s",>1h: "1h 23m"formatRelativeTime(iso)—"3m ago","2h ago"with full timestamp tooltipformatCount(n)—n.toLocaleString()Replace 9+ local formatting functions across Dashboard.tsx, AuditLogPage.tsx, AgentHealth.tsx, AppConfigPage.tsx, LayoutShell.tsx, DashboardL3.tsx, DiagramNode.tsx, ExchangeHeader.tsx.