You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
health: split typical pill into bin-time + daily-total on color
Redesign the activity-summary "typical" pill so it surfaces both the
bin-aware "by now" step count and the full-day weekday historical
average, side by side, on color displays. The header stays
"TYPICAL <day>"; below it a two-column row shows each number on top
with its label beneath (bin time | TOTAL) in black, separated by a
1px black vertical divider. BW boards stay two-line: TYPICAL <day>
over the daily total alone, since they lack the room for the split.
Renderer (health_ui_render_typical_text_box):
- Add daily_total and bin_minute arguments. The sleep card passes
-1/-1 to keep its single-value behavior; the activity card passes
the bin-aware count as value_text plus the new numbers. The empty
state collapses to the em-dash via -1/-1.
- On color with both numbers present, the pill grows to 53px to fit
the three rows; otherwise it keeps its original 35/36px height.
- Push the pill down by a third of HEALTH_Y_OFFSET (and the current
step count by a sixth) so the spacing stays balanced on taller
displays; zero on legacy-sized displays where the offset is 0.
- On round, narrow the column band so the two halves sit closer to
center instead of marooned at the display edges.
Data layer: re-add health_data_steps_get_current_average_minute,
returning the minute-of-day of the latest completed step-average
bin, factoring the lazy refresh into prv_refresh_current_step_average
shared with health_data_steps_get_current_average. The activity card
caches it each layer update and passes it to the renderer.
Test fixture: pin RTC to Saturday 16:19:35 UTC with 24h clock so the
rendered "16:15" bin time is deterministic; seed
step_average_last_updated_time per case. Regenerate activity, sleep,
and card-view goldens on obelix/gabbro.
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Ave Özkal <git@ave.zone>
0 commit comments