Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GFN3dijQKqrMz7KjBt8GKn
An indoor run, or one with no weather reading, has no zone, and the feed card, the entry detail and its report label read it in UTC: a Chicago runner's 5:55 PM indoor run read "Yesterday · 11:55 PM" ten minutes on. They now fall back to the author's saved-place zone, then UTC (owner, 2026-11-20, #925), through one rule, runZoneOf, which runDayOf shares. The feed-e1 conformance seeds its runner a zone far from midnight, so it no longer fails just after midnight UTC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GFN3dijQKqrMz7KjBt8GKn
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A run with no zone of its own (an indoor run, or one with no weather reading) now reads its day and clock in its runner's saved-place zone, and in UTC only when the runner has saved no place either (owner, 2026-11-20, #925; design 257).
Until now three surfaces read such a run in UTC:
So a Chicago runner's 5:55 PM indoor run read "Yesterday · 11:55 PM" ten minutes later. The profiles, the public kit page and the band runs already fell back to the runner's zone through
runDayOf. Now one rule,runZoneOfinlib/dates.ts, serves all of them.The feed-e1 conformance spec failed just after midnight UTC for the same reason: its runs had no zone, so they read in UTC. It now seeds its runner a saved zone where "now" is at least six hours from midnight. The snapshot is unchanged.
Closes #925
Changes
src/lib/dates.ts:runZoneOf(observed, runnerZone): the observed zone, else the runner's, else none (UTC). Each is checked withisTimeZone.src/modules/feed/following/feed.tsandfeed/entries/entries.ts: the author read also selectsuser_profiles.time_zone.EntryRunFields, which the card and the detail share, gainsrunnerZone.PostCard,EntryDetailandroutes/feed/entry.$entryId.tsx's report label read inrunZoneOf(conditions?.timeZone, runnerZone).feed/public-web/public-kit.ts:runDayOfusesrunZoneOfinstead of its own??chain.e2e/conformance/feed-e1andfeed-support.ts:seedRunnertakes an optional saved zone.The fallback is always the runner's zone, never the viewer's: a run happened where its runner is.
Tests
test/lib/dates.test.ts:runZoneOfprefers the observed zone, falls back to the runner's, skips an invalid zone on either side, and returns none when neither is known.test/feed/runner-zone.test.ts(worker, new): the feed card and the entry detail carry the author's saved zone, not the viewer's, and none when the author saved no place.test/modules/post-card.dom.test.tsx: a run 13 hours back reads13h agoin Tokyo, andYesterday · 11:00 PMwith no zone.test/modules/entry-detail.dom.test.tsx: the run line reads in the runner's zone, and the observed zone wins over it.Demo
The attached video opens the entry detail of a Chicago runner's indoor run, started at 23:55 UTC. Its run line reads
WED NOV 18 · 5:55 PM, in the runner's zone, where it read 11:55 PM before.Deferred
None. The D-row is the coordinator's, at the docs pass.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GFN3dijQKqrMz7KjBt8GKn
zone-demo.mp4