Skip to content

Conversation

@olorinmaia
Copy link
Contributor

Problem
Duplicate "Enacted" and "Suggested" messages shown when they're the same
Stale enacted data in AAPSClient OpenAPS pill.
SMB enacted times not properly tracked in Loop Status on wear

Solution
Show "Loop" label when enacted/suggested match
Hide stale enacted data
Track max(TBR, SMB) enacted time

Testing
✅ TBR only
✅ SMB only
✅ TBR + SMB
✅ No changes loop
✅ Stale enacted data

Result: Cleaner, more accurate loop status display.

Some pictures to illustrate. See also: #3706

BEFORE

Duplicated data Stale enacted data Stale misleading enacted data
image image image

AFTER PR

Loop result AAPSClient OpenAPS pill
image image
image image
image image

Replace HH:mm string comparison with 30-second time window logic for
determining when to show combined vs separate loop status displays.

Changes:
- ProcessedDeviceStatusDataImpl: Show "Loop" label when enacted and
  suggested have matching reasons within 30s window
- ProcessedDeviceStatusDataImpl: Show separate "Enacted"/"Suggested"
  labels only when reasons differ or enacted is stale
- LoopStatusActivity: Use 30-second window instead of HH:mm string
  comparison for combined display
- DataHandlerMobile: Use max(lastTBREnact, lastSMBEnact) for accurate
  enacted timestamp in AAPS mode

This ensures consistent behavior across wear and phone interfaces,
properly handles SMB timing, and avoids showing duplicate or stale
enacted data.
@sonarqubecloud
Copy link

@olorinmaia
Copy link
Contributor Author

Splitted into two because of conflicts with compose branch.
#4451

#4452

@olorinmaia olorinmaia closed this Dec 30, 2025
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