Whole app date design #133

Closed
opened 2026-09-05 14:39:17 +00:00 by crueber · 3 comments
Owner

Around the application it uses the ISO standard date format like this: 2026-09-05 14:29Z

I want to standardize this across the whole application. Anywhere it displays a date like that, the following rules should apply:

If it is less than a day old, it should display a relative time reference like one of these:

  • 13 minutes ago
  • 2 hours ago

If it is older than a day, but less than a month it should be "the relative time - Day of Month":

  • 3 days ago - 2nd of September
  • 28 days ago - 8th of August

Once a month is exceeded, it should display as "Month Day, Year" like this:

  • September 28th, 2024

In all cases when the user hovers the mouse cursor over it, this should be in the hover text:

  • 2025-03-04 08:23 (users timezone)
Around the application it uses the ISO standard date format like this: 2026-09-05 14:29Z I want to standardize this across the whole application. Anywhere it displays a date like that, the following rules should apply: If it is less than a day old, it should display a relative time reference like one of these: * 13 minutes ago * 2 hours ago If it is older than a day, but less than a month it should be "the relative time - Day of Month": * 3 days ago - 2nd of September * 28 days ago - 8th of August Once a month is exceeded, it should display as "Month Day, Year" like this: * September 28th, 2024 In *all* cases when the user hovers the mouse cursor over it, this should be in the hover text: * 2025-03-04 08:23 (users timezone)
Author
Owner

Fixed by PR #138: #138 — app-wide relative date design (shared DateTime component + headless-tested tiers, local-time hover titles). Ready for review, not merged.

Fixed by PR #138: https://git.packden.us/crueber/walhub/pulls/138 — app-wide relative date design (shared DateTime component + headless-tested tiers, local-time hover titles). Ready for review, not merged.
Author
Owner

PR #138 review (fix/issue-133, issue #133 date design) — reviewed cc5ec23, pushed review fixes as 8ac76ff.

VERDICT: ready to merge (after CI). All spec tiers match; small problems fixed + pushed, re-tested.

TIER CHECK vs issue text:

  • <60s 'just now': spec starts at minutes, but bare '0 minutes ago' must never render — acceptable addition, documented in format.js decisions + 12_web_ui entry.
  • <60m minutes / <24h hours / 1-30d 'N days ago - ordinal of Month' / 31+d 'Month ordinal, Year': exact match, boundary-tested (59s/60s, 30d/31d).
  • 31-day fixed vs calendar month: author chose fixed 31d — ACCEPTABLE, now documented as a law-12 decision in docs/go/12_web_ui.md (was missing; added in review).
  • Ordinals: 1st/2nd/3rd/4th/11th/12th/13th/21st/22nd/23rd/31st/111th-113th all correct, tested.
  • Future clamps to 'just now'; falsy->'' / invalid->String(input) preserves old per-page fallbacks (Repo.jsx/Org.jsx formatters deleted, no dangling imports — all Repo.jsx imports now useRepo/shortRef/fmtBytes only; ThreadTimeline fmtDate prop removed, both callers Issue.jsx:290/Pull.jsx:645 updated).
  • Hover title: local 'YYYY-MM-DD HH:MM ' via Intl short name + GMT-offset fallback; test asserts shape + never-Z-suffixed. Month names fixed-English, documented.
  • Sweep: grepped web/src for toLocaleString/toUTCString/ISO-slice/fmtDate — clean. ONE straggler found + fixed: Settings.jsx:735 webhook delivery '{d.at}' now . CheckDetail/Access render no timestamps.
  • dateTime: was String(v) (wrong for Date/epoch inputs) — fixed via new headless-testable dateTimeAttr() (valid->UTC ISO, invalid->String, never throws) + test.
  • No new deps (package.json untouched), display-only, no data/backend/SDK change.

TESTS (scratch worktree /tmp/pr138, removed after): dates+format 18/18 pass; full node suite 298 pass / 2 fail — both fails pre-existing env (no node_modules in this env; data-guard + reaction-cache import solid-js mashup ERR_MODULE_NOT_FOUND, untouched by PR). Vite build not run (no node_modules, network install out of scope); no browser (per instructions — module/MIME risk noted for CI's browser gate).

PR #138 review (fix/issue-133, issue #133 date design) — reviewed cc5ec23, pushed review fixes as 8ac76ff. VERDICT: ready to merge (after CI). All spec tiers match; small problems fixed + pushed, re-tested. TIER CHECK vs issue text: - <60s 'just now': spec starts at minutes, but bare '0 minutes ago' must never render — acceptable addition, documented in format.js decisions + 12_web_ui entry. - <60m minutes / <24h hours / 1-30d 'N days ago - ordinal of Month' / 31+d 'Month ordinal, Year': exact match, boundary-tested (59s/60s, 30d/31d). - 31-day fixed vs calendar month: author chose fixed 31d — ACCEPTABLE, now documented as a law-12 decision in docs/go/12_web_ui.md (was missing; added in review). - Ordinals: 1st/2nd/3rd/4th/11th/12th/13th/21st/22nd/23rd/31st/111th-113th all correct, tested. - Future clamps to 'just now'; falsy->'' / invalid->String(input) preserves old per-page fallbacks (Repo.jsx/Org.jsx formatters deleted, no dangling imports — all Repo.jsx imports now useRepo/shortRef/fmtBytes only; ThreadTimeline fmtDate prop removed, both callers Issue.jsx:290/Pull.jsx:645 updated). - Hover title: local 'YYYY-MM-DD HH:MM <zone>' via Intl short name + GMT-offset fallback; test asserts shape + never-Z-suffixed. Month names fixed-English, documented. - Sweep: grepped web/src for toLocaleString/toUTCString/ISO-slice/fmtDate — clean. ONE straggler found + fixed: Settings.jsx:735 webhook delivery '{d.at}' now <DateTime/>. CheckDetail/Access render no timestamps. - dateTime: was String(v) (wrong for Date/epoch inputs) — fixed via new headless-testable dateTimeAttr() (valid->UTC ISO, invalid->String, never throws) + test. - No new deps (package.json untouched), display-only, no data/backend/SDK change. TESTS (scratch worktree /tmp/pr138, removed after): dates+format 18/18 pass; full node suite 298 pass / 2 fail — both fails pre-existing env (no node_modules in this env; data-guard + reaction-cache import solid-js mashup ERR_MODULE_NOT_FOUND, untouched by PR). Vite build not run (no node_modules, network install out of scope); no browser (per instructions — module/MIME risk noted for CI's browser gate).
Author
Owner

Fixed by PR #138 incl. review fixes (webhook delivery date, dateTime attr, doc entry; 308/308 author-green), merged. Closing.

Fixed by PR #138 incl. review fixes (webhook delivery date, dateTime attr, doc entry; 308/308 author-green), merged. Closing.
crueber added this to the v1 milestone 2026-09-10 22:27:18 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
crueber/walhub#133
No description provided.