Skip to content

[WEB-4585, 4577, 4578] - Carb Modifications + Device Names + Deduplicate Healthkit#87

Open
henry-tp wants to merge 4 commits into
masterfrom
WEB-4578-carb-modifications
Open

[WEB-4585, 4577, 4578] - Carb Modifications + Device Names + Deduplicate Healthkit#87
henry-tp wants to merge 4 commits into
masterfrom
WEB-4578-carb-modifications

Conversation

@henry-tp

@henry-tp henry-tp commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

@henry-tp henry-tp changed the title Web 4578 carb modifications [WEB-4585, 4577, 4578] - Carb Modifications + Device Names + Dedup Jun 13, 2026
Comment thread lib/report.mjs
stats: this.getStatsByChartType('basics', data),
excludeDaysWithoutBolus: false,
bgPrefs: this.getBGPrefs(),
metaData: 'latestPumpUpload, bgSources',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@henry-tp henry-tp changed the title [WEB-4585, 4577, 4578] - Carb Modifications + Device Names + Dedup [WEB-4585, 4577, 4578] - Carb Modifications + Device Names + Deduplicate Healthkit + twiist Jun 13, 2026
@henry-tp henry-tp changed the title [WEB-4585, 4577, 4578] - Carb Modifications + Device Names + Deduplicate Healthkit + twiist [WEB-4585, 4577, 4578] - Carb Modifications + Device Names + Deduplicate Healthkit Jun 13, 2026
@henry-tp henry-tp requested a review from krystophv June 13, 2026 23:04
@krystophv krystophv requested a review from Copilot June 13, 2026 23:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the export/report generation pipeline to support newer Tidepool Viz report behavior (carb modifications, device name metadata, and HealthKit deduplication) by upgrading @tidepool/viz and requesting additional metadata in report queries.

Changes:

  • Bump @tidepool/viz from 1.53.0-rc.1 to 1.56.0 (and update yarn.lock accordingly).
  • Request additional DataUtil metadata (devices, matchedDevices) in all report query definitions.
  • Update report query expectations in test/report.test.js to match the new metadata request.

Reviewed changes

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

File Description
package.json Upgrades @tidepool/viz dependency to 1.56.0.
yarn.lock Locks the upgraded @tidepool/viz@1.56.0 resolution and checksum.
lib/report.mjs Expands metaData requested by report queries to include devices and matchedDevices.
test/report.test.js Updates expected report query objects to include the expanded metaData string.

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

Comment thread lib/report.mjs
metaData: 'latestPumpUpload, bgSources',
metaData: 'latestPumpUpload, bgSources, devices, matchedDevices',
timePrefs: this.getTimePrefs(),
excludedDevices: [],

@henry-tp henry-tp Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We need to allow Viz to run the code that detects and sets the excludedDevices by not forcing through this argument of [].

However, Viz will usually just use its fallback arg of []

@krystophv

Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 81d33fca-5de1-442e-b59e-b946b442f1c5

📥 Commits

Reviewing files that changed from the base of the PR and between c94c243 and e06082b.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • lib/report.mjs
  • package.json
  • test/report.test.js

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved report generation so device information is included more reliably across several report views.
    • Fixed report query behavior to better support device alignment and matching in generated reports.
  • Chores
    • Updated a reporting-related library to the latest release.

Walkthrough

In lib/report.mjs, the buildReportQueries method now requests devices, matchedDevices in metaData (previously only latestPumpUpload, bgSources) and removes excludedDevices: [] from query objects for all six report types. Tests are updated to match. @tidepool/viz is bumped from 1.53.0-rc.1 to 1.56.0.

Changes

Report Query metaData Expansion

Layer / File(s) Summary
buildReportQueries and test updates
lib/report.mjs, test/report.test.js, package.json
metaData expanded to include devices, matchedDevices and excludedDevices: [] removed for basics, bgLog, daily, agpBGM, agpCGM, and settings queries; tests updated to match; @tidepool/viz bumped to 1.56.0.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific and partially matches the device-related query changes, though some listed items are not reflected in the diff.
Description check ✅ Passed The description is related because it links the pull request to the Jira issues for this change.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch WEB-4578-carb-modifications

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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

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