Skip to content

Quick-Pick Boluses and Meals for remote commands#603

Merged
marionbarker merged 4 commits into
devfrom
feature/quick-pick-remote-commands
Jun 14, 2026
Merged

Quick-Pick Boluses and Meals for remote commands#603
marionbarker merged 4 commits into
devfrom
feature/quick-pick-remote-commands

Conversation

@bjorkert

@bjorkert bjorkert commented Apr 12, 2026

Copy link
Copy Markdown
Member

What this adds

Quick-Pick Boluses and Meals: contextual shortcut buttons that appear at the top of the bolus and meal entry screens in TRC (Trio Remote Commands) and Loop APNS remote views.

Instead of typing an amount each time, the most relevant recent entries appear as tap-to-fill buttons — saving a step for the caregiver sending remote commands.

How it works

Every successfully sent bolus or meal is stored locally on the device. When the remote command screen opens, the stored history is scored to surface the most relevant options for right now, considering:

  • Time of day — entries from similar times score higher
  • Day of week — weekday/weekend patterns are treated separately
  • Recency — older entries fade out gradually (half-life ~10 days)

Up to 5 results are shown. The section is hidden entirely until there is history to show.

Scope

View Quick-Pick section
TRC Bolus Quick-Pick Boluses
TRC Meal Quick-Pick Meals (carbs + optional fat/protein + optional bolus)
Loop APNS Bolus Quick-Pick Boluses
Loop APNS Carbs Quick-Pick Meals (carbs only)
  • Meal boluses sent via TRC are stored as part of the meal record, not as standalone boluses, so they don't pollute the bolus quick-picks
  • Loop APNS carbs-only entries are stored into the shared meal history and scored alongside TRC meal history
  • Fat/protein fields are only applied when the "Meal with fat/protein" setting is enabled
  • History is stored locally in UserDefaults (Nightscout cannot distinguish remote vs manual entries)

Info button

Each Quick-Pick section header includes an ⓘ button. Tapping it shows a brief, plain-language explanation of what the buttons are and how they are built — easily dismissed by swiping or tapping Done.

New files

  • Remote/QuickPickBoluses/QuickPickBolusesManager.swift — scoring logic + history management for boluses
  • Remote/QuickPickBoluses/RemoteBolusHistoryEntry.swift — local history model
  • Remote/QuickPickMeals/QuickPickMealsManager.swift — scoring logic + history management for meals
  • Remote/QuickPickMeals/RemoteMealHistoryEntry.swift — local history model
  • Helpers/Views/QuickPickSectionHeader.swift — reusable section header with info popover

Companion PR

Documentation: loopandlearn/loopfollowdocs#33

Renames all files, classes, types, and UI labels introduced by the
quick-pick feature from "Common" to "Quick-Pick":

- CommonBoluses/ → QuickPickBoluses/
- CommonMeals/ → QuickPickMeals/
- CommonBolusesManager → QuickPickBolusesManager
- CommonMealsManager → QuickPickMealsManager
- CommonSectionHeader → QuickPickSectionHeader
- UI labels: "Common Boluses/Meals" → "Quick-Pick Boluses/Meals"
@bjorkert

bjorkert commented Apr 12, 2026

Copy link
Copy Markdown
Member Author

2AF6CAAE-6A55-4673-8F23-F64537AB2E2C_4_5005_c
0D00597C-704A-48AA-863D-278357F0C963_4_5005_c

@bjorkert

Copy link
Copy Markdown
Member Author

3D50391D-81C9-468D-A742-465871506664_4_5005_c
DA87E8EF-2699-4B79-9F1C-2957E2E8A80A_4_5005_c

bjorkert added a commit that referenced this pull request Apr 27, 2026
# Conflicts:
#	LoopFollow.xcodeproj/project.pbxproj

@codebymini codebymini left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍
Been running this for a while and everything seems to work as intended. Code review looks good

@marionbarker marionbarker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Relying on code review by @codebymini.
Confirm this builds for iOS 18 and iOS 26 phones and using Loop and Trio URLs.

LF TRC was configured for carbs only

  • Sent several remote meals via LoopFollow phone to Trio.
  • The items showed up as quick pick options for next remote meal.

modifies LF TRC to include fat and protein and bolus.

  • sent a meal with carbs, fat, protein and bolus
  • this was added to the quick pick list for next time

LF Loop remote control configured

  • This also adds the quick pick
  • This is nice but it would be convenient if the absorption time were included along with carb amount.

Since this has been around for along time and is a great feature, I'm going to merge it.
Perhaps improvements could be added later.

@marionbarker marionbarker merged commit 566c61a into dev Jun 14, 2026
1 check passed
@marionbarker marionbarker deleted the feature/quick-pick-remote-commands branch June 14, 2026 19:49
marionbarker pushed a commit that referenced this pull request Jun 21, 2026
* Common remote commands

* Help texts

* Rename Common to Quick-Pick throughout

Renames all files, classes, types, and UI labels introduced by the
quick-pick feature from "Common" to "Quick-Pick":

- CommonBoluses/ → QuickPickBoluses/
- CommonMeals/ → QuickPickMeals/
- CommonBolusesManager → QuickPickBolusesManager
- CommonMealsManager → QuickPickMealsManager
- CommonSectionHeader → QuickPickSectionHeader
- UI labels: "Common Boluses/Meals" → "Quick-Pick Boluses/Meals"
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