rowboat/apps/x
Harshvardhan Vatsa 15d484980d
fix(x): show chat timestamps in the user's local timezone (#779)
* fix(x): show chat timestamps in the user's local timezone

The per-message "Current date and time" context was built with toISOString(), giving the model a UTC time frame with no zone. It then quoted email Date: headers (sent in +0000) in UTC — an email shown as 1:06 PM IST in the inbox was described as 7:36 AM in chat.

Use local wall-clock via toLocaleString with an explicit timeZoneName and the IANA zone (matching what the legacy engine already did) so the model converts offset-bearing timestamps to local time.

* fix(x): convert email timestamps to local time for the assistant

The "now" fix gave the model a local time frame, but email dates still reached it as raw RFC 2822 Date: headers (marketing mail is sent in +0000), so it kept quoting them in UTC — a 1:06 PM IST email described as 7:36 AM in chat.

Add formatEmailDateLocal() and apply it at the three model-facing serialization points: the read-view email tool, the thread-summary line, and the gmail-sync knowledge markdown (**Date:**). The structured date field on snapshots/messages is left raw, since the renderer parses it with new Date() and formats it client-side.

* fix(x): generalize local-time formatting for model-facing timestamps

Move formatEmailDateLocal out of sync_gmail into a shared
formatTimestampForModel() util — email is just the first source of
external timestamps; Slack/calendar serialization can now reuse the
same one-line call instead of growing per-source formatters. Also add
a system-prompt instruction to always express times in the user's
local timezone, as a fallback for raw dates inside email bodies, web
content, and third-party tool output that pre-conversion can't reach.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 16:26:04 +05:30
..
.pnpm-store/v11 add talking mascot 2026-07-02 22:20:11 +05:30
apps fix(x): show chat timestamps in the user's local timezone (#779) 2026-07-24 16:26:04 +05:30
docs feat(apps): M3 UI — catalog, D18 install dialog, publish dialog, detail actions 2026-07-06 15:34:54 +05:30
packages fix(x): show chat timestamps in the user's local timezone (#779) 2026-07-24 16:26:04 +05:30
.gitignore feat(x): reference-based model requests + wire-form composer 2026-07-02 14:20:44 +05:30
ANALYTICS.md Merge pull request #786 from rowboatlabs/feat/chat-auto-titles 2026-07-24 00:13:30 +05:30
CODE_MODE_ENGINES_PLAN.md Code mode: make packaged builds work via managed engine provisioning (#625) 2026-06-17 21:53:15 +05:30
demo.gif add gif 2026-07-10 10:04:37 +05:30
eslint.config.mts ignore renderer eslint 2026-01-16 12:05:33 +05:30
GRANOLA_PARITY.md feat(x): resident app — launch at login + menu bar tray (Granola parity phase 1) 2026-07-13 21:02:20 +05:30
LIVE_NOTE.md docs(x): design docs and prompt catalogs follow the runtime/ move 2026-07-10 16:30:26 +05:30
MINI_APPS_PLAN.md feat(mini-apps): copilot builder — build-mini-app skill + install/data tools 2026-07-01 01:25:45 +05:30
package.json ci(x): typecheck test files — the gap vitest and the build tsconfigs both miss 2026-07-10 16:30:26 +05:30
pnpm-lock.yaml feat(x): client auto-update with restart card and inline release notes (#744) 2026-07-16 17:59:03 +05:30
pnpm-workspace.yaml build(x): graft vscode-jsonrpc onto langium via packageExtensions 2026-07-07 02:45:09 +05:30
tsconfig.base.json bootstrap new electron app 2026-01-16 12:05:33 +05:30
VIDEO_MODE.md docs(x): fix pointers the reorg docs pass got wrong or missed 2026-07-10 17:57:03 +05:30