Backport: eager connect watchdog for InPlay/iPhone-16 wedges - #141
Draft
ps2 wants to merge 1 commit into
Draft
Conversation
Backport of #133 from next-dev, squashed. Mitigates BLE connection wedges on InPlay-firmware DASH pods paired with an iPhone 16 (any variant) or 17e: a connect that stalls with no callback is torn down and retried rather than left to time out, and the pod settings view gains a persistent notice explaining the slower connections. Also carries the later fixes from that branch: the O5 fresh-advert connect, which cut foreground connects on Omnipod 5 from about six seconds to under one; the foreground-state seed, so a pump manager built after the app has already become active does not idle-disconnect between commands; and the test-beeps button no longer gating on hasConnection. Two conflicts against this line, both because dev predates the Pod Keep Alive rework (#125). Resolved by keeping dev's accessor and taking the eager-connect logic: - shouldHoldConnection keeps podType.isDash && Storage.shared.podKeepAlive.value.keepsPodConnectedInBackground rather than podKeepAliveKeepsConnectedInBackground - the pairing auto-enable keeps Storage.shared.podKeepAlive.value while adopting the consolidated UIDevice.hasPossibleInPlayBLEIssues Does not build against LoopWorkspace/dev as it stands, for reasons that predate this change -- see the pull request.
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.
Backport of #133 to the
devline, squashed to a single commit.What it brings
Mitigation for BLE connection wedges on InPlay-firmware DASH pods paired with an iPhone 16 (any variant) or 17e: a connect that stalls with no callback is torn down and retried rather than left to time out, plus a persistent notice in pod settings explaining the slower connections and a detail screen behind it.
It also carries the later fixes from that branch:
didBecomeActive, soisAppForegroundstayed false and the link was idle-disconnected ~4s after each command while the user was on screen.hasConnection.Conflicts
Two, both because
devpredates the Pod Keep Alive rework (#125). Resolved by keeping dev's accessor and taking the eager-connect logic:shouldHoldConnectionpodType.isDash && Storage.shared.podKeepAlive.value.keepsPodConnectedInBackgroundrather thanpodKeepAliveKeepsConnectedInBackground, with the eager-pod hold line added above itStorage.shared.podKeepAlive.valuewhile adopting the consolidatedUIDevice.hasPossibleInPlayBLEIssuesThe now-redundant
OmniPumpManager.iPhoneWithPossibleInPlayIssuesis removed by the backport, as it was upstream; no stale references remain.This does not build against LoopWorkspace/dev, and that is not new
Worth stating plainly before anyone merges expecting a working dev build.
OmnipodKit/devalready requiresPumpHeartbeatRequest, a LoopKit type that the LoopKit pinned byLoopWorkspace/devdoes not define:Those references arrived with
a715d9a("Connect-on-demand connectivity for DASH and O5, CGM aligned heartbeat, connectionless fault detection") and are present atccd4438before this backport — I verified08c4efe, the commitLoopWorkspace/devactually pins, has none of them, while the branch tip has three.So the dev line has moved 43 commits past what the workspace pins, and picked up a LoopKit dependency along the way. Making
LoopWorkspace/devbuild needs its LoopKit bumped to a version definingPumpHeartbeatRequest, independently of this change.This backport applies cleanly on top of that situation and keeps the eager-connect work from diverging further, but it does not resolve it.
Verification
Cherry-picked cleanly apart from the two conflicts above; the resolutions were reviewed line by line. Not built end to end, because the dev workspace cannot currently build OmnipodKit
devat all for the reason above — the three errors seen are exactly the pre-existing ones, with none originating in this change.