Tidepool sync 2026-05-11#33
Closed
loopkitdev wants to merge 34 commits into
Closed
Conversation
…t-store LOOP-4735 CGM Event Store
…t-store LOOP-4735 CGM Event Store
…m-package LOOP-4781 Types moved to LoopAlgorithm
…m-package LOOP-4781 Types moved to LoopAlgorithm
…cheduled-presets LOOP-5235 Changes for protocol updates
…cheduled-presets LOOP-5235 Changes for protocol updates
Resolved 2 pbxproj region(s) per LOOPKIT_SYNC_PROCESS.md: - Preserved DIY LOCALIZATION_PREFERS_STRING_CATALOGS = YES (Debug/Release)
Closed
The Nightscout Remote CGM plugin only reads glucose, so a site that is open for reading needs no API Secret. Authorize and persist with just a URL, sending the api-secret header only when a secret is provided.
The verify path was silent on failure. Log the URL being checked and the outcome (success with entry count, empty glucose, or the underlying error) under subsystem com.loopkit.NightscoutRemoteCGM.
Avoids the contradictory 'Required' placeholder on the now-optional field.
The timer-driven fetch was silent. Log each actual fetch and its outcome (entry/new-sample counts, no entries, or error) so polling is visible.
LoopAlgorithm's filterDateRange now uses a binary search that assumes the array is sorted ascending by date. Nightscout returns entries newest-first, so unsorted input produced erratic results (usually 0 new samples, sometimes the whole batch). Sort ascending before filtering. Also fix latestBackfill, which used an inverted comparator and selected the oldest sample instead of the newest, defeating the fetch throttle and the glucose display. Also log the cutoff and newest-entry dates to aid diagnosis.
marionbarker
requested changes
May 29, 2026
marionbarker
left a comment
There was a problem hiding this comment.
This PR is approved by testing it as part of the LoopKit/LoopWorkspace#450.
When building with Xcode 26.5 on a Mac, the following files are updated. I can provide a PR or you can just commit the xcstrings changes after building.
modified: NightscoutRemoteCGM/Localizable.xcstrings
The changes were small enough that I did a code review.
I noticed the IPHONEOS_DEPLOYMENT_TARGET is set to 17.6. At this point does it make sense to push to iOS 18. All phones that can go to 17 can also go to 18. That simplify future updates if we can use features found with iOS 18. I'm only going to make that comment one time in this PR but of course it pertains to all the LoopWorkspace PR 450 submodules.
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.
Refreshed Tidepool → DIY sync from the
tidepool-sync/2026-05-11branch.This supersedes and replaces the previous Tidepool Merge PR (#22), which is being closed in favor of this one.