Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep timestamp date and time in the same locale #7081

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/7081/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

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

Macroscope summarized d26f46e.

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.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit d26f46edbddabd9ffbbe11766aaf256e92440a53. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 6984b59f-0c6a-475c-8972-061a0db92054

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire12.6 KiB12.6 KiB+2 B (+0.0%)15.1 KiB✅
      CodexThread snapshot wire6.3 KiB6.3 KiB+2 B (+0.0%)7.3 KiB✅
      CodexLive turn WebSocket wire6.3 KiB6.3 KiB0 B (0.0%)7.8 KiB✅
      CodexLive turn WebSocket decoded51.8 KiB51.8 KiB0 B (0.0%)66.4 KiB✅
      CodexLive turn messages16160 (0.0%)21✅
      ClaudeTotal thread wire12.6 KiB12.6 KiB+2 B (+0.0%)15.1 KiB✅
      ClaudeThread snapshot wire6.3 KiB6.3 KiB−1 B (−0.0%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.3 KiB6.3 KiB+3 B (+0.0%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded52.7 KiB52.7 KiB0 B (0.0%)66.4 KiB✅
      ClaudeLive turn messages16160 (0.0%)21✅

      Baseline: ec141c1 · PR result: d26f46e · Source CI: success

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

    4. Approvability

      Verdict: Approved d26f46e

      Straightforward bug fix ensuring date formatters use the same timestampLocale already used for time formatting, fixing a locale inconsistency. The change is minimal, self-contained, and includes a test.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. juliusmarminge merged this20a7042

    6. juliusmarminge closed this

Sign in to join this conversation.