Skip to content

Watch: follow a sensor or code change from the phone in place - #2698

Draft
jeremybarnum wants to merge 2 commits into
LoopKit:next-devfrom
jeremybarnum:sportmode/sensor-change-in-place
Draft

jeremybarnum wants to merge 2 commits into
LoopKit:next-devfrom
jeremybarnum:sportmode/sensor-change-in-place

Conversation

@jeremybarnum

Copy link
Copy Markdown

Needs LoopKit/LoopKit#706 and LoopKit/G7SensorKit#128

When the phone's export names a different sensor or code, WatchCGMHost passes it to the manager it has (adoptConfiguration(_:)) instead of building a second one. It builds a manager only when it has none or the phone moved to a different kind of CGM. The watch loads only a CGM in ShareableDeviceControl, and the phone shares its CGM with the watch only when its manager is in that protocol.

Three files, on today's next-dev; independent of the Sport Mode PRs.

Testing: phone unit tests pass (439) and the watch app builds. The same change, with the Sport Mode PRs, passes the watch unit tests (292).

🤖 Generated with Claude Code

When the phone's export names a different sensor or code, the watch passes it to the CGM manager
it has instead of building a second one. A second G7 manager built while the first held the
Bluetooth restore identifier was left with an unusable central until Loop was relaunched on the
watch.

The watch loads only a CGM in ShareableDeviceControl, and builds a manager only when it has none or
the phone moved to a different kind of CGM. The phone shares its CGM with the watch only when its
manager is in the same protocol.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeremybarnum
jeremybarnum marked this pull request as draft November 26, 2026 14:35
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jeremybarnum pushed a commit to jeremybarnum/Loop that referenced this pull request Nov 28, 2026
…ame the same protocol

LoopKit#2698 has the phone share its CGM with the watch only when the manager is ShareableDeviceControl;
LoopKit#2545's "does the watch read the sensor" check still asked for DeviceConfigurationSharing. Both
now ask for ShareableDeviceControl, as on the production line. The G7 manager is in both, so
nothing changes in use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant