Skip to content

Show a stale cue and status line on the CarPlay Live Activity - #829

Draft
MtlPhil wants to merge 1 commit into
loopandlearn:devfrom
achkars-org:pr/carplay-stale-status-line
Draft

MtlPhil wants to merge 1 commit into
loopandlearn:devfrom
achkars-org:pr/carplay-stale-status-line

Conversation

@MtlPhil

@MtlPhil MtlPhil commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

A Live Activity only redraws when an update reaches it, so with no network or a stopped app it can't show that its data is old. On CarPlay that means a reading can sit there looking current long after it has stopped updating.

Staleness

  • staleDate is now 12 minutes after the reading and is sent in update pushes, so iOS can flag the activity without the app.
  • Renewal relies only on laRenewBy and laRenewalFailed, so stale data no longer replaces the activity when the app opens. An activity with no stored deadline is still replaced, since it could never renew.

Small family (CarPlay and the Watch Smart Stack)

  • A stale reading is struck out in red, with the BG and arrow grey.
  • A status line, on by default, shows the update time, IOB and COB (or Not Looping in their place) and any active override with its insulin needs, range and time left.
  • While the status line is on, IOB, COB and Override aren't offered for the right slot. A stored choice of one of them comes back when the line is turned off, and turning it off also restores the original font sizes.
  • A Tight CarPlay Layout switch, off by default, replaces the right slot with projected BG, IOB, COB and basal, and centres the bottom row. No API tells CarPlay from the Watch, so it also needs a width of at least 205 points: the 240-wide CarPlay layouts, not the 170-wide one.
  • Both switches explain themselves in an info button.

Tests cover the stale date, renewal, override details and the small-widget layout.

A follow-up PR adds a CarPlay widget on top of this one.

A Live Activity only redraws when an update reaches it, so with no network
or a stopped app it cannot show that its data is old. staleDate is now 12
minutes after the reading and is sent in update pushes, so iOS can flag the
activity without the app. Renewal relies only on laRenewBy and
laRenewalFailed, so stale data no longer replaces the activity when the app
opens; an activity with no stored deadline is still replaced, since it
could never renew.

The small family, shown on CarPlay and in the Watch Smart Stack:

- A stale reading is struck out in red, with the BG and arrow grey.
- A status line, on by default, shows the update time, IOB and COB (or Not
  Looping in their place) and any active override with its insulin needs,
  range and time left. While it is on, IOB, COB and Override are not
  offered for the right slot; a stored choice of one of them comes back
  when the line is turned off. Turning it off also restores the original
  font sizes.
- A Tight CarPlay Layout switch, off by default, replaces the right slot
  with projected BG, IOB, COB and basal, and centres the bottom row. No API
  tells CarPlay from the Watch, so it also needs a width of at least 205
  points: the 240-wide CarPlay layouts, not the 170-wide one.

Both switches explain themselves in an info button.
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