Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): linked and guest thread timelines follow the Time format setting #48226

Openonly21mil(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/48226/headopened View on GitHub

Problem

When Settings → General → Display → Time format is set to 12-hour or 24-hour, linked and guest timelines still render browser locale timestamps instead of the chosen format. ReadOnlyThreadTimeline hardcoded timestampFormat="locale".

Change

Read timestampFormat from useClientSettings in apps/web/src/components/chat/ReadOnlyThreadTimeline.tsx and pass it to MessagesTimeline. Unconfigured guest browsers keep "locale" via DEFAULT_CLIENT_SETTINGS.timestampFormat. Added a GuestPage browser test for 24-hour and 12-hour updates.

Scope

Small bug fix for wrong timestamps in read-only timelines (LinkedThreadPane, GuestPage). No prior issue is needed for an obvious four-line fix.

Verification

  1. On Linux, set Settings → General → Display → Time format to 24-hour.
  2. Open a linked thread (or guest share) with a completed message.
  3. Hover the message: 450925de8a67 shows 10:32 AM; 26207883ea72 shows 10:10.

Setup: Ubuntu Linux, T3 Browser Chromium, dark theme, 1280×800 viewport, fresh isolated data on each commit.

Steps: Start app on isolated state → set Time format to 24-hour → open linked thread → hover message.

450925de8a6726207883ea72
Shows 10:32 AM with 24-hour Time format
Shows 10:32 AM with 24-hour Time format
Shows 10:10 matching 24-hour Time format
Shows 10:10 matching 24-hour Time format

Links: 450925de8a67 · 26207883ea72 · apps/web/src/components/guest/GuestPage.browser.test.tsx

Not shown:

  • Live Guest share over T3 Connect relay (requires a relay; covered by GuestPage.browser.test.tsx).
  • macOS, Windows, and mobile (ReadOnlyThreadTimeline is web-only).
Test and check outputs

Tested by: AI agent

Fail-first regression test on base (450925de8a67):

 ❯ |@t3tools/web (browser) (chromium)| src/components/guest/GuestPage.browser.test.tsx (5 tests | 1 failed) 16203ms
   ❯ GuestPage (5)
     ✓ shows the shared thread in the real timeline without opening an environment connection 287ms
     ✓ sends attached files with the message, as form data 158ms
     ✓ does not send when Shift is released while Enter is held, but a fresh Enter does 71ms
     ✓ follows the end as replies stream, and shows the guest's own message even after they scrolled up 674ms
     × formats timeline timestamps with the Time format setting 15012ms

 FAIL  |@t3tools/web (browser) (chromium)| src/components/guest/GuestPage.browser.test.tsx > GuestPage > formats timeline timestamps with the Time format setting
Error: expect.poll() function didn't resolve in time.
 ❯ src/components/guest/GuestPage.browser.test.tsx:466:8
  toBeVisible  locator('div').nth(1).getByText('Afternoon check')   +32ms       0ms  apps/web/src/components/guest/GuestPage.browser.test.tsx:463:18
  toBeVisible  locator('div').nth(1).getByText('10/23/2025 15:05')  +33ms   14884ms  apps/web/src/components/guest/GuestPage.browser.test.tsx:465:8

 Test Files  1 failed (1)
      Tests  1 failed | 4 passed (5)

Passing regression test on 26207883ea72 (3/3 consecutive runs passed; run 1 shown):

 ✓ |@t3tools/web (browser) (chromium)| src/components/guest/GuestPage.browser.test.tsx (5 tests) 1255ms
   ✓ GuestPage (5)
     ✓ follows the end as replies stream, and shows the guest's own message even after they scrolled up 690ms

 Test Files  1 passed (1)
      Tests  5 passed (5)
   Duration  5.60s

vp run check:changed 450925de8a674dec21afdf94b9e661ca116b7932 on 26207883ea72:

check:changed summary
  pass  format  0.2s
  pass  lint  0.5s
  pass  knip  15.1s
  pass  typecheck (2 packages)  3.8s
  pass  test (1 files)  6.9s
  pass  react compiler (1 files)  0.7s
  CI also runs: full test suites, build
  unused patch check skipped: no dependency files changed

Generated with Gemini 4 Neon in T3 Code Nightly

    1. tanstack-source added labelsbug

    2. Approvability

      Verdict: Approved at 2620788

      Macroscope's review found this PR approvable — Linked and guest thread timelines now honor the existing Time format preference. The default remains locale-based, and the change is confined to timestamp presentation.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. Explain Change →

      No actionable comments were generated in the recent review.

      Walkthrough

      Read-only thread timelines now use the configured timestamp format. A browser test verifies the timeline display updates when the setting changes between 24-hour and 12-hour formats.

      Changes: Timeline timestamp format

      Layer / File(s)Summary
      Apply and verify the timestamp setting
      apps/web/src/components/chat/ReadOnlyThreadTimeline.tsx, apps/web/src/components/guest/GuestPage.browser.test.tsx
      ReadOnlyThreadTimeline passes the configured timestamp format to MessagesTimeline. A browser test checks the display after changing the setting between 24-hour and 12-hour formats.

      Estimated code review effort: 2 (Simple) | ~8 minutes

      Change: Bug fix

      Possibly related issues

      • pingdotgg/t3code#45402: This change uses the configured timestamp format in a web timeline, but it does not change the iOS or mobile code path described in the issue.

      Suggested reviewers: saphid

      Merge Risk: Minimal · up to 26207

      Linked and guest thread timelines now follow the selected Time format setting, and browsers with no setting keep the locale format. No merge-blocking risk was found.

      Pre-merge checks: Passed 4

      Check nameStatusExplanation
      Title checkPassedThe title names the main change: linked and guest thread timelines now honor the Time format setting. The raw summary shows ReadOnlyThreadTimeline reading timestampFormat from client settings and the …
      Description checkPassedThe description follows the repository template closely. It has Problem, Change, Scope, and Verification sections. The Problem section states the expected behavior and the bug. The Change section expl…
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Title check

      Explanation

      The title names the main change: linked and guest thread timelines now honor the Time format setting. The raw summary shows ReadOnlyThreadTimeline reading timestampFormat from client settings and the guest browser test covering 12-hour and 24-hour display, so the title matches the changeset. It follows the conventional commit style used in the template. It is a fix, and the description and objectives describe it as a bug fix.

      Full details: Description check

      Explanation

      The description follows the repository template closely. It has Problem, Change, Scope, and Verification sections. The Problem section states the expected behavior and the bug. The Change section explains the fix in ReadOnlyThreadTimeline.tsx and the GuestPage browser test. The Scope section explains why no issue is linked. Verification gives reproduction steps, before and after evidence, and test output, and it lists what was not checked (live relay, macOS, Windows, mobile). It also names the agent and model in the footer. The description is complete, so this check passes.

      Finishing Touches

      Generate unit tests (beta)

      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
      Recent review info

      Run configuration

      Commits

      Reviewing files that changed from the base of the PR and between c89933c0f53a5867369b77491889a166ba659ada and 26207883ea72b3b13aeb25db2ac6ed5ea6863532.

      Files selected for processing: 2

      • apps/web/src/components/chat/ReadOnlyThreadTimeline.tsx
      • apps/web/src/components/guest/GuestPage.browser.test.tsx

      Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Sign in to join this conversation.