Skip to content

Draft aggregate: local-first metabolic context cockpit (#36–#48) - #51

Draft
shroominic wants to merge 33 commits into
mainfrom
feature/metabolic-context-train
Draft

Draft aggregate: local-first metabolic context cockpit (#36–#48)#51
shroominic wants to merge 33 commits into
mainfrom
feature/metabolic-context-train

Conversation

@shroominic

@shroominic shroominic commented Aug 15, 2026

Copy link
Copy Markdown
Owner

What changed

This feature train turns OpenGlucose into a local-first metabolic context cockpit while preserving the existing sensor truth and safety boundaries.

  • Hide History, Patterns, and Weekly recap during the first 60-minute warmup; exclude warmup/provisional readings from visible history and analytics.
  • Recover warmup/live notification and iOS Live Activity state, including a private warmup countdown.
  • Explain Bluetooth-off discovery failures with actionable enable/retry guidance.
  • Add a compact Today cockpit with latest/freshness/coverage, evidence-backed observations, journal quick-add, and a mixed Body timeline.
  • Import bounded Apple Health/Health Connect activity, sleep, heart-rate, energy, and distance context with source-aware deduplication.
  • Load local context into Today after foreground refresh, quick-add, and manual Health sync.
  • Add deterministic meal-response coverage/peak/timing analytics with explicit incomplete states and non-causal safety copy.
  • Add local glucose alert history with warmup suppression and protected local persistence.
  • Add a redacted-by-default glanceable surface contract for warmup/freshness/context/alerts.
  • Add an opt-in AI insight presentation surface with disabled/loading/error/empty/ready states and privacy redaction.
  • Add a fail-closed dry-run/confirmation/stale-plan local-data deletion contract.

Verification

  • Core package focused analyzer/tests pass on the pinned SDK (including 143 cgm_core tests after meal-response integration).
  • Focused Flutter analyzer/widget tests pass in isolated agent worktrees (context/timeline 10 tests; meal card 3 tests; prior cockpit/evidence/context suites).
  • make tooling-check passes.
  • git diff --check passes.
  • Full make check is blocked on this host because Flutter is not installed on PATH; physical-device/UI screenshot verification remains outstanding.

Product/safety notes

  • No background sync or new cloud data path was introduced.
  • AI remains off by default and requires the existing explicit provider/key flow.
  • Native glanceable payload mappings remain a separate follow-up; the adapter contract is redacted by default.
  • Local deletion platform adapters and confirmation UI remain explicitly documented follow-up work.

Issue tracking

This aggregate branch tracks #36#48. Each extracted focused PR will reference its issue. An issue is closed only after all acceptance criteria are independently verified.

fungus added 30 commits August 15, 2026 16:48
@shroominic
shroominic marked this pull request as draft August 16, 2026 11:18
@shroominic shroominic changed the title Implement local-first metabolic context cockpit Draft aggregate: local-first metabolic context cockpit (#36–#48) Aug 16, 2026
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