Skip to content

Allow starting a preset while another is active - #2709

Open
damonbayer wants to merge 4 commits into
LoopKit:next-devfrom
damonbayer:dmb/improve-preset-activation
Open

damonbayer wants to merge 4 commits into
LoopKit:next-devfrom
damonbayer:dmb/improve-preset-activation

Conversation

@damonbayer

@damonbayer damonbayer commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Starting another preset currently leaves Start Preset disabled without explaining why. Allow the selected preset to replace the running preset directly, keeping the button label unchanged.

Show an inline notice with the running preset's name and end condition, followed by an explanation such as “Starting Biking will end Walking.” Reuse NoticeView, provide the same explanation as the button's VoiceOver hint, and share one eligibility check between the button state and action. Pre-Meal remains unavailable when Closed Loop is off, with an inline explanation.

01-start-preset

Validation:

  • Signed iOS Simulator workspace build with Xcode 27.2.
  • Manually verified the replacement notice and accessibility hint, direct replacement, ordinary activation when no preset is running, and the active preset's End controls.
  • git diff --check passes.

@damonbayer

Copy link
Copy Markdown
Contributor Author

Pre-Meal remains unavailable when Closed Loop is off, with an inline explanation.

@ps2 I would be okay removing this. I don't see why you couldn't use the pre-meal automation with automation off?

@damonbayer
damonbayer requested a review from ps2 December 1, 2026 20:29
damonbayer and others added 2 commits December 1, 2026 14:32
Co-authored-by: Damon Bayer <damonmbayer@gmail.com>
@ps2

ps2 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Tested in the iOS 27 Simulator (iPhone 17 Pro) with a full LoopWorkspace build of next-dev (LoopWorkspace 8885534) plus LoopKit/LoopKit#713, #2712, #2709, loopandlearn/OmnipodKit#234 and LoopKit/MedtrumKit#14, using the CGM and pump simulators.

All of these work:

  • Replacement notice: with Walking active, opening Jogging shows "Walking is active until 5:53 PM." and "Starting Jogging will end Walking.".
  • Start Preset: it's enabled, and tapping it replaced Walking with Jogging, which ran on its own 90 minutes, until 5:54 PM.

One small thing: the nil end-time case in activePresetStatus reads "… is active" with no period, unlike the other cases.

I didn't check the Pre-Meal case with Closed Loop off.

Replacement notice

@damonbayer

Copy link
Copy Markdown
Contributor Author

One small thing: the nil end-time case in activePresetStatus reads "… is active" with no period, unlike the other cases.

addressed in b9cd7b6 (this PR)

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