Repository navigation
Pull to refresh pulls WHOOP and Strava too - #56
Conversation
Published from the private repository by oss-sync. - Pull to refresh pulls WHOOP and Strava too 7 files changed, 157 insertions(+), 6 deletions(-)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52a23710c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const c = cache as { configured?: boolean; fetchedAt?: string | null } | null | ||
| if (c?.configured !== true) return false | ||
| const at = c.fetchedAt ? Date.parse(c.fetchedAt) : NaN | ||
| return !(now - at < FRESH_MS) |
There was a problem hiding this comment.
Treat future cache timestamps as stale
When the server clock is ahead of the phone—such as after a clock correction or restoring a future-dated cache—now - at is negative and therefore always less than FRESH_MS. Pull-to-refresh consequently skips that integration until the timestamp catches up, potentially leaving newly synced WHOOP or Strava data absent for a long time. Only consider the cache fresh when its age is both nonnegative and below the threshold.
Useful? React with 👍 / 👎.
Published from the private repository by oss-sync.
7 files changed, 157 insertions(+), 6 deletions(-)