fix(web): keep timestamp date and time in the same locale #7081
main fromrefs/pull/7081/head·merged by juliusmarminge View on GitHubFollow-up to #6190.
Older chat timestamps could mix locale conventions on desktop: the wall-clock time used the host locale while the numeric date prefix used the JavaScript runtime default. For an en-GB host this could render as 8/12 15:44 instead of 12/08 15:44.
This constructs both numeric date formatters with the same resolved host locale already used by the time formatter, and adds a regression test for an en-GB desktop bridge.
Impact: date and time portions of older chat timestamps now use one consistent locale.
Checks:
vp test run src/timestampFormat.test.ts --project unit(31 passed)- targeted
vp lint --report-unused-disable-directives - targeted
vp fmt --check - web, desktop, and contracts typechecks
Implemented with GPT-5.6 Sol in the T3 Code Codex harness.
Note
Fix date and time formatting to use the same locale in timestamps#
In timestampFormat.ts, numericDateFormatter and numericDateWithYearFormatter were passing undefined as the locale to Intl.DateTimeFormat, causing the date portion to use the runtime default locale while the time portion used timestampLocale. Both formatters now pass timestampLocale explicitly, so date and time are formatted consistently. A new test covers the en-GB locale to prevent regression.
Note
Low Risk Small display-formatting change in timestamp helpers with no auth, data, or API impact.
Overview
Fixes mixed locale conventions in older chat timestamps on desktop, where the numeric date prefix could follow the JS runtime default (e.g. 8/12) while wall-clock time used the host locale (e.g. 15:44).
numericDateFormatter and numericDateWithYearFormatter in timestampFormat.ts now pass timestampLocale (same resolved host locale as the time formatter) instead of undefined to Intl.DateTimeFormat. A regression test stubs the desktop bridge with en-GB and asserts formatDayAwareTimestamp renders 12/08 15:44.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Provider Metric Main baseline This PR Impact PR ceiling Codex Total thread wire 12.6 KiB 12.6 KiB +2 B (+0.0%) 15.1 KiB ✅ Codex Thread snapshot wire 6.3 KiB 6.3 KiB +2 B (+0.0%) 7.3 KiB ✅ Codex Live turn WebSocket wire 6.3 KiB 6.3 KiB 0 B (0.0%) 7.8 KiB ✅ Codex Live turn WebSocket decoded 51.8 KiB 51.8 KiB 0 B (0.0%) 66.4 KiB ✅ Codex Live turn messages 16 16 0 (0.0%) 21 ✅ Claude Total thread wire 12.6 KiB 12.6 KiB +2 B (+0.0%) 15.1 KiB ✅ Claude Thread snapshot wire 6.3 KiB 6.3 KiB −1 B (−0.0%) 7.3 KiB ✅ Claude Live turn WebSocket wire 6.3 KiB 6.3 KiB +3 B (+0.0%) 7.8 KiB ✅ Claude Live turn WebSocket decoded 52.7 KiB 52.7 KiB 0 B (0.0%) 66.4 KiB ✅ Claude Live turn messages 16 16 0 (0.0%) 21 ✅ Baseline:
ec141c1· PR result:d26f46e· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 99.9 KiB
- Claude decoded thread snapshot: 100.6 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Approvability#
Verdict: Approved d26f46e
Straightforward bug fix ensuring date formatters use the same
You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).timestampLocalealready used for time formatting, fixing a locale inconsistency. The change is minimal, self-contained, and includes a test.juliusmarminge merged this20a7042
juliusmarminge closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
6984b59f-0c6a-475c-8972-061a0db92054You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Comment `@coderabbitai help` to get the list of available commands.