Skip to content

Display one-button boluses; fix negative duration bug (UPLOAD-1474, UPLOAD-300) - #1767

Open
gniezen wants to merge 6 commits into
developfrom
one-button-bolus
Open

Display one-button boluses; fix negative duration bug (UPLOAD-1474, UPLOAD-300)#1767
gniezen wants to merge 6 commits into
developfrom
one-button-bolus

Conversation

@gniezen

@gniezen gniezen commented Aug 10, 2026

Copy link
Copy Markdown
Member

Addresses UPLOAD-1474 and UPLOAD-300..

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added one-button delivery context to Easy Bolus records from supported Medtronic devices.
  • Bug Fixes

    • Improved handling of pump suspend/resume events when device clocks reset or records arrive out of order.
    • Prevented invalid timing data from stopping uploads; affected resumes are recorded as incomplete.
    • Preserved device data on errors without exposing it in diagnostics or serialized error details.
  • Tests

    • Added coverage for one-button boluses, clock corrections, incomplete suspensions, and error-data handling.

Walkthrough

The change preserves device data on errors, adds Medtronic Easy Bolus parsing, handles RTC-reset and invalid suspend/resume records, updates package versions, and advances the Tandem submodule reference.

Changes

Bolus and error updates

Layer / File(s) Summary
Preserve device data on errors
app/utils/errors.js, test/app/utils/errors.test.js
addInfoToError stores device data as non-enumerable error metadata. Tests verify property access, serialization behavior, and debug output.
Handle Medtronic history edge cases
lib/drivers/medtronic600/NGPHistoryParser.js, test/lib/medtronic600/testNGPHistoryParser.js
Easy Bolus records receive deliveryContext: 'oneButton'. Suspend/resume parsing uses timestamp fallbacks and marks invalid negative durations as unresolved.
Update release metadata and Tandem revision
package.json, app/package.json, lib/drivers/tandem
Both package manifests use version 2.67.0-one-button-bolus.1. The Tandem submodule points to a newer commit.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the two main changes: displaying one-button boluses and fixing negative duration handling.
Description check ✅ Passed The description identifies the issues addressed by the pull request and is related to the changeset.
✨ Finishing Touches 💡 2
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch one-button-bolus
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch one-button-bolus

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@lib/drivers/tandem`:
- Line 1: Update the gitlink for the lib/drivers/tandem submodule to a commit
that exists in git@github.com:tidepool-org/tandem-driver.git, replacing the
unreachable pin 04a160513257b0f216d51914f4f01801d67252bf. Preserve the submodule
path and ensure fetch and checkout resolve successfully.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8a753798-eedd-480c-ae6a-ec3d3a09578c

📥 Commits

Reviewing files that changed from the base of the PR and between 565b726 and 9785faf.

📒 Files selected for processing (7)
  • app/package.json
  • app/utils/errors.js
  • lib/drivers/medtronic600/NGPHistoryParser.js
  • lib/drivers/tandem
  • package.json
  • test/app/utils/errors.test.js
  • test/lib/medtronic600/testNGPHistoryParser.js

Comment thread lib/drivers/tandem
@gniezen gniezen changed the title Display one-button boluses (UPLOAD-1474) Display one-button boluses; fix negative duration bug (UPLOAD-1474, UPLOAD-300) Aug 10, 2026
@gniezen
gniezen requested a review from krystophv August 10, 2026 10:08
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.

2 participants