Deduplicate Nightscout treatment entries#569
Merged
marionbarker merged 2 commits intodevfrom May 3, 2026
Merged
Conversation
Nightscout can return duplicate treatment entries with the same "id" (Trio/Loop UUID) but different "_id" (MongoDB ObjectId), causing duplicate boluses, carbs, etc. on the graph. Filter duplicates at the top of updateTreatments before classification.
bjorkert
added a commit
that referenced
this pull request
Apr 27, 2026
Collaborator
TestSplit decision
Delete LoopFollow from phone |
marionbarker
approved these changes
May 3, 2026
Collaborator
marionbarker
left a comment
There was a problem hiding this comment.
approve by code review and test build
MtlPhil
pushed a commit
to achkars-org/LoopFollow
that referenced
this pull request
May 6, 2026
Brings in all changes from loopandlearn/LoopFollow dev up to 6.1.0. Resolved conflicts by taking upstream throughout, except LogManager where both the watch and telemetry log categories are kept. Key changes from upstream: - Add iOS 17.2+ push-to-start for Live Activity renewal (loopandlearn#622) - Fix LA restart classification, foreground race, troubleshooting logs (loopandlearn#615) - Redact secrets from log output (loopandlearn#623) - Add anonymous telemetry (loopandlearn#626) - Add units selection (loopandlearn#558) - Fix stats inclusive date range (loopandlearn#629) - Deduplicate Nightscout treatment entries by id (loopandlearn#569) - Fix alarm sound session activation failures in background (loopandlearn#596) - Recognize Atlas DASH pod in Omnipod heartbeat scan (loopandlearn#633) - Default migrationStep to latest on fresh installs (loopandlearn#631) - Update to fastlane 2.233.1 (loopandlearn#632) https://claude.ai/code/session_01VK2furpEaEmysQvEd1h77f
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
id(Trio/Loop UUID) but different_id(MongoDB ObjectId), causing duplicate boluses, carbs, etc. to appear on the graph.idat the top ofupdateTreatments(entries:)before classification, so all treatment types benefit. Entries without anidfield are kept as-is.