Skip to content

Bug fix: carb dots overlapping SMB dots on the chart#650

Open
aug0211 wants to merge 1 commit intoloopandlearn:devfrom
aug0211:auggie-treatment-dot-spacing-fix
Open

Bug fix: carb dots overlapping SMB dots on the chart#650
aug0211 wants to merge 1 commit intoloopandlearn:devfrom
aug0211:auggie-treatment-dot-spacing-fix

Conversation

@aug0211
Copy link
Copy Markdown
Contributor

@aug0211 aug0211 commented May 9, 2026

  • Restores pre-PR Differentiate the display of Automated and Manual boluses #305 behavior; no other dot positioning changes
  • Carb dots entered alongside an SMB were rendering at the same Y position as the SMB triangle, visually overlapping
  • The carb-vs-bolus collision logic was supposed to lift the carb dot above the bolus to BG+70, but only checked for Boluses (not SMB)
  • Regression comes from PR Differentiate the display of Automated and Manual boluses #305 (SMB display differentiated from boluses), which split SMBs into their own smbData array. - After the split, findNearestBolusbyTime in processNSCarbs no longer saw SMBs as "nearby treatments," so carb-near-SMB fell through to the default BG+20 offset: the same Y as the SMB itself.
  • processNSCarbs now also looks up smbData.
  • A carb within 300s of either a bolus OR SMB lifts to BG+70; otherwise BG+20.

- Restores pre-PR loopandlearn#305 behavior; no other dot positioning changes
- Carb dots entered alongside an SMB were rendering at the same Y position as the SMB triangle, visually overlapping
- The carb-vs-bolus collision logic was supposed to lift the carb dot above the bolus to BG+70, but only checked for Boluses (not SMB)
- Regression comes from PR loopandlearn#305 (SMB display differentiated from boluses), which split SMBs into their own smbData array. - After the split, findNearestBolusbyTime in processNSCarbs no longer saw SMBs as "nearby treatments," so carb-near-SMB fell through to the default BG+20 offset: the same Y as the SMB itself.
- processNSCarbs now also looks up smbData.
- A carb within 300s of either a bolus OR SMB lifts to BG+70; otherwise BG+20.
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