Skip to content

Conversation

@henry-tp
Copy link
Contributor

@henry-tp henry-tp commented Jan 26, 2026

@henry-tp henry-tp changed the title WEB-4330 add tolerance of 15 minutes to account for clock drift [WEB-4330] - Missing Pump Settings in PDF Jan 26, 2026
@henry-tp henry-tp marked this pull request as ready for review January 26, 2026 22:57
} else {
// Clock drift on user's device may cause pumpSettings datum to have LATER timestamp than upload
// datum. The maximum time devation that Uploader allows between user device and tidepool server
// time is 15 minutes, so we search 15 minutes into the future for the pumpSettings datum
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please examine this comment for interpretable-ness .. I struggled to phrase this in a summarized but still comprehensible way

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henry-tp I'm fine with the comment content. Copilot did point out a typo that could be fixed, but I don't have any strong opinion about the phrasing.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts pumpSettings selection for the “latest pump upload” to tolerate small clock drift, preventing missing pump settings in generated PDFs.

Changes:

  • Allow selecting pumpSettings up to 15 minutes after latestPumpUpload.time for non-continuous uploads.
  • Update/add unit tests to cover the >15 minute exclusion and <=15 minute inclusion behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/utils/DataUtil.js Relaxes pumpSettings timestamp filtering by adding a 15-minute tolerance window.
test/utils/DataUtil.test.js Updates and adds tests validating pumpSettings selection with the new tolerance logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

henry-tp and others added 5 commits January 28, 2026 10:17
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member

@krystophv krystophv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎸

@henry-tp henry-tp merged commit cf114bb into develop Jan 28, 2026
4 checks passed
@henry-tp henry-tp deleted the WEB-4330-missing-settings branch January 28, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants