Skip to content

Metrics hrv explorer - #5

Merged
abdulsaheel merged 3 commits into
mainfrom
metrics-hrv-explorer
Jun 13, 2026
Merged

Metrics hrv explorer#5
abdulsaheel merged 3 commits into
mainfrom
metrics-hrv-explorer

Conversation

@abdulsaheel

Copy link
Copy Markdown
Collaborator

No description provided.

abdulsaheel and others added 3 commits June 14, 2026 04:02
…sh, full metric surfacing

Reworks the app around per-concern screens reached from a 5-tab shell
(Today · Sleep · Heart · Body · Workouts, shoe icon) + Today gauges.

- ConcernScreen: one reusable screen per concern with Today/Week/Month/3M, a GlowCard
  hero (display number + delta + tappable bars inside, readable labels), inline drill
  (month→week→day) keyed by date, SectionHeader rhythm — matches the hand-written look.
- Sleep tab = the rich SleepDetailScreen embedded; Body tab = StrainDetailScreen embedded
  (added `embedded` mode to both); Heart = composed card (recovery/RHR GlowCard hero →
  HR timeline → full HRV RMSSD/SDNN/LF-HF → stress → zones w/ legend → nocturnal →
  respiratory → illness 3-signal breakdown).
- MetricRow + kMetricInfo: every metric shows a one-line "what this is" on its own
  full-width line; proper padding (fixes the cramped vertical-only cards).
- "What affected this" is display-only (no navigation loop); per-concern Records +
  journal Patterns resurfaced on Today tabs.
- Today de-duped: gauges open the concern screens; removed duplicate Sleep/Day-strain
  tiles, Stats/Activity tabs, Lungs tab (resp/SpO2 → Sleep+Heart). Profile via gear icon
  (wrapped in a Scaffold when pushed). Back buttons on pushed concern screens. Numbers on
  bar charts. Removed the orphaned MetricExplorer.
- api_client: /trend, /day/heart, /day/lungs, workouts endpoints.

flutter analyze clean (pre-existing info lints only).
Merge pull request #3 from OpenStrap/fix/background-sync-keepalive
@abdulsaheel
abdulsaheel merged commit 11b85dd into main Jun 13, 2026
@abdulsaheel
abdulsaheel deleted the metrics-hrv-explorer branch June 14, 2026 03:59
abdulsaheel added a commit that referenced this pull request Jun 26, 2026
DropTabl added a commit to DropTabl/edge that referenced this pull request Aug 26, 2026
…(v77)

The reported bug ("Walking calories are not counted"): a Walking workout
records fine, its steps count fine, and the day's Active energy never moves.
Root cause is not a wiring or sync failure — MOT-02's HR-flex gate
deliberately bills nothing below the ACSM moderate floor, and a walk lives
entirely below it. The session's own bout number (which bills sub-gate
samples at the resting rate) made the gap read like a sync bug.

The analytics half (OpenStrap/analytics#52) prices sub-gate minutes from
MEASURED cadence — CADENCE-Adults' published 100/110/120/130 spm ↔ 3/4/5/6
METs line, the one gait signal this platform actually has after MT-05 ruled
the 1 Hz accel out. This is the edge half:

- lib/compute/step_cadence.dart: the ONE windows→minutes cadence mapping,
  from the day's RESOLVED live_coverage spans (credited, never raw rows, so
  band/phone overlap cannot double-price a step). Partial coverage pro-rates
  DOWN — a walk's boundary minute under-bills rather than half a minute of
  walking pricing a full MET-minute; untouched minutes are null, unmeasured.
- Both energy passes feed it through that one mapping: the coordinator's
  canonical wakeDayEnergy AND the pipeline's early-read mirror
  (DayBundleInput carries the spans across the isolate), so the early read
  and the derived day bill a walk identically instead of the number growing
  when the coordinator's pass lands.
- wakeDayEnergy filters the cadence series in the SAME pass as the off-skin
  HR filter — dropping an HR entry without its cadence would price every
  later cadence against the wrong minute (pinned by test).
- The TDEE block discloses the term (live_coverage_pedometer in inputs_used,
  walking kcal in the note) only on days it actually priced something.
- kAlgoVersion 76 → 77. A day with no pedometer coverage derives
  byte-identical to v76.

PIN GATE: the pubspec analytics pin is NOT flipped yet — it must move to the
OpenStrap/analytics#52 merge SHA (together with kAnalyticsPin) before this
can merge, per invariant OpenStrap#5. Draft until then.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015TxisrChNFxtVMXFFNRGtV
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