Skip to content

Conversation

@ps2
Copy link
Collaborator

@ps2 ps2 commented Jan 10, 2022

No description provided.

nhamming and others added 30 commits October 5, 2021 09:56
* support syncing delivery limits

* response to PR comments
…delay (#466)

- https://tidepool.atlassian.net/browse/LOOP-3882
- Disable store to HealthKit on Watch or Status Extension for various stores
* LOOP-3830 PumpManager sync updates (#456) (#457)

* PumpManager protocol changes for syncing

* Remove debug prints

* LOOP-3856: Adds canceling of temp basal if user lowers max basal below temp basal (#460)

* ckpt

* LOOP-3856: Wire up an "EnactTempBasal" hook for TherapySettings to use

* PR Feedback: moved temp basal validation to LoopDataManager

* Adds unit tests to LoopDataManager for canceling temp basal

* Adds unit tests to LoopDataManager for checking loop is called when changing max basal

* fix tests

* Fix race condition causing intermittent unit test failures

* Sigh...looks like we were "waiting" on the wrong queue

* fix tests

* PR Feedback

* rename validateTempBasal -> validateMaxTempBasal to make it more clear

* Fix comment

* Rename ValidateMaxTempBasal -> MaxTempBasalSavePreflight

* Remove "indirection" in syncBasalRateSchedule and maxTempBasalSavePreflight

* Refactor stuff into new TherapySettingsViewModelDelegate

The number of function aliases in `TherapySettingsViewModel` was getting to be a mess. I consolidated `SaveCompletion`, `MaxTempBasalSavePreflight`, `SyncBasalRateSchedule`, and `SyncDeliveryLimits` all into a new `TherapySettingsViewModelDelegate`. Things got a bit cleaner, and now `DeviceDataManager` handles doing both the `maxTempBasalSavePreflight` and `syncDeliveryLimits` so it is not so loose of a contract.

* PR Feedback

Co-authored-by: Pete Schwamb <[email protected]>
…upportManager` (#467)

* async/await!

* Adds software update view and App Store version check service

* ckpt

* ckpt

* ckpt

* checkpoint: with alerts, kinda like it

* alert cadence every 2 weeks

* Add unit test for alert

* PR Feedback: move AppStoreVersionCheckService to TidepoolService

* Checkpoint: major rework of views into VersionCheckServiceUI

* LOOP-1114: Checkpoint: move VersionCheckServiceUI implementation to TidepoolService

* rename

* checkpoint: move all of the VersionCheck stuff into SupportUI

* restorestate

* Only add MockSupport iff `allowSimulators`

* Minor rearrangements

* Move/fix unit tests

* ckpt

* PR Feedback
* checkpoint

* LOOP-3871: Make all alerts/notifications "Time Sensitive"

Also fixes what appears to be a crash introduced into `StatusTableViewController` where there appears to be an extra call to `redrawCharts`.   I'm hoping it fixes the crash.

* We don't quite want this yet not until LOOP-3938
…e flag is off (#477)

* LOOP-3849: Remove reservoir tab in insulin delivery history if feature flag is off

* PR Feedback
- https://tidepool.atlassian.net/browse/LOOP-28
- Capture latest notification settings when app becomes active
- Update StoredSettings if latest notification settings have changed
- Updates to StoredSettings
…ated (#481)

* LOOP-3970: Fix one of the code paths where banner row needs to be updated

* Use passed-in `animated` flag instead of hard-coding to true
- https://tidepool.atlassian.net/browse/LOOP-26
- Make bolusUnits optional in AutomaticDoseRecommendation
- Unify DosingDecisionStore in LoopKit from Loop
- Remove unnecessary Codable support for various Errors
- Return StoredGlucoseSamples after adding via DeviceDataManager
- Update StoredDosingDecision properties
- Refactor how errors and warnings are captured in StoredDosingDecision
- Add more explicit LoopError cases
- Add LoopWarning
- Use explicit LoopError or PumpManagerError where possible
- Add reason for various dosing decisions
- Explicit creation of dosing decision when cancelling temp basal
- Update LoopDataManager.update to return error rather than throw
- Update LoopDataManager.updatePredictedGlucoseAndRecommendedDose to return error rather than throw
- Inject updatable dosing decision into LoopDataManager loop
- Capture all errors during LoopDataManager loop rather than just first
- Update tests
…er about Time Sensitive and Scheduled Delivery notification settings (#482)

* checkpoint

* LOOP-3871: Make all alerts/notifications "Time Sensitive"

Also fixes what appears to be a crash introduced into `StatusTableViewController` where there appears to be an extra call to `redrawCharts`.   I'm hoping it fixes the crash.

* ckpt

* ckpt

* Checkpoint: Moved ViewModel to the checker, for one source of truth

* Get rid of NotificaitonsCriticalAlertPermissionsViewModel and unify it with AlertPermissionsChecker
Change to agree with design a bit more

* Some tweaks

* whitespace and renaming

* Some small tweaks as I re-reviewed

* One more last-minute design change

* Updated copy from Figma.

* Do not start checking alert permissions status until after onboarding.

* PR Feedback
…t.isCritical` (#487)

* LOOP-3973: Introducing `interruptionLevel` as a replacement for `Alert.isCritical`

This introduces the notion of three Alert "interruption levels" similar to iOS's
UNNotificationInterruptionLevel (https://developer.apple.com/documentation/usernotifications/unnotificationinterruptionlevel)
as a replacement of the `isCritical` flag.

https://tidepool.atlassian.net/browse/LOOP-3973

* Revert change accidentally pushed (that would make iOS critical alerts show up while app is in foreground)

* LOOP-3974: Make Bluetooth Off a critical alert

* Remove `interruptionLevel` from CoreData altogether.

It used to be a "convenience" to have the `isCritical` boolean there, but because `interruptionLevel` is really part of `Alert.Content` (and is serialized in the `foregroundContent` and `backgroundContent` fields already), I think keeping this field is  at best confusing and at worst misleading.

* Hoists interruptionLevel into Alert

* Fix primitiveInterruptionLevel

* Adds unit test to insure confidence in `interruptionLevel` getter/setter

* PR Feedback
Becky found this in testing: the fundamental reason was a @published var was being modified multiple times and that issued more than one alert.  This fixes that by coalescing the update of that state all at once, and cleans up the alert issuing/retracting so it is a bit more obvious what's going on.
LOOP-3923 Only fetch most recent 24 hours of data for display
@ps2 ps2 merged commit a1e4f99 into dev Jan 10, 2022
@ps2 ps2 deleted the tidepool-merge branch January 10, 2022 21:30
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