feat: add Dynamic ISF override toggle and expand basal percentage range#29
Draft
Copilot wants to merge 8 commits intocopilot/create-profile-system-planfrom
Draft
feat: add Dynamic ISF override toggle and expand basal percentage range#29Copilot wants to merge 8 commits intocopilot/create-profile-system-planfrom
Copilot wants to merge 8 commits intocopilot/create-profile-system-planfrom
Conversation
Implements a profile preset system that allows users to: - Save current therapy settings (Basal, ISF, CR, Glucose Targets) as named presets - View saved presets with summary info (total daily basal, entry counts) - Activate a preset to restore saved settings - Delete presets via swipe-to-delete Components: - ProfilePreset model (JSON-serializable) - ProfilePresetStorage (file-based storage using existing FileStorage) - ProfilePresets module (DataFlow, Provider, StateModel, RootView) - Navigation integration (Screen, SettingItems, TherapySettingsView) - Xcode project references for all new files Agent-Logs-Url: https://github.com/Sjoerd-Bo3/Trio/sessions/366f341c-cce7-40cc-838e-7f9297cb2c2c Co-authored-by: Sjoerd-Bo3 <2100083+Sjoerd-Bo3@users.noreply.github.com>
- Validate that therapy settings are non-empty before saving as preset - Validate preset data before activating to prevent unsafe configurations - Return optionals/booleans from save/activate to propagate validation errors - Add error alerts for save and activate failures - Fix pluralization in preset detail view for better localizability Agent-Logs-Url: https://github.com/Sjoerd-Bo3/Trio/sessions/366f341c-cce7-40cc-838e-7f9297cb2c2c Co-authored-by: Sjoerd-Bo3 <2100083+Sjoerd-Bo3@users.noreply.github.com>
Extract totalDailyBasal as a computed property on ProfilePreset for better code organization and reusability. Agent-Logs-Url: https://github.com/Sjoerd-Bo3/Trio/sessions/366f341c-cce7-40cc-838e-7f9297cb2c2c Co-authored-by: Sjoerd-Bo3 <2100083+Sjoerd-Bo3@users.noreply.github.com>
- Add disableDynamicISF field to Override model, OverrideStored Core Data entity, and TrioCustomOrefVariables - Add "Disable Dynamic ISF" toggle to AddOverrideForm and EditOverrideForm - Expand basal percentage range from 40-150% to 10-200% in both forms - Update determine-basal.js algorithm to check for disableDynamicISF override - Update OverrideStorage to persist the new field - Update resetStateVariables() to reset the new field - Rebuild webpack bundle for determine-basal.js Agent-Logs-Url: https://github.com/Sjoerd-Bo3/Trio/sessions/cf56e9b5-def3-4eae-bea0-52c18f18aa86 Co-authored-by: Sjoerd-Bo3 <2100083+Sjoerd-Bo3@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Sjoerd-Bo3/Trio/sessions/cf56e9b5-def3-4eae-bea0-52c18f18aa86 Co-authored-by: Sjoerd-Bo3 <2100083+Sjoerd-Bo3@users.noreply.github.com>
… gitignore Agent-Logs-Url: https://github.com/Sjoerd-Bo3/Trio/sessions/cf56e9b5-def3-4eae-bea0-52c18f18aa86 Co-authored-by: Sjoerd-Bo3 <2100083+Sjoerd-Bo3@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add additional settings for dynamics and SMB options
feat: add Dynamic ISF override toggle and expand basal percentage range
Apr 6, 2026
ab5c3ec to
30221b9
Compare
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.
Expands the override system with a Dynamic ISF disable toggle and widens the basal percentage range from 40–150% to 10–200%.
New: Disable Dynamic ISF per override
Full-stack addition of
disableDynamicISF: Boolthrough all layers:Overridestruct,OverrideStoredCore Data entity + propertiesTrioCustomOrefVariablesfield + CodingKeys, populated inprepareTrioCustomOrefVariables()determine-basal.jsbefore dynISF calculation:storeOverride()andcopyRunningOverride()persist the fieldAdjustmentsStateModel, wired intosaveCustomOverride(),saveOverridePreset(),resetStateVariables()AddOverrideFormandEditOverrideFormisOverrideInvalid()treatsdisableDynamicISFas a non-default settingExpanded basal percentage range
Picker range changed from
stride(from: 40, through: 150)tostride(from: 10, through: 200)in both Add and Edit forms, matching the existingroundOverridePercentageToStepbounds.Existing SMB controls
Already comprehensive (disable, schedule disable, override max SMB/UAM minutes) — unchanged.
Other
OverrideHelpViewto mention Dynamic ISF disableOverride()callsites inOverrideStorageTestsdetermine-basal.js